'Is it possible to explicitly set codec format when creating a video file using react?
I am using 'React-media-recorder' and 'React-webcam' to record a video in my react-app. Is it possible to explicitly set the codec format that the video is recorded in? My app works like this; the video file is pushed to S3 and then I call aws Rekcognition on the video for text detection. The video is stored fine in the S3 bucket, however when I call aws rekognition, I get the error - 'Unsupported codec/format.'
I'm wondering if it is possible to set the codec parameters accepted by aws rekognition for the file recording in my code?
I'm thinking this might be done in one of the following sections of code??:
const {
status,
startRecording,
stopRecording,
mediaBlobUrl,
} = useReactMediaRecorder({ video: true, audio: true, blobPropertyBag: {
type: "video/mp4"
} });
or
const blob = new Blob([videoBlob], {type:'video/MP4'});
//Creates a video file and filename
const videoFile = new File(
[blob],
`wardround.${"MP4"}`,
{ type: 'video/MP4' })
If anyone has any experience with this or suggestions, I'd very much appreciate their input.
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
