View Full Version : Buffering in MKV
RoZuB
13th February 2010, 12:10
Good morning :-).
I have the following problem :
I have a BD with VC1 stream. This stream is still in the m2ts file. I index this file using DGdecNv and use DGdecode.dll as sourceplugin for my Avisynth script. The I encode this hole thing with x264 (profile high, level 4.1) to AVC (mkv container). To this point nothing is different to BDs with AVC stream. But after encoding I'm not abled to skip inside my video. When I skip it takes a while and MPC says, it is buffering and then it plays the movie with too high framerate. At first I thought DGdecNV would solve this problem (through indexing) but I was told, that this is not right :(.
If any of my files or setup is needed to help, I will post.
p.s.: sorry for my bad english
Dark Shikari
13th February 2010, 12:14
x264 doesn't currently write an index with its output MKV files. You have to remux with mkvmerge to get full seeking capability with some players.
RoZuB
13th February 2010, 12:24
x264 doesn't currently write an index with its output MKV files. You have to remux with mkvmerge to get full seeking capability with some players.
Thanks for this fast reply !!
I merged my Video with an audio stream (from the same BD). Is this what you mean ? If this ist it, it doesn't help me -> same results.
nurbs
13th February 2010, 12:52
That works for me. How did you add the audio to the video? Post the x264 commandline you used. The mediainfo (http://mediainfo.sf.net/) for the file could also help.
RoZuB
13th February 2010, 13:10
I used mkvmerge (mmg) to add the audio. I added video and audio files as source files and started muxing (dont't know the exact english terms used by mmg, I use the german version).
This is my x264 command line:
>x264 --profile high --level 4.1 --bframes 3 --ref 4 --slices
4 --aud --nal-hrd --b-pyramid strict --keyint 24 --min-keyint 2 --vbv-bufsize 3
0000 --vbv-maxrate 40000 in.avs --output c:\Users\Adm
in\Desktop\LW\src.mkv
And the MediaInfo File :
http://ul.to/za0bcv
:thanks:
nurbs
13th February 2010, 13:19
OK, I'm out of ideas. The settings look alright and you also muxed it the right way. Did you use the most recent version of mkvmerge (3.2.0)? I don't think there were any serious bugs in the previous versions, but it can't hurt to try the current one.
Can you also give me the mediainfo of the final muxed file. By the way mediainfo has a text output mode, so you can post the text here in a Code box like you did with the settings.
RoZuB
13th February 2010, 15:52
Unfortunately I deleted the file already. But I encode it again and poste the Text here tomorow or tonight. Another strange thing is that encoding of natural AVC streams (is already AVC on the BD) is accomplished without issues. I don't even need to remux the file.
Here is an example of such a file :
Allgemein
Complete name : C:\Users\Admin\Desktop\LW\src.mkv
Format : Matroska
File size : 4,83 GiB
Duration : 1h 48min
Overall bit rate : 6 364 Kbps
Writing application : x264
Writing library : Haali Matroska Writer b0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Ja
Format settings, ReFrames : 3 frames
Muxing mode : Container profile=Unknown@4.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 48min
Bit rate : 6 237 Kbps
Width : 1 920 Pixel
Height : 1 080 Pixel
Display aspect ratio : 16:9
Frame rate : 24,000 FPS
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : progressiv
Bits/(Pixel*Frame) : 0.125
Stream size : 4,74 GiB (98%)
Writing library : x264 core 80 r1376M 3feaec2
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.0:0.0 / 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 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / mbaff=0 / constrained_intra=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=1 / wpredb=1 / wpredp=2 / keyint=24 / keyint_min=2 / scenecut=40 / rc_lookahead=24 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / vbv_maxrate=40000 / vbv_bufsize=30000 / ip_ratio=1.40 / aq=1:1.00
perhaps this is a hint to my problem.
nurbs
13th February 2010, 17:12
The only thing that's a bit unusual is the 24 FPS framerate. Most stuff on blu-ray is 24000/1001 FPS, but 24 FPS is also allowed so maybe it's just a coincidence.
RoZuB
13th February 2010, 17:16
I have several other VC1 encoded Blu Rays. I will try to encode one of these. Perhaps its an issue with this one particular VC1 encoded film. But I get back tomorrow, with some more info.
Guest
13th February 2010, 18:01
The I encode this hole thing with x264 (profile high, level 4.1) to AVC (mkv container). To this point nothing is different to BDs with AVC stream. False. The containers are different.
RoZuB
13th February 2010, 19:40
False. The containers are different.
I ment nothing in the behavior of the tools is different.
But what do you mean by that ? That the videostream is no longer in a VC1 container but in an mkv container ?
RoZuB
13th February 2010, 19:44
The only thing that's a bit unusual is the 24 FPS framerate. Most stuff on blu-ray is 24000/1001 FPS, but 24 FPS is also allowed so maybe it's just a coincidence.
Sorry, I posted the wrong file :o
This is the right one (mediainfo from the m2ts file from BD):
General
ID : 0
Complete name : J:\Blu Rays\House of Wax\BDMV\STREAM\00000.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 11.6 GiB
Duration : 1h 14mn
Overall bit rate : 22.5 Mbps
Maximum Overall bit rate : 48.0 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : VC-1
Format profile : AP@L3
Duration : 1h 14mn
Bit rate : 19.7 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.395
Stream size : 10.2 GiB (87%)
Audio #1
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 1h 14mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 339 MiB (3%)
Audio #2
ID : 4353 (0x1101)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 1h 14mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 339 MiB (3%)
Audio #3
ID : 4354 (0x1102)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Duration : 1h 14mn
Bit rate mode : Constant
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48.0 KHz
Stream size : 339 MiB (3%)
Text #1
ID : 4608 (0x1200)
Menu ID : 1 (0x1)
Format : PGS
Text #2
ID : 4609 (0x1201)
Menu ID : 1 (0x1)
Format : PGS
Text #3
ID : 4610 (0x1202)
Menu ID : 1 (0x1)
Format : PGS
Text #4
ID : 4611 (0x1203)
Menu ID : 1 (0x1)
Format : PGS
Text #5
ID : 4612 (0x1204)
Menu ID : 1 (0x1)
Format : PGS
The other file was with AVC stream and plays fine after encoding.
Guest
13th February 2010, 20:05
But what do you mean by that ? That the videostream is no longer in a VC1 container but in an mkv container ? You said you transcoded to AVC and put that AVC stream in an MKV container. So, since the BluRay has an M2TS container, you now have a different container.
Your talk of a "VC1 container" is nonsense.
RoZuB
13th February 2010, 21:56
I allways mix that up :o
So the problem is, that in this case the MKV has no full seeking capability for some reason ?
I hope I'm on the right way :-)
encoding is at 75%. I'll post the mediafile tomorrow (it's 09:55pm here)
And thanks for all your help and patience.
RoZuB
14th February 2010, 09:27
I found the solution for my problem.
If I use the m2ts file directly as input for my AVS script (no matter if dgsource or directshowsource) and encode with x264, I get stottering playback. But if I extract the videostream first (with eac3to), then index it with dgindexnv and use the dgi as DGSource everything is OK.
But again :thanks:
RoZuB
14th February 2010, 09:29
Is there a way to set a status for this thread (e.g. "solved") ?
sneaker_ger
14th February 2010, 10:34
Setting things to "solved" is uncommon in this forum, but if you've found a bug in any of the programs you used I'd like to encourage you to make a sample file and report it to the developers so that the bug gets fixed and others don't stumble upon the same error.
RoZuB
14th February 2010, 10:48
Setting things to "solved" is uncommon in this forum, but if you've found a bug in any of the programs you used I'd like to encourage you to make a sample file and report it to the developers so that the bug gets fixed and others don't stumble upon the same error.
I'm not sure if it is a bug because all VC1 encoded streams behave like this after encoding with x264 (if the m2ts source is used instead of a raw file). It seems like this is the normal behavior. But if I'm wrong I will report it.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.