Log in

View Full Version : Media Player Classic Home Cinema (MPC-HC) - DXVA!


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 [163] 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410

tetsuo55
1st June 2009, 00:07
Bilinear ;)
Fixed my post

ForceX
1st June 2009, 00:09
In that case i suggest leaving the bicubic resizer alone. People who now have problems with the bicubic resizer will have to use nearest neighbour for now.

Does anyone know of a fast resizer that could fit between nearest neighbour and bicubic?

Why use Nearest Neighbour when one can use Bilinear? Nearest Neighbour virtually does no resampling and looks horrible. The Bilinear PS resizer works but the image becomes too blurry. EDIT: Bilinear is among the simplest of resizers, I don't think any other method has any acceptable performance/speed balance.

Bilinear is good for downsampling as it avoids jaggyness while Bicubic is better for upsampling as it gives more details and sharpness.

I think whoever was talking about a PS 3.0 resizer meant it to be completely newly written resizer which doesn't have to constrain itself to be backwards compatible with PS 2.0.

Casshern
1st June 2009, 00:19
I have submitted a fix for the mono LPCM bug.

Does not work for wages of fear and also not for 400 blows - sound plays at half the sample rate (everything is slowed down). The splitter reports the track as 48000 hz mono with a sample size of 16 Bits but gives bitrate as 768kbps. Tsmuxer states the bitrate as 1536Kbps... strange...


Heres what the splitter reports:
Audio: PCM 48000Hz mono 768Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {949F97FD-56F6-4527-B4AE-DDEB375AB80F}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 19

WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 48000
nAvgBytesPerSec: 96000
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 1 (extra bytes)

pbFormat:
0000: 01 00 01 00 80 bb 00 00 00 77 01 00 02 00 10 00 ....€»...w......
0010: 01 00|01 ...

tetsuo55
1st June 2009, 00:32
Why use Nearest Neighbour when one can use Bilinear? Nearest Neighbour virtually does no resampling and looks horrible. The Bilinear PS resizer works but the image becomes too blurry. EDIT: Bilinear is among the simplest of resizers, I don't think any other method has any acceptable performance/speed balance.

Bilinear is good for downsampling as it avoids jaggyness while Bicubic is better for upsampling as it gives more details and sharpness. Was a typo, i deleted that part of my post

I think whoever was talking about a PS 3.0 resizer meant it to be completely newly written resizer which doesn't have to constrain itself to be backwards compatible with PS 2.0.Yes i agree, but i doubt PS3.0 capable cards are having problems with the current PS2.0 one. So this would be a low priority feature requestDoes not work for wages of fear and also not for 400 blows - sound plays at half the sample rate (everything is slowed down). The splitter reports the track as 48000 hz mono with a sample size of 16 Bits but gives bitrate as 768kbps. Tsmuxer states the bitrate as 1536Kbps... strange...


Heres what the splitter reports:
Audio: PCM 48000Hz mono 768Kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Audio {73647561-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {949F97FD-56F6-4527-B4AE-DDEB375AB80F}
formattype: FORMAT_WaveFormatEx {05589F81-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 19

WAVEFORMATEX:
wFormatTag: 0x0001
nChannels: 1
nSamplesPerSec: 48000
nAvgBytesPerSec: 96000
nBlockAlign: 2
wBitsPerSample: 16
cbSize: 1 (extra bytes)

pbFormat:
0000: 01 00 01 00 80 bb 00 00 00 77 01 00 02 00 10 00 ....€»...w......
0010: 01 00|01 ...Samples please :)

tetsuo55
1st June 2009, 01:10
@ All devs:

Libraries that have updates available:

http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/trunk/lib/qt6/qtmlClient.lib

Might be able to update to:QuickTime 7.3 SDK for Windows
http://developer.apple.com/quicktime/download/

http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/trunk/src/libpng/
Libpng 1.2.36, performance updates. bugs fixed and security leaks fixed
http://www.libpng.org/pub/png/libpng.html

And ofcourse ffmpeg

And possibly the base-classes

I would like to have these updated for a new stable release.

mark0077
1st June 2009, 01:11
tetsuo quick question regarding bug tracker. Why was this bug closed as a duplicate of another

http://sourceforge.net/tracker/?func=detail&atid=854651&aid=2795475&group_id=170561

It isn't a duplicate of http://sourceforge.net/tracker/?func=detail&atid=854651&aid=2793531&group_id=170561
as far as I know. One relates to stuttering because of bad splitter, the other relates to vc-1 software decoding sometimes running into trouble when seeking in... well any vc-1 file.

tetsuo55
1st June 2009, 01:15
@ Everyone

I did a massive spring cleaning of the bug tracker.

We now have 78 bugs left ( a couple unconfirmed that might still get closed as cannot reproduce )

We basically have 3 big issues that make up most of the bug-reports/forum thread complaints

1. MPC-HC has a lot of aspect ratio problems:
https://sourceforge.net/tracker/?func=browse&group_id=170561&atid=854651&status=1&artgroup=899368

2. MPC-HC's internal mpeg TS splitter has to be enabled for a lot of things to work correctly, but it has many bugs too:
https://sourceforge.net/tracker/?func=browse&group_id=170561&atid=854651&status=1&artgroup=899369

3. Some files or combination of settings causes crashes.

I have re-orderer all the priorities.

Basically everything with 8-9 has no workaround or causes crashes.

tetsuo55
1st June 2009, 01:16
tetsuo quick question regarding bug tracker. Why was this bug closed as a duplicate of another

http://sourceforge.net/tracker/?func=detail&atid=854651&aid=2795475&group_id=170561

It isn't a duplicate of http://sourceforge.net/tracker/?func=detail&atid=854651&aid=2793531&group_id=170561
as far as I know. One relates to stuttering because of bad splitter, the other relates to vc-1 software decoding sometimes running into trouble when seeking in... well any vc-1 file.It's the same problem but neither bug-reports explains it well/completely

mark0077
1st June 2009, 01:25
It's the same problem but neither bug-reports explains it well/completely

Thanks, will be nice to see that one fixed. Cheers for all the work.

neoufo51
1st June 2009, 02:29
@ All devs:

Libraries that have updates available:

http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/trunk/lib/qt6/qtmlClient.lib

Might be able to update to:QuickTime 7.3 SDK for Windows
http://developer.apple.com/quicktime/download/

http://mpc-hc.svn.sourceforge.net/viewvc/mpc-hc/trunk/src/libpng/
Libpng 1.2.36, performance updates. bugs fixed and security leaks fixed
http://www.libpng.org/pub/png/libpng.html

And ofcourse ffmpeg

And possibly the base-classes

I would like to have these updated for a new stable release.
I definitely agree with this!

Aleksoid1978
1st June 2009, 03:12
Can anybody download QuickTime 7.3 SDK for Windows and post link here ???

betaking
1st June 2009, 03:24
Can anybody download QuickTime 7.3 SDK for Windows and post link here ???

OK,download at here
http://rapidshare.com/files/239447946/quicktimesdk.zip.html
MD5: 9EBE422F51C3D3F3CD7EFC527208947E

ADude
1st June 2009, 05:22
@ Everyone

I did a massive spring cleaning of the bug tracker.

I have re-orderer all the priorities.

Basically everything with 8-9 has no workaround or causes crashes.

Thank you for doing this unglamorous work.

By the way, IMHO, any bug in the internal decoders or splitters automatically has a workaround, because one can use ffdshow, Haali, etc. So, bugs that are not about internal decoders or splitters are automatically higher priority if they have no workaround.

ADude
1st June 2009, 05:25
Bilinear is good for downsampling as it avoids jaggyness while Bicubic is better for upsampling as it gives more details and sharpness.

I came across that same evaluation after discovering the large gpu use of MPC's bicubic software. Since I have a 720p screen, clarity of 1080p downsampling is always going to be more important than clarity of SD upsampling, so I will probably stick with bilinear regardless.

Casshern
1st June 2009, 09:05
Samples please :)

Would love to, but it's copyrighted material. But Beliyaal can contact me via pm for more "details".

tetsuo55
1st June 2009, 09:30
Thanks, will be nice to see that one fixed. Cheers for all the work.Yes there is a general problem with VC1 decoding that gets even worse when the VC1 is in the m2ts container. It's a high priority issue because direct bluray playback with DXVA is one of the main MPC-HC features,Libpng 1.2.37 will be out either this week or next week according to the current maintainer, Glenn Randers-Pehrson. Should update to that when it's released, it's at RC status atm.

http://sourceforge.net/project/showfiles.php?group_id=5624In that case we should wait a little bit, do you know the changelog?Thank you for doing this unglamorous work.

By the way, IMHO, any bug in the internal decoders or splitters automatically has a workaround, because one can use ffdshow, Haali, etc. So, bugs that are not about internal decoders or splitters are automatically higher priority if they have no workaround.I agree, unless:
-The bug causes a crash or security issue
-The bug relates to DXVA playback
-The bug relates to TS(Bluray) playback

The last 2 are important because they are MPC-HC's speciality. And haali splitter misses a lot of M2TS features so you cannot use that as an alternative

tetsuo55
1st June 2009, 09:32
Also please note, noone officially reported the refresh rate detection bug.

hoborg
1st June 2009, 09:34
Hi.
It is now ~1 mounth and external filter software decoding problem (extremly slow software decoding of h.264) still not fixed?
I was thinking it is critical issue...

tetsuo55
1st June 2009, 10:08
Hi.
It is now ~1 mounth and external filter software decoding problem (extremly slow software decoding of h.264) still not fixed?
I was thinking it is critical issue...Which bug report is that on the tracker?

Kurtnoise
1st June 2009, 10:11
Here is a patch (http://pastebin.com/fa6a94f9) to handle AC3-in-MP4 files created by Nero Digital...I hope NG will update their tools to be compliant within the standard soon. Still, Nero 9 uses this material. Samples for testing : file 1 (http://www.mediafire.com/?n1zdztydv3n) | file 2 (http://www.mediafire.com/?mtgmluijojz).

Note: I know that several constants are not used yet but might be useful for future patches. ;)

hoborg
1st June 2009, 10:12
Which bug report is that on the tracker?

I am not sure if it is listet in tracker...

Original post:
http://forum.doom9.org/showthread.php?p=1276859#post1276859

tetsuo55
1st June 2009, 11:02
Here is a patch (http://pastebin.com/fa6a94f9) to handle AC3-in-MP4 files created by Nero Digital...I hope NG will update their tools to be compliant within the standard soon. Still, Nero 9 uses this material. Samples for testing : file 1 (http://www.mediafire.com/?n1zdztydv3n) | file 2 (http://www.mediafire.com/?mtgmluijojz).

Note: I know that several constants are not used yet but might be useful for future patches. ;)Thanks, we can use every patch you can think off with regards to splitter problemsI am not sure if it is listet in tracker...

Original post:
http://forum.doom9.org/showthread.php?p=1276859#post1276859 i can reproduce with the latest version 1137, please add this issue to the tracker.

I hope another ffmpeg updates fixes it.

hoborg
1st June 2009, 12:04
I can reproduce with the latest version 1137, please add this issue to the tracker.

I hope another ffmpeg updates fixes it.

Added.
http://sourceforge.net/tracker/?func=detail&aid=2799393&group_id=170561&atid=854651

73ChargerFan
1st June 2009, 19:41
We now have 78 bugs left ( a couple unconfirmed that might still get closed as cannot reproduce )

I know of a show stopping bug, but haven't thought about it for a long time, and am surprised that it isn't already in the bug tracker.

dts 1536 over spdif stutters

My work around is to use spdifer. I'll test & verify with latest build before adding to the bug tracker. I'm using XP.

Mixer73
1st June 2009, 23:34
I can't believe the love shown by Beliyaal, Tetsuo55, Casimir, Alexins... Sorry if I have forgotten a regular contributor.

I think I've seen 100 builds since I started really using MPC-HC, as a former Zplayer and KMplayer user, I can now say that with the right settings MPC-HC gives perfect playback for me when its configured right.

Awesome job devs, :D You deserve a pat on the back for your commitment to a sometimes thankless job.

On another note is the xvidvideo.ru site down?

Aleksoid1978
1st June 2009, 23:37
Xvidvideo.ru is down, here latest 1141 build :

http://aleksoid.tosei.ru/mpc_x86_1141.7z
http://aleksoid.tosei.ru/mpc_x64_1141.7z

gngn
2nd June 2009, 00:23
Xvidvideo.ru is down, here latest 1141 build

thanks for providing this version. i was curious about the improvment with DXVA.
now files with 12-15 ReFrames will have DXVA with XP (SD and HD). only files with Reframes 16 will freeze.

Aleksoid1978
2nd June 2009, 00:36
thanks for providing this version. i was curious about the improvment with DXVA.
now files with 12-15 ReFrames will have DXVA with XP (SD and HD). only files with Reframes 16 will freeze.

What Output use ??? Under XP only in "system" no limit on ReFrames.

allak
2nd June 2009, 00:45
Regarding bug:

http://sourceforge.net/tracker/?func=detail&aid=2054127&group_id=170561&atid=854651

If I understand the report correctly, I am unable to reproduce.

Using the latest MKVtoolnix I've muxed a 16:9 avi to MKV, forcing the aspect ratio to 4:3 in the "Format Specific Option" tab for the video track.

As expected, the resulting mkv file is played by MPC-HC with the video squeezed.

Maybe it was simply a badly muxed file, or may some other patch has also fixed this problem (the bug is pretty old, august 2008, with no followup).

Anyway, we do not have a sample and we can't ask the anonymous submitter: if nobody else can reproduce I think the bug could be closed.


tested with the madVR, Haali, ERV and VMR9 rederers

gngn
2nd June 2009, 01:17
What Output use ??? Under XP only in "system" no limit on ReFrames.

on XP MPC-HC couldn't decode files with more than 11 ReFrames. it worked with CoreAVC (but even CoreAVC turns to software-mode on files with RF=16)
it only works now after Casimir666's changes in rev1141. so the DXVA limitations for XP inside MPC could be removed now.

but there is a problem now for me with some "more demanding" 1080p files: the frame rate judder is sometimes chaotic probably depending on the scene, and if i select the BicubicResizer instead of the BilinealPS2.0 then it gets even worse, and even worser if i enable some Shaders (YV12Chroma + Sharpencomplex2).

rev1136:
http://i266.photobucket.com/albums/ii259/gngnmumu/dxva/th_1136.png (http://i266.photobucket.com/albums/ii259/gngnmumu/dxva/1136.png)

rev1141:
http://i266.photobucket.com/albums/ii259/gngnmumu/dxva/th_1141.png (http://i266.photobucket.com/albums/ii259/gngnmumu/dxva/1141.png)

sample here (http://www.mediafire.com/download.php?nfzjnzzdt3y)

as a sidenote: before 1141 it was possible to have more than 1 instance of MPC-HC and DXVA, now MPC falls back to the ffmpeg on the second instance

edit: some of the SD anime encodes i have will get older frames inbetween on DXVA playback, and then video freezes. audio continues. in this sample (http://www.mediafire.com/download.php?5jmam15mzjm) video freezes at 0:17 sec
i hope that it's not my graphics-card giving up on me :))

malados
2nd June 2009, 03:07
I have one question about the DXVA decode and display.

When the DisplayNextFrame() function is called, it will search one nPicIndex to GetDeliveryBuffer and m_pAMVideoAccelerator->DisplayFrame to display the frame.
After display, the flag bUsed will set to 0 if this frame will not be reference by another frame.
So, the Index may be using for next decode buffer immediately.
The "decoded" frame will be updated on screen immediately caused by the same buffer index "nPicIndex" as previous display frame.
What is the problem? Does someone have any idea?


Is any one have idea about the buffer question?

konsulat
2nd June 2009, 09:29
I added this bug to the tracker

http://sourceforge.net/tracker/?func=detail&aid=2784256&group_id=170561&atid=854651

Thanks for fixing it. Now all my HD videos with 16 Reframes play without freezing.
With SD video encodes (less than 1280x720) and 16 Reframes DXVA is not active. But there is one rare occasion when SD videos with 16 Reframes use DXVA and video freezes - linked files.
When I start the main file and it is encoded with 10 Reframes for example MPC-HC uses DXVA. Linked file is encoded with 16 Reframes and when MPC-HC plays it at some frame video freezes. If I play the linked file separately, MPC-HC won't freeze because it doesn't use DXVA. It's the same as the bug above but if it's needed to add another bug to the tracker I'll do it.

Aleksoid1978
2nd June 2009, 13:01
I make test version - http://aleksoid.tosei.ru/mplayerc_1143_test.7z - work AR, fast move/switch between monitors, window and fullscreen mode.

tetsuo55
2nd June 2009, 13:17
I make test version - http://aleksoid.tosei.ru/mplayerc_1143_test.7z - work AR, fast move/switch between monitors, window and fullscreen mode.Here is a possible solution for the various crashes/corruptions related to multi-screen problems and UAc prompts ETC..


I also got the video to stay up after ctrl+alt+delete. Really, this was ridiculous. DirectDraw was a simple surface->Restore() call, but Direct3D was a nightmare. Totally different ways to recover it based on surface vs texture mode, and you basically have to destroy every last resource, then call device->Reset(), the re-initialize it all again. I wrapped all the code I could to avoid code duplication. And it turns out just resetting isn't enough for the issue with textures when you resize windows, so that still re-initializes everything. Oh, and you can't just re-initialize when you lose the D3D device: it'll actually crash the application. You have to reset the device before you can use it again, period. And when you lose the device, in order to try and recover it, you have to release all the old resources first, so you have to then write protection checks at the top of every user-visible function to make sure they don't try and access resources you released while trying to restore. Because you see, it won't restore when you're in the ctrl+alt+delete menu, it'll keep failing and you have to keep trying over and over until it works. And you can't sleep once you detect device loss, because then the audio will hang.

byuu wrote:
FitzRoy wrote:
Powering off a game causes the audio to stutter forever. Same thing that happens when you're dragging the title bar.

byuu wrote:
I can fix unload, but the title bar thing is a limitation of Windows deadlocking userspace code when you click on it. Linux and OS X don't have that problem.

You can try muting between WM_(ENTER|EXIT)SIZEMOVE messages, assuming you can intercept them.

tetsuo55
2nd June 2009, 14:04
I mentioned updating the baseclasses before.

The newest release can be found here:http://www.microsoft.com/downloads/details.aspx?FamilyID=6db1f17f-5f1e-4e54-a331-c32285cdde0c&displaylang=en

On 27-4-2009 MS said they would not be updating the directshow baseclass redist dll's, this probably also means that they won't be updating the baseclasses at all. However they could still update them through windows update (redist is no longer required with XP sp2 or newer)
I guess this is a logical step seeing as all the focus is on media foundation.

tetsuo55
2nd June 2009, 14:32
I've noticed that some parts of MPC-HC and more often external filters require admin rights to work correctly(At least on windows 7).
(See also this related bug report http://sourceforge.net/tracker/?func=detail&aid=2799826&group_id=170561&atid=854651)

Here is a MS tool that can test applications for problems running as a limited user: http://blogs.msdn.com/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx

Basically MPC-HC(or the external filters) should ask for admin rights only when really needed. (prompt uac on action that requires admin rights if not already running with admin rights)

EDIT:
Here is a document explaining the admin rights only when needed functionality
http://www.codeproject.com/KB/vista-security/UAC_Shield_for_Elevation.aspx

cca
2nd June 2009, 14:44
Revision 1141 seems to cause problems with DXVA in certain files. Example follows:

http://img404.imageshack.us/img404/6083/mpcdxva.jpg (http://img404.imageshack.us/my.php?image=mpcdxva.jpg)


As you can see in this screenshot, playback is not smooth but the video stutters. The same exact file has no such problem with revision 1137.

Unfortunately I don't know how the file was encoded, it is a freely available anime fansub. The problem seen is 100% reproducable, happens every time with revision 1141 with this video, never happens with rev. 1137.

tetsuo55
2nd June 2009, 14:49
We need a sample.... (you will have to cut it). Also please post a media info log in [ code ] [ / code ]

chiyuwang
2nd June 2009, 15:01
when using VMR9 renderer it crashes to dxvadecoder.cpp line416

cca
2nd June 2009, 15:16
We need a sample.... (you will have to cut it). Also please post a media info log in [ code ] [ / code ]

Unfortunately I do not how to cut matroska files, nor what a media info log is. I don't produce videos, only play them. I assume it cannot be too hard, but I got no clue atm.

tetsuo55
2nd June 2009, 15:22
Unfortunately I do not how to cut matroska files, nor what a media info log is. I don't produce videos, only play them. I assume it cannot be too hard, but I got no clue atm.

You can find mediainfo here:
http://forum.doom9.org/showthread.php?p=678931#post678931

Cutting and uploading samples can be found here:
http://mpc-hc.wiki.sourceforge.net/Troubleshooting+guidelines

tetsuo55
2nd June 2009, 15:30
I added this bug to the tracker

http://sourceforge.net/tracker/?func=detail&aid=2784256&group_id=170561&atid=854651

Thanks for fixing it. Now all my HD videos with 16 Reframes play without freezing.
With SD video encodes (less than 1280x720) and 16 Reframes DXVA is not active. But there is one rare occasion when SD videos with 16 Reframes use DXVA and video freezes - linked files.
When I start the main file and it is encoded with 10 Reframes for example MPC-HC uses DXVA. Linked file is encoded with 16 Reframes and when MPC-HC plays it at some frame video freezes. If I play the linked file separately, MPC-HC won't freeze because it doesn't use DXVA. It's the same as the bug above but if it's needed to add another bug to the tracker I'll do it.Can you upload a sample? I don't have any linked files.

cca
2nd June 2009, 15:57
Ok, I hope I did it right:

Media info log:

General
[57E6D6CF].mkv
Format : Matroska
File size : 342 MiB
Duration : 23mn 0s
Overall bit rate : 2 081 Kbps
Encoded date : UTC 2009-06-02 00:06:18
Writing application : mkvmerge v2.1.0 ('Another Place To Fall') built on Aug 26 2007 15:16:15
Writing library : libebml v0.7.7 + libmatroska v0.8.1
Cover : Yes

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 9 frames
Muxing mode : Container profile=Unknown@5.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 22mn 58s
Bit rate : 1 910 Kbps
Nominal bit rate : 1 964 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16/9
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.086
Stream size : 314 MiB (92%)
Title : Video (H.264)
Writing library : x264 core 67 r1153M 7b6ce6a
Encoding settings : cabac=1 / ref=9 / deblock=1:-2:-1 / analyse=0x3:0x133 / me=umh / subme=8 / psy_rd=1.0:0.0 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=-2 / threads=6 / nr=0 / decimate=0 / mbaff=0 / bframes=6 / b_pyramid=1 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / keyint=300 / keyint_min=30 / scenecut=40 / rc=2pass / bitrate=1964 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:0.60

Audio
ID : 2
Format : Vorbis
Format settings, Floor : 1
Codec ID : A_VORBIS
Duration : 23mn 0s
Bit rate mode : Constant
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Stream size : 21.1 MiB (6%)
Title : Japanese Audio (2ch LC-AAC)
Writing library : Lancer b5 (UTC 2006-11-10)
Language : Japanese

Text
ID : 3
Format : ASS
Codec ID : S_TEXT/ASS
Codec ID/Info : Advanced Sub Station Alpha
Title : ASS
Language : English

Menu
00:00:00.000 : :OP
00:01:10.028 : :Part A
00:10:57.990 : :Part B
00:21:50.015 : :ED
00:22:49.950 : :Preview



Sample can be found here: http://sharebee.com/22ef33f4

tetsuo55
2nd June 2009, 16:13
Could you try remuxing the file with the newest build of mkvmerge found here:
http://forum.doom9.org/showthread.php?p=1291874#post1291874

(just load the mkv, change the output name and click the remux button)

cca
2nd June 2009, 16:16
I can try but not immediately, currently I 'm working, I'll tell you the result in about 3 hours.

konsulat
2nd June 2009, 16:24
Can you upload a sample? I don't have any linked files.

Yes. Here is the main file (first 1 minute of it)

http://sharebee.com/b7036b25

Here is the linked one

http://sharebee.com/5fa3325d

Linked file is called immediately from the main file and it starts playing first.

allak
2nd June 2009, 16:30
-Internal MKV splitter should read mpeg2 streams without the need for an explicit decleration of the CodecPrivate value(which the latest svn build of mkvmerge now always writes).

Could one of the developers test the following patch ?

It's a million to one chance, but it could possibly work ....


--- MatroskaSplitter.cpp.svn 2009-06-02 17:19:08.885292800 +0200
+++ MatroskaSplitter.cpp.allak 2009-06-02 17:23:57.152780800 +0200
@@ -299,13 +299,36 @@
}
else if(CodecID == "V_MPEG2")
{
+ // The CodecPrivate Matroska field shoud contain a copy of the first MPEG2 Sequence header
BYTE* seqhdr = pTE->CodecPrivate.GetData();
DWORD len = pTE->CodecPrivate.GetCount();
int w = pTE->v.PixelWidth;
int h = pTE->v.PixelHeight;

- if(MakeMPEG2MediaType(mt, seqhdr, len, w, h))
- mts.Add(mt);
+ bool flag = MakeMPEG2MediaType(mt, seqhdr, len, w, h);
+
+ if (! flag)
+ {
+ // Here we try a workaround if the seqhdr is missing or malformed
+ mt.majortype = MEDIATYPE_Video;
+ mt.subtype = MEDIASUBTYPE_MPEG2_VIDEO;
+ mt.formattype = FORMAT_MPEG2Video;
+
+ MPEG2VIDEOINFO* vih = (MPEG2VIDEOINFO*)mt.AllocFormatBuffer(sizeof(MPEG2VIDEOINFO));
+ memset(mt.Format(), 0, mt.FormatLength());
+ vih->hdr.bmiHeader.biSize = sizeof(vih->hdr.bmiHeader);
+ vih->hdr.bmiHeader.biWidth = w;
+ vih->hdr.bmiHeader.biHeight = h;
+
+ // We do not have any information, so we leave this blank
+ // We do hope that this case is handled gracefully downstream
+ // As far as I can tell, at least that those values are always
+ // checked for sanity
+ vih->dwSequenceHeader = NULL;
+ vih->cbSequenceHeader = 0;
+ }
+
+ mts.Add(mt);
}
else if(CodecID == "V_THEORA")
{

tetsuo55
2nd June 2009, 16:34
Could one of the developers test the following patch ?

It's a million to one chance, but it could possibly work ....


--- MatroskaSplitter.cpp.svn 2009-06-02 17:19:08.885292800 +0200
+++ MatroskaSplitter.cpp.allak 2009-06-02 17:23:57.152780800 +0200
@@ -299,13 +299,36 @@
}
else if(CodecID == "V_MPEG2")
{
+ // The CodecPrivate Matroska field shoud contain a copy of the first MPEG2 Sequence header
BYTE* seqhdr = pTE->CodecPrivate.GetData();
DWORD len = pTE->CodecPrivate.GetCount();
int w = pTE->v.PixelWidth;
int h = pTE->v.PixelHeight;

- if(MakeMPEG2MediaType(mt, seqhdr, len, w, h))
- mts.Add(mt);
+ bool flag = MakeMPEG2MediaType(mt, seqhdr, len, w, h);
+
+ if (! flag)
+ {
+ // Here we try a workaround if the seqhdr is missing or malformed
+ mt.majortype = MEDIATYPE_Video;
+ mt.subtype = MEDIASUBTYPE_MPEG2_VIDEO;
+ mt.formattype = FORMAT_MPEG2Video;
+
+ MPEG2VIDEOINFO* vih = (MPEG2VIDEOINFO*)mt.AllocFormatBuffer(sizeof(MPEG2VIDEOINFO));
+ memset(mt.Format(), 0, mt.FormatLength());
+ vih->hdr.bmiHeader.biSize = sizeof(vih->hdr.bmiHeader);
+ vih->hdr.bmiHeader.biWidth = w;
+ vih->hdr.bmiHeader.biHeight = h;
+
+ // We do not have any information, so we leave this blank
+ // We do hope that this case is handled gracefully downstream
+ // As far as I can tell, at least that those values are always
+ // checked for sanity
+ vih->dwSequenceHeader = NULL;
+ vih->cbSequenceHeader = 0;
+ }
+
+ mts.Add(mt);
}
else if(CodecID == "V_THEORA")
{

Thanks a lot, i hope Casimir or any of the other dev's accept it and add it to SVN

allak
2nd June 2009, 16:42
BTW, it would be much better to do as suggested by Mosu, i.e., try to get the first sequence header from the MPEG2 stream and use it here.

But that would mean that we should put in the Matroska splitter the knowledge to parse an MPEG2 stream, which is non obvious to me and in any case would be clearly overkill.

Snowknight26
2nd June 2009, 16:48
I can confirm the playback stuttering with DXVA enabled for H.264 videos.

Here's my infamous Tiesto Blu-ray sample: http://stfcc.org/misc/00000.cut.m2ts

The crackling audio upon seek is still there by the way.