Reputation: 13
Good Day,
I just captured a raw video using the command from my PS3 Eye Camera on my beagleboard. I had captured about 10s of raw video in 320*240, and the format used was YUYV
./capture -f -c 300 -o > output.raw
I successfully got the raw video (was about 40MB)
Now, I needed to figure out how to convert this raw video to an mp4 file: I have been trying out various ffmpeg commands but to no avail
root@beaglebone:~/Desktop/boneCV# ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt yuv422p - i output.raw -s 320x240 -r 25
-vcodec libx264 -an -vpre slower -crf 25 ffmpeg version v0.8.4, Copyright (c) 2000-2012 the Libav developers built on Jul 3 2013 19:28:08 with gcc 4.7.3 20130205 (prerelease) This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes). [IMGUTILS @ 0xbed475dc] Picture size 0x0 is invalid [IMGUTILS @ 0xbed4751c] Picture size 0x0 is invalid [rawvideo @ 0x2dac0] Could not find codec parameters (Video: rawvideo, yuv422p) [rawvideo @ 0x2dac0] Estimating duration from bitrate, this may be inaccurate output.raw: could not find codec parameters
This is the ffmpeg log of my camera type:
ffmpeg -f video4linux2 -list_formats all -i /dev/video0
[video4linux2 @ 0x2db80] R : yuyv422 : YUYV : 320x240 640x480
Does anyone have experience converting such raw video formats to MP4?
Upvotes: 0
Views: 1888
Reputation: 595
You are using ffmpeg (Libav), which is now called avconv. Try doing the same procedure with ffmpeg.
Also your ffmpeg command is not correct, you need to specify an output format of mp4 with the vcodec tag instead of the input. Let ffmpeg autodetect the input format, it's pretty good at it.
‘-vcodec codec (output)’
Set the video codec. This is an alias for -codec:v.
Upvotes: 0