[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: transcoding flv to mp4

On 10/05/2010 03:40 PM, Celejar wrote:

I'm dabbling in transcoding flvs (e.g., from YouTube) to mp4s (for
uploading to a service (Snapfish) which doesn't support flv.  I'm doing
something like this:

ffmpeg -i example.flv example.mp4

I find that the above command line reduces the size of the video to
about a third of the original, but at the cost of egregious degradation
of the video quality.  If I use the 'sameq' option:

ffmpeg -sameq -i example.flv example.mp4

the resulting video seems to retain the quality, but now the file size
is increased by a factor of four (I've only tested one file so far -
the original flv was about 20MB, the first mp4 was about 8MB, and the
second about 80MB).

Why is this, and is there a happy medium, i.e., a way to keep the size
roughly constant, but to retain quality?


I just made one quick experiment with ffmpeg.
For testing purpose I was grab first video I found (http://www.youtube.com/watch?v=OhwjjAMci9Y&feature=rec-LGOUT-farside_rev-rn-3r-18-HM) 360p version.
ffmpeg line:
ffmpeg -i input.flv -vcodec libx264 -vpre max -acodec copy output.mp4

Rezult you can see here dobosevic.com/nix/The.mp4.tar.gz
I think tha video quality is almost as original and output is 2.7 x smaller in size.

More about ffmpeg presets you can find in /usr/share/doc/ffmpeg/ffmpeg-doc.html (3.10 Preset files) and presets are in /usr/share/ffmpeg/

You can also write your one presets or change default one.

Goran Dobosevic
Hrvatski: www.dobosevic.com
 English: www.dobosevic.com/en/
Registered Linux User #503414

Reply to: