I recently decided I wanted to encode a few videos off of my computer to watch on my PSP. I'd done this successfully a few years back, but I didn't really remember what I had done. So to begin with, my starting point was
this website.
If you scroll down to the section entitled
Using ffmpeg to Transcode Videos, you'll see the following command line entry:
Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact -vcodec
xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768
M4V80113.mp4
I typed this in almost verbatim and ran into the following error:
Code:
Unable to find a suitable output format for 'xvid'
Googling for this error yielded plenty of hits, but no solutions that were applicable to my situation. The real reason I'm posting this is so that hopefully when people search for that error in the future, they will stumble across my solution for it here.
The first thing I did was to simply take out the
-vcodec xvid parameter. This resulted in another error, this time with 'aac' as the problem. I took out every single parameter until the only one left was
-bitexact, and discovered that it takes an argument! The man page doesn't mention this. I just put a 1 after it, and that got me to this:
Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact 1 -vcodec
xvid -s 320x240 -r 29.97 -b 1500 -acodec aac -ac 2 -ar 24000 -ab 64 -f psp -muxvb 768
M4V80113.mp4
This still didn't work. However, it was a lot closer to the right answer. While tinkering with it, I got various error messages including the following:
Code:
ffmpeg: unrecognized option '-muxvb'
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
Unknown encoder 'xvid'
Unknown encoder 'aac'
A very useful command I discovered at this point was "ffmpeg -formats" which prints out all the supported formats for ffmpeg. This allowed me to find "libxvid" and "libfaac," the proper names for the encoders I was trying to use. The exact commands are:
Code:
ffmpeg -formats | grep xvid
ffmpeg -formats | grep aac
After fiddling with the options a little bit more, I came up with the following command line entry:
Code:
ffmpeg -y -i cnn.mpg -title "cnn" -timestamp "2005-04-08 03:12:36" -bitexact 1 -vcodec
libxvid -s 320x240 -r 29.97 -b 1500 -acodec libfaac -ac 2 -ar 24000 -ab 65535 -f psp M4V80113.mp4
And this worked. Not only did it work, but I was able to immediately copy over and watch the video from my memcard. Notice the changes I had to make:
1) added parameter argument of 1 to
-bitexact
2) took out unsupported (YMMV)
-muxvb 768 option
3) replaced
-vcodec xvid with
-vcodec libxvid
4) replaced
-acodec aac with
-acodec libfaac
5) changed
-ab 64 to
-ab 65535
Good luck!