[FFmpeg-user] Problem converting from FLV to MP4

Fernando Martinelli fernando.martinelli at gmail.com
Sun Jul 22 14:11:21 CEST 2012


Hello everybody,

I would really appreciate if you could shed some light on my problem...

I need to convert videos with different characteristics (resolution, fps,
etc) from format FLV to format MP4 with always the same output resolution
(320x240) and fps (24).

Although I managed to do that, some of my videos are changing a lot their
lengths, which is causing Audio-Video synchronization problems (as I'm
merging audio streams independently with SOX and merge audio and video at
the end).

So what I would like to have is an *MP4 converted like said above but with
the SAME length as the FLV input file*. Is that possible? If so, how?

*Thanks a lot for any help, this is really urgent!*

Fernando

PS: Here is the command I'm using to convert the flv files and the
information of the input and output files (input has length 11:25 BUT
output 11:46)

Command: *input.flv -vcodec libx264 -b:v 200k -r 24 -vf scale=320:240
-flags +loop+mv4 -cmp 256 -partitions
+parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7
-trellis 1 -refs 5 -bf 0 -coder 0 -me_range 16 -g 250 -keyint_min 25
-sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 -an -y
output.mp4*
*
*
File info:
*Input #0, flv, from '**input.flv*'*:*
*  Metadata:*
*    creationdate    : Sat Jul 21 12:20:45*
*  Duration: 00:11:25.61, start: 0.000000, bitrate: 211 kb/s*
*    Stream #0:0: Video: h264 (Baseline), yuv420p, 320x240 [SAR 1:1 DAR
4:3], 12 tbr, 1k tbn, 24 tbc*
*    Stream #0:1: Audio: speex, 16000 Hz, mono, s16*
*Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':*
*  Metadata:*
*    major_brand     : isom*
*    minor_version   : 512*
*    compatible_brands: isomiso2avc1mp41*
*    encoder         : Lavf54.6.100*
*  Duration: 00:11:46.87, start: 0.000000, bitrate: 203 kb/s*
*    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
320x240 [SAR 1:1 DAR 4:3], 202 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc*
*    Metadata:*
*      handler_name    : VideoHandler*


More information about the ffmpeg-user mailing list