1
I want to convert some videos to be playable on a Canon digital camera.
The videos from the Canon PowerShot camera have the following specifications:
Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p, 1280x720, 22865 kb/s, 29.97 fps
Audio: pcm_u8 (raw / 0x20776172), 12000 Hz, mono, u8, 96 kb/s
What would the ffmpeg
-command line look like to produce such videos? Or where can I read about it? I have to tried to find it with ffmpeg -formats
which gives me a big list of formats. From this and some furter reading in the man page I have come to this command:
ffmpeg -i oldmovie.mp4 -acodec pcm_u8 -ar 12000 -ac 1 -vcodec copy -pix_fmt yuvj420p MVI_2655.MOV
but it still does not work. The video spec is different.
The video I get is:
Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x272 [SAR 153:154 DAR 180:77], 326 kb/s
but the correct video should have
Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuvj420p, 1280x720, 22865 kb/s
I think the resolution is not the problem, but the High versus Constrained Baseline. And the yuv420p versus the yuvj420p. How do I achieve these specs?
1You can't use '-vcodec copy'. You need to reencode the video track too :
ffmpeg -i oldmovie.mp4 -acodec pcm_u8 -ar 12000 -ac 1 -vcodec libx264 -pix_fmt yuvj420p -profile:v baseline MVI_2655.MOV
– Ely – 2015-09-14T15:00:32.907@Ely it's worth writing that up as an answer, perhaps with explanations of the various options. I would myself but you beat me to it! :P – bertieb – 2015-09-14T15:57:02.723
Can you provide a short sample file from the camera? – llogan – 2015-09-15T16:23:55.153