[FFmpeg-user] Remuxing from MKV to MP4 Unsmooth Video

Marcus marcus at noveis.net
Sat Jul 28 08:06:53 CEST 2012


Hello all,

I'm trying to remux some videos from MKV or M2TS to MP4. For the most part
the MP4s play better than the MKV/M2TS (faster skipping etc). However some
of videos stutter or aren't smooth - yet they are fine in the original MKV
or M2TS container.

Here is a command line I am using for all the videos I'm remuxing:

ffmpeg -analyzeduration 25000000 -i "file.mkv" -vcodec copy -acodec copy
"file.mp4"

Here is the ffmpeg output/log:
https://raw.github.com/gist/3191367/e767d97bde4a2afcad8071e1cf0487b78fd2d120/ffmpeg%20log.
But here is something interesting that popups (a lot) in the log:

DTS 83, next:126000 st:0 invalid dropping
PTS 83, next:126000 invalid dropping st:0

Below are some out puts from MediaInfo that show the usual differences
between ones that remux and play smoothly and those that don't. Maybe
someone will be able to tell me how to fix my issues based of it.

Here is the MediaInfo of one the videos that does not play back smoothly in
MP4:

General
ID : 1 (0x1)
Format : BDAV
Format/Info : Blu-ray Video
File size : 596 MiB
Duration : 21mn 9s
Overall bit rate mode : Variable
Overall bit rate : 3 937 Kbps
Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High at L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Codec ID : 27
Duration : 21mn 9s
Bit rate mode : Variable
Bit rate : 3 305 Kbps
Maximum bit rate : 40.0 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Stream size : 513 MiB (86%)
Writing library : x264 core 102 r1666 d058f37
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x113 /
me=umh / subme=8 / 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=0
/ chroma_qp_offset=-2 / threads=16 / sliced_threads=0 / nr=0 / decimate=1 /
interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 /
b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 /
keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass
/ mbtree=1 / bitrate=3305 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51
/ qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.1

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : 129
Duration : 21mn 9s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 58.1 MiB (10%)

And here is that of one that plays smoothly.

General
ID : 1 (0x1)
Format : BDAV
Format/Info : Blu-ray Video
File size : 703 MiB
Duration : 21mn 28s
Overall bit rate mode : Variable
Overall bit rate : 4 574 Kbps
Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High at L3.1
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Codec ID : 27
Duration : 21mn 28s
Bit rate mode : Variable
Bit rate : 4 000 Kbps
Maximum bit rate : 40.0 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Stream size : 614 MiB (87%)

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Format settings, Endianness : Big
Codec ID : 129
Duration : 21mn 28s
Bit rate mode : Constant
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 59.0 MiB (8%)


More information about the ffmpeg-user mailing list