View Full Version : Missing video frame after encode x264 by Megui
lintran
4th March 2012, 05:38
Hi all, i have MKV file with some error frames at random time (when playing these frame look like block, blur...) but still keep sync with audio when play back by MPC or other players.
But after i reencode this MKV file, seem Megui dropped these frame so when i remux .h264 with audio of source to mkv, i got mkv with video is out of sync with audio.
Anyone please tell me how can i fix this problem? Exam how to setting to megui dont drop video frame?
P/S: i cant manual ajust or set delay for audio because errors frame of video source are random in time of video source, its take a ton of time to find where is it.
Thanks so much.
Zathor
4th March 2012, 11:45
Likely the input avisynth decode filter drops these frames. Try using another one (FFVideoSource, DSS2, DirectShowSource, DGI).
lintran
4th March 2012, 15:35
@Zathor: thanks you, currently, i'm using FFVideoSource, i'll give DirectShowSoure a try. Thank so much.
the_weirdo
4th March 2012, 15:49
@lintran: Maybe your original MKV file is VFR. Try muxing the encoded .h264 with timecodes from original video track.
sneaker_ger
4th March 2012, 18:58
Another thing you could try would be to use the fpsnum and fpsden parameters, e.g.:
FFVideoSource("source.mkv", fpsnum=30000, fpsden=1001) # 30000/1001 ~= 29.97 fps
lintran
5th March 2012, 06:06
@lintran: Maybe your original MKV file is VFR. Try muxing the encoded .h264 with timecodes from original video track.
Original video track doesnt have any timecodes track :( only have sound track and subtitle track (srt)
Another thing you could try would be to use the fpsnum and fpsden parameters, e.g.:
FFVideoSource("source.mkv", fpsnum=30000, fpsden=1001) # 30000/1001 ~= 29.97 fps
I'm using FFVideoSource("path.mkv").AssumeFPS(25,1), is it same? (My video framerate is 25.000)
Likely the input avisynth decode filter drops these frames. Try using another one (FFVideoSource, DSS2, DirectShowSource, DGI).
I tried with DirectShowSource, still out of sync :((
Anyone can help me, please.
sneaker_ger
5th March 2012, 06:32
I'm using FFVideoSource("path.mkv").AssumeFPS(25,1), is it same? (My video framerate is 25.000)
No, it is not the same. You'd have to use:
FFVideoSource("source.mkv", fpsnum=25, fpsden=1)
lintran
5th March 2012, 07:11
No, it is not the same. You'd have to use:
FFVideoSource("source.mkv", fpsnum=25, fpsden=1)
Thank you. I gonna try it right now.
the_weirdo
5th March 2012, 08:47
Original video track doesnt have any timecodes track :( only have sound track and subtitle track (srt)
Yes, it has. But timecodes is not a track. You can extract timecodes of a track via mkvextract, for example:
mkvextract timecodes_v2 original.mkv 0:timecodes.txt
will extract timecodes from track ID 0 of original.mkv and save to timecodes.txt
If you're not familiar with CLI, you can try MKVcleaver (http://forum.doom9.org/showthread.php?t=152108). Just open MKV file in MKVcleaver, check video track in left panel, check Timecodes in right panel and click Extract Tracks (you may want to select Settings -> Timecodes -> Timecodes Only so that it doesn't extract video track).
In mkvmerge GUI, after add video track, you can select it and specify timecodes file for it in General track options. However, if you don't care about keeping VFR, you should do as sneaker_ger said.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.