23 Mar 2008


I spent close to 2 days trying to get around a problem with ffmpeg
Input #0, flv, from 'tmp.flv':
Duration: 01:43:15.8, start: 0.000000, bitrate: 64 kb/s
Stream #0.0: Video: flv, yuv420p, 320x240, 29.97 tb(r)
Stream #0.1: Audio: mp3, 22050 Hz, mono, 64 kb/s
Output #0, mp4, to 'tmp.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s, 29.97 tb(c)
Stream #0.1: Audio: 0x0000, 22050 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Unsupported codec for output stream #0.1

Which is basically saying that it dose not know how to take the audio input codec mp3 and produce and audio out put codec.

I tried to used the -acodec option to force output to mp3. Which as far as I understand I don't need to do as mp4 has both an mp4 video codec and audio codec.

The only site I found useful information on all in one place was http://howto-pages.org/ffmpeg/.
It describes how to compile from source and enable the different lib's required. I still found this site much more helpfull then the mailing lists that keep popping up in google searches.

This can be used as a work around for the mp3 encoding problem which I found at the ubuntu forums
ffmpeg -i inputfile.flv -acodec copy -vcodec mpeg4 outputfile.mp4

Whats important here is the -acodec copy, I dont know what the quality of the output will be like but at least it dose not bomb out in an error.

I found the quality to be good, not great just good. I lost some video information. The sound was great, no distortion or delay. The file size shrank close to 20%. I think that -sameq option could improve things but my file sise more then doubles. Which gets me great out put. I am going to experiment to try and get a better result.

No comments: