webm to mp4 conversion using ffmpeg -


when try convert webm file mp4 output very choppy , appears if many frames have been dropped ffmpeg

i used following commands convert

ffmpeg -i movie.webm movie.mp4 ffmpeg -i movie.webm -vcodec libx264 movie.mp4 ffmpeg -i movie.webm -vcodec libx264 -qscale 0 movie.mp4 

all of them have same problem. when use ffprobe seems show frames more or less properly.

update:

 built on jun 14 2013 14:31:50 gcc 4.7 (ubuntu/linaro 4.7.2-2ubuntu1)   configuration: --prefix=/home/user2/ffmpeg_build --extra-cflags=-i/home/user2/ffmpeg_build/include --extra-ldflags=-l/home/pavan4/ffmpeg_build/lib --bindir=/home/pavan4/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab   libavutil      52. 35.101 / 52. 35.101   libavcodec     55. 16.100 / 55. 16.100   libavformat    55.  8.102 / 55.  8.102   libavdevice    55.  2.100 / 55.  2.100   libavfilter     3. 77.101 /  3. 77.101   libswscale      2.  3.100 /  2.  3.100   libswresample   0. 17.102 /  0. 17.102   libpostproc    52.  3.100 / 52.  3.100 hyper fast audio , video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...  use -h full or, better, run 'man ffmpeg'  input #0, matroska,webm, '1.webm':   duration: 00:00:10.64, start: 0.000000, bitrate: 5024 kb/s     stream #0:0(eng): video: vp8, yuv420p, 1280x720, sar 1:1 dar 16:9, 1k fps, 1k tbr, 1k tbn, 1k tbc (default) [libx264 @ 0x1d966a0] using sar=1/1 [libx264 @ 0x1d966a0] mb rate (3600000) > level limit (2073600) [libx264 @ 0x1d966a0] using cpu capabilities: mmx2 sse2fast ssse3 sse4.2 [libx264 @ 0x1d966a0] profile high, level 5.2 [libx264 @ 0x1d966a0] 264 - core 133 r2 a3ac64b - h.264/mpeg-4 avc codec - copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 output #0, mp4, '1_conv4.mp4':   metadata:     encoder         : lavf55.8.102     stream #0:0(eng): video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [sar 1:1 dar 16:9], q=-1--1, 16k tbn, 1k tbc (default) stream mapping: stream #0:0 -> #0:0 (vp8 -> libx264) press [q] stop, [?] frame=  168 fps=0.0 q=33.0 size=      62kb time=00:00:00.11 bitrate=4606.0kbits/frame=  293 fps=230 q=33.0 size=     138kb time=00:00:00.23 bitrate=4809.7kbits/  video:5620kb audio:0kb subtitle:0 global headers:0kb muxing overhead 2.212461% [libx264 @ 0x1d966a0] frame i:46    avg qp:18.50  size: 39849 [libx264 @ 0x1d966a0] frame p:2940  avg qp:18.27  size:  1222 [libx264 @ 0x1d966a0] frame b:7651  avg qp:17.68  size:    43 [libx264 @ 0x1d966a0] consecutive b-frames:  4.0%  0.2%  0.3% 95.5% [libx264 @ 0x1d966a0] mb  i16..4: 19.9% 63.2% 16.9% [libx264 @ 0x1d966a0] mb p  i16..4:  0.2%  0.5%  0.1%  p16..4:  3.9%  1.1%  0.6%  0.0%  0.0%    skip:93.6% [libx264 @ 0x1d966a0] mb b  i16..4:  0.0%  0.0%  0.0%  b16..8:  0.2%  0.0%  0.0%  direct: 0.0%  skip:99.8%  l0:25.1% l1:74.9% bi: 0.0% [libx264 @ 0x1d966a0] 8x8 transform intra:63.6% inter:75.9% [libx264 @ 0x1d966a0] coded y,uvdc,uvac intra: 61.5% 53.4% 24.4% inter: 0.5% 0.5% 0.0% [libx264 @ 0x1d966a0] i16 v,h,dc,p: 52% 19% 19% 11% [libx264 @ 0x1d966a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 17% 13%  4%  6%  9%  5%  8%  6% [libx264 @ 0x1d966a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 18% 14%  5%  8% 10%  6%  6%  3% [libx264 @ 0x1d966a0] i8c dc,h,v,p: 55% 17% 24%  4% [libx264 @ 0x1d966a0] weighted p-frames: y:0.0% uv:0.0% [libx264 @ 0x1d966a0] ref p l0: 82.5% 13.2%  4.0%  0.3% [libx264 @ 0x1d966a0] ref b l0: 60.2% 39.2%  0.6% [libx264 @ 0x1d966a0] ref b l1: 98.5%  1.5% [libx264 @ 0x1d966a0] kb/s:4327.77 

as input file report strange frame rate value 1k fps coming tbs , tbr value (look here definition)

the encoder generate different result, 16k tbn, 1k tbc (default)

so calling :

ffmpeg -fflags +genpts -i 1.webm -r 24 1.mp4 

you configure ffmpeg generate new pts (a/k.a presentation timestamp) each frame , set target frame-rate 24.

so output mp4 file info (ffmpeg -i ....) change from

stream #0:0(eng): video: h264 (high) (avc1 / 0x31637661), yuv420p, 1280x720 [sar 1:1 dar 16:9], 4327 kb/s, 1000.09 fps, 1k tbr, 16k tbn, 2k tbc 

to

stream #0:0(eng): video: h264 (high) (avc1 / 0x31637661), yuv420p, 1280x720 [sar 1:1 dar 16:9], 1670 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -