I try to convert a video from .raw to .mp4. For this reason I did download, build and install both x264 and ffmpeg. However, command:

ffmpeg -f h264 -i output.raw -vcodec copy output.mp4

fails with error (shown in picture below). Is there any way to fix this?

enter image description here

Commands I also run:


root@beagleboard:/# v4l2-ctl --list-formats
        Index       : 0
        Type        : Video Capture
        Pixel Format: 'YUYV'
        Name        : YUV 4:2:2 (YUYV)

        Index       : 1
        Type        : Video Capture
        Pixel Format: 'MJPG' (compressed)
        Name        : MJPEG


root@beagleboard:/dev# v4l2-ctl --set-fmt-video=pixelformat=0
  • could you just post the output of this: ffmpeg -i output.raw, assuming you are trying to convert output.raw. Also if you try ffmpeg -i output.raw -vcodec libx264 -pix_fmt yuv420p output.mp4 what is the console output? – Rajib Feb 15 '14 at 17:54
  • Thank's for your reply. Both outputs are exactly the same, as edited above. Do you think there is a problem in encoding, or in the file while capturing video? – dempap Feb 15 '14 at 19:13
  • Where did you get output.raw from and how did you create it? – slhck Feb 15 '14 at 22:30
  • By executing ./capture -f -c 100 -o > output.raw. capture.c downloaded from: linuxtv.org/downloads/v4l-dvb-apis/capture-example.html. – dempap Feb 15 '14 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.