Log in

View Full Version : LAV Filters - DirectShow Media Splitter and Decoders


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 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511

nevcairiel
12th March 2011, 10:34
This is a big one as many user here all chasing the "best" possible video and audio output. The only solution I see at present (till there is a DTS-HD freeware decoder) is for the muxer or audio decoder to call the Arcsoft HD Audio decoder. Hope you can think of something "clever" with this as Blu-ray content seems to favour this flavour of Audio Encoding....


Decoding all DTS with the ArcSoft decoder is pretty close to "best" that you can get.
I'll have options in LAV Audio sooner or later to disable decoding of supported formats, so it can skip to another decoder, but at least in MPC-HC removing the DTS type from LAV Audio will already make it ignore it and use another one.

bjd
12th March 2011, 10:56
I tried to find some easy way to tag these streams somehow, so you know its the sub-stream of the TrueHD track, but no luck yet.

I don't think this is an issue that you should be really looking at as it is the splitter's job to send the audio decoder the correct media and type. Your splitter correct splits truehd and I can decode it with either LAV audio or the Arcsoft Decoder (if I wanted to - I don't: LAV all the way).

From what I can tell and I may be wrong, not only does the Mpc-HC Mpeg splitter identify Bluray type TrueHD/AC3 as AC3 MediaType, but it does not actually split the interleaved files and in effect sends two audio streams to the audio decoder, and the only filter that can work with this is FFDshow Audio presumably because it has been patched to split the combined stream, when really the splitter should be doing this.

Decoding all DTS with the ArcSoft decoder is pretty close to "best" that you can get.

Absolutely, get the right version and you should have untouched full 24 bit audio

nevcairiel
12th March 2011, 11:45
From what I can tell and I may be wrong, not only does the Mpc-HC Mpeg splitter identify Bluray type TrueHD/AC3 as AC3 MediaType, but it does not actually split the interleaved files and in effect sends two audio streams to the audio decoder, and the only filter that can work with this is FFDshow Audio presumably because it has been patched to split the combined stream, when really the splitter should be doing this.

Thats 100% correct, and thats also the reason why TrueHD does not work when usign the MPC-HC Mpeg Splitter with LAV Audio.

jmone
12th March 2011, 12:42
Decoding all DTS with the ArcSoft decoder is pretty close to "best" that you can get.
I'll have options in LAV Audio sooner or later to disable decoding of supported formats, so it can skip to another decoder, but at least in MPC-HC removing the DTS type from LAV Audio will already make it ignore it and use another one.

Agreed but in JR Media Center we can only select filters by file type. So if I select LAV it will grab all everything including DTS-MA, I need to be able to push this to the Arcsoft decoder somehow.

nevcairiel
12th March 2011, 12:44
That wouldn't be a problem if you can just turn off DTS in LAV (like you will be, eventually), then the second decoder would be activated, being ArcSoft HD if configured properly.

bjd
12th March 2011, 13:22
Agreed but in JR Media Center we can only select filters by file type. So if I select LAV it will grab all everything including DTS-MA, I need to be able to push this to the Arcsoft decoder somehow.

I took a quick look at this, you can select multiple audio filters, but the player seems to ignore the filter merit when building the graph and ignores the arcsoft decoder even if its merit is higher then LAV which kind of makes it difficult control

noee
12th March 2011, 13:27
What if you select no audio filters under the "Other Filters"? At that point, it should fall back on merit.

Ger
12th March 2011, 17:35
@nev
I see you changed some splitter registry stuff yesterday. Maybe you'll consider one more, namely adding the .3gp file extension. I guess the MP4 section in dllmain.cpp would be the appropriate place?

To be able to use LAVS for mp4/mov I keep the internal MPC-HC splitter disabled now, since the external filter prefer option is broken for splitters. Since LAVS doesn't pick up .3gp files an old Arcsoft MP4 splitter is loaded on my system (don't even remember where it came from) and it breaks AR and audio. I guess I could work around that by registering the working Gabest splitter externally with a merit somewhere between LAVS and Arcsoft MP4, but because of the test below the simplest solution may just be adding the extension to LAVS, unless there is a reason to keep it out, other than being untested.

I tried playing a 3GP clip with MPEG-4 video and AMR mono audio (recorded on a cheap Nokia phone) using GraphStudio; your splitter and audio decoder both seemed to work fine, reporting "amrnb" for audio codec name, I guess nb is "Narrow Band" according to MediaInfo. Video appeared to have proper AR. Audio to center channel sounded OK.

nevcairiel
12th March 2011, 18:34
The extension alone doesn't really do anything, its just there if i ever want to do something with it .. Its all in the byte markers. Guess i'll look for some 3gp files to get markers from.

Edit: according to wikipedia, it should have a ....ftyp marker, which i already have setup. You sure it doesn't work? :)
But then again, MP4 has no "real" marker, it just starts with a atom, and if thats one that i do not listen for .. oh well.

Do you happen to have a small file somewhere?

Edit2:

I actually downloaded a couple of 3gp files from random places over the web, and they all open fine in MPC-HC using LAV Splitter.
All start with the ftyp marker. ftyp3gp to be precise.

Ger
12th March 2011, 18:57
OK. I thought the extensions listed there was what counted.

Only works in GraphStudio for me. Even if I block the Arsoft splitter in MPC-HC it's still used when the internal splitter is disabled, but maybe the blocking is broken for splitters as well.

Is this enough? "ftyp3gp5" from the header, viewing the file in a text viewer.

I'll see if I can upload something soon.

nevcairiel
12th March 2011, 18:59
Its a typical ftyp header (I assume 4 unreadable bytes before it), those should work just fine already.
Did you re-register the splitter recently? I upped its merit, and it should go above all other splitters now.

And yeah, blockign is broken for splitters, too. The whole external filter list has no purpose for source filters.
I wanted to do something about that ..

No need to upload a sample, then.

nevcairiel
12th March 2011, 19:04
Oh, one thing that i just rememberd, the extensions listed there do have one purpose. They are used to delete static extension assignments, so the byte markers and the merit system are being used.

You can delete that manually if you go to HKCL\Media Type\Extensions and get rid of the .3gp key. (for 32-bit on 64-bit windows, add a Wow6432Node after HKCL)

Ger
12th March 2011, 19:16
Yup. Deleting the .3gp key did the trick. Plays in MPC-HC with LAVS/LAVA now.

I guess my initial request is "accidentally" still valid then. Adding the 3gp extension. :)

nevcairiel
12th March 2011, 19:17
I guess my initial request is "accidentally" still valid then. Adding the 3gp extension. :)
Its been done.

bjd
12th March 2011, 19:26
Agreed but in JR Media Center we can only select filters by file type. So if I select LAV it will grab all everything including DTS-MA, I need to be able to push this to the Arcsoft decoder somehow.

You could try disabling dts in LAV audio by hex editing LAVAudio.ax filter and replacing "33806DE046DBCF11B4D100805F6CBBEA","0120000000001000800000AA00389B71" and "4323BCAFCB3D47409655E1E62A61B1C5" with "00000000000000000000000000000000"

That should allow the Arcsoft to do DTS assuming you don't have any other DTS decoders on your system.

Ger
12th March 2011, 19:31
Its been done.
You work too fast for me. I should have known to check the git log again before posting that. ;)

nevcairiel
12th March 2011, 21:31
And yeah, blockign is broken for splitters, too. The whole external filter list has no purpose for source filters.
I wanted to do something about that ..

MPC-HC revision 2973 will now respect manual merits, preferrred or blocked status configured in the External Filter list for source filters. Adding an unregistered source filter through that panel remains dysfunctional, however.

Ger
12th March 2011, 21:34
Cool. :thanks:

madshi
12th March 2011, 23:12
MPC-HC revision 2973 will now respect manual merits, preferrred or blocked status configured in the External Filter list for source filters.
That's an important improvement, IMHO. Thank you.

jmone
14th March 2011, 06:22
You could try disabling dts in LAV audio by hex editing LAVAudio.ax filter and replacing "33806DE046DBCF11B4D100805F6CBBEA","0120000000001000800000AA00389B71" and "4323BCAFCB3D47409655E1E62A61B1C5" with "00000000000000000000000000000000"

That should allow the Arcsoft to do DTS assuming you don't have any other DTS decoders on your system.

Thanks bjd - it is ugly but it works. In J.River MC I now have LAV as the prefered Audio Decoder but Hex Edited above, and the Arcsoft HD Audio decoder which is registered takes over.

nevcairiel - any thoughts on your pondering on this one?

nevcairiel
14th March 2011, 07:57
I'll offer configuration to control which formats it'll accept, but i don't know when i'll implement that.

bjd
14th March 2011, 10:08
Thanks bjd - it is ugly but it works

Yes it is ugly and dirty and aplogies to Hendrik for hacking his filter.

It is just a shame that the JJ Media software with so many features falls down on filter customisation.

jmone
14th March 2011, 11:17
Yeah - there has been a push for filter selection by stream type VS filetype in JR MC but .... at the end of they day, I've now got full bitrate/bitdepth decoding of all Audio with LAVAudioDecoder + TMT for DTS-MA with direct show filters. :). Hendrik's config option will make it "easer" but the ultimate solution is when/if full DTS-MA decoding support is included in ffmpeg (but I'm not holding my breath).

tetsuo55
14th March 2011, 11:40
@All

I have been trying to find bug-tickets over at FFmpeg, things are kind of unstable over there, but i have not been able to find any tickets regarding the non-working features such as DTS-HD, DTS-26/96 and Ordered chapters.
I can imagine DTS-HD tickets being closed with "completely unsupported" but the mkv problems are missing features of otherwise correctly implemented formats.

The best chance of getting things like these added is to provide a very (and i cannot stress the very enough) accurate and complete ticket that shows in detail how and why ffmpeg (using ffplay) currently fails to correctly play the file and why it should be able to (prove its not a hacked of malformed file), including small samples that clearly show the problem. From what i saw tickets that where actually submitted where fixed quite quickly for related issues in the past.

pankov
14th March 2011, 19:00
I was one of the users that reported that ordered chapters (different "versions" of the movie - Extended/Theater) are not working with LAVSplitter but sadly I have absolutely no knowledge in ffmpeg/ffplay or mkv authoring so I apologize that I won't be able to provide such short samples or a way to create them.
:(

Ger
14th March 2011, 19:37
I haven't tried it, but maybe this (http://forum.doom9.org/showthread.php?t=160027) can help?

Virtual_ManPL
14th March 2011, 19:55
Some update, because stable (not beta anymore :)) Microsoft Visual C++ 2010 SP1 is available.

Redistributable Packages:
Microsoft Visual C++ 2010 SP1 Redistributable Package (x86) (https://www.microsoft.com/downloads/en/details.aspx?FamilyID=c32f406a-f8fc-4164-b6eb-5328b8578f03)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) (https://www.microsoft.com/downloads/en/details.aspx?FamilyID=c68ccbb6-75ef-4c9d-a326-879eab4fcdf8)



Can someone reproduce this issue ? Or it's just problem on my end. I get more and more frame dropping in some files with LAVFSplitter
BUG #31 - Frame dropping in some certain files (https://github.com/Nevcairiel/LAVFSplitter/issues#issue/31)

robpdotcom
14th March 2011, 20:14
I'll post some ordered chapter and segment linking samples later today.

Ger
14th March 2011, 20:29
Can someone reproduce this issue ? Or it's just problem on my end. I get more and more frame dropping in some files with LAVFSplitter
BUG #31 - Frame dropping in some certain files (https://github.com/Nevcairiel/LAVFSplitter/issues#issue/31)

I actually tried that sample the other day, but I still haven't gotten around to signing up at github :o, so I didn't comment yet.

It seems to me that this is one of these VFR (Variable Frame Rate) (http://forums.animesuki.com/showthread.php?t=34738) files. If you look at the EVR Custom stats (CTRL-J) in MPC-HC it seems to try to lock at a whopping 359.635 Hz when LAV Splitter is used with EVR Custom. This seems to choke the internal decoder (i.e. drops almost all frames) when EVR Custom's Vsync is enabled (can be disabled with the v key).

With the internal Matroska splitter the stats show more sensible values, and you can see the FrameR value lock at 29.970 then suddenly change to 23.976 or to 25.000 during playback.

So yes, I can reproduce if the right combination of splitter/decoder/renderer is used.

nevcairiel
14th March 2011, 20:44
I'm grabing a VFR sample, maybe there is something trivial to fix this..

nevcairiel
14th March 2011, 21:16
I'm grabing a VFR sample, maybe there is something trivial to fix this..

Looks like the frame rate switch confuses ffmpeg, not sure if there is something easy to do. I'll look into it. For the time being, use ffdshow, it seems to deal with it properly.

robpdotcom
14th March 2011, 22:10
@tetsuo55:

Here are samples of three different methods of ordered chapters and segment linking. They are short audio clips, with no video - but they work the same.

http://www.megaupload.com/?d=2UA3LAHF

Sebastiii
15th March 2011, 09:56
Hi,

I have adapt a old patch for ordered chapter : Ordered Chapter Patch (http://www.mediafire.com/?9682jos8z4lrv4n)
Not working 100% but maybe a start :)
Seb.

nevcairiel
15th March 2011, 11:41
The patch is really ugly, mostly because it trys to implement segment linking and ordered chapters in one go, instead of implementing one of the features first, and the other later.

Sebastiii
15th March 2011, 14:58
Thanks, Nevcairiel,
Yep, it would be nice to make it good and separate in 2. I can try but not sure to achieve it.
Seb.

hoborg
16th March 2011, 10:18
@nevcairiel:
Thanks for your work on LAVF. I did some fast tests with .18 and lot of issues a had are gone. What i found:

- Some MPEG-1 MPG samples won't open, fall back to "MPEG-I Stream Splitter".
EDIT: Fixed after added .MPG to registry
- if i try to play WAV with DTS inside, it wont play correctly
EDIT: it happend with all *.DTS files.
- some FLV play at wrong speed (old issue)

Samples can be found here (http://hobring.esero.net/saf/lavf/).

Some feture requests:
- FFDshow alow map keyboard shotrcuts to change audio/subtitles streams. I am using this im my HTPC - i maped my remote controler to this shortcuts, so i can change audio/subtitles tracks on thy fly by remote in any DirectShow based players. Something like this will be usefull in LAVF too.
- what about modify registry durning "LAVSplitter.ax" registration? For example i must added .MKV and other extensions to registry (HKEY_CLASSES_ROOT\Media Type\Extensions\) with LAVF source CLSID "{B98D13E7-55DB-4385-A33D-09FD1BA26338}". For example DC-Bass Source Filter (http://www.free-codecs.com/download/DC-Bass_Source_Filter.htm) doing it automatically durning registration. There is ini file with definition what should be registered and what not. Very usefull i think.

nevcairiel
16th March 2011, 10:23
- FFDshow alow map keyboard shotrcuts to change audio/subtitles streams. I am using this im my HTPC - i maped my remote controler to this shortcuts, so i can change audio/subtitles tracks on thy fly by remote in any DirectShow based players. Something like this will be usefull in LAVF too.

Thats something a player should offer, not a DirectShow filter.

- what about modify registry durning "LAVSplitter.ax" registration? For example i must added .MKV and other extensions to registry (HKEY_CLASSES_ROOT\Media Type\Extensions\) with LAVF source CLSID "{B98D13E7-55DB-4385-A33D-09FD1BA26338}".
Registering extensions is not required. What LAV Splitter does is actually delete extension assignments when its registered, so the proper byte-marker and merit system gets used.

The only downside is that it won't work on broken files, because the byte-marker is not correctly present there (see your .mpg problem)

If i write a proper installer some day, it'll probably allow doing the extension hookups, but the filter itself won't.

hoborg
16th March 2011, 10:35
nevcairiel:

Thanks for info. I just noticed it is still posible to change audio/subtitles streams in FFDshow, so no problem here, that is good :)

I don't know why, but on my machine i must added some extension to registry to be able open my samples in Graphstudio. At last for MKV, FLAC, MOV. But maybe simple restart will help to make merrit change working.

Again, good work!

nevcairiel
16th March 2011, 10:36
I don't know why, but on my machine i must added some extension to registry to be able open my samples in Graphstudio. At last for MKV, FLAC, MOV. But maybe simple restart will help to make merrit change working.

This should be better in the next version, i changed some stuff around that fixed the problem in GraphStudio for me.

Sebastiii
16th March 2011, 10:41
Thanks Nevcairiel :)
Seb.

hoborg
16th March 2011, 11:31
@nevcairiel:
One more question - there was a discussion about audio passthrough.
If i am not wrong, you wrote you want to add it in to splitter, so there will be splitter - audio renderer connection.
But what about DVD playback? Do you have plan to use LAVF even as an DVD navigator filter - is that possible?
Becouse if there will be MS DVD Navigator -> LAVF audio decoder -> audio renderer connection, it will be not possible to passthrough DTS/AC3 audio, right?

nevcairiel
16th March 2011, 11:34
I have no plans to write a DVD Navigation component. And yes, thats right, you won't be able to do audio passthrough if you're not using LAV Splitter. I just don't see a reason to include another filter in the graph, and get a headache from the DirectShow interaction, if i could just do the muxing into SPDIF/HDMI format in the splitter.

When i start developing it, i might still change my mind, but thats the plan for now.

Sebastiii
16th March 2011, 20:26
Hi,

I have try to separate ordered from linked Matroska file patch.
So this is a sample within 3 editions.

Sample with 3 edition in it and xml file for mkvmerge (http://www.mediafire.com/?7qqdi1jscp8wt37)

Edition 1 : 0:00 to 0:25
Edition 2 : 0:00 to 0:35
Edition 3 : 0:00 to 0:55

This is the binary for testing and the patch against last git LAV.
LIBAV Patch Ordered (http://www.mediafire.com/?3bu8axa19jkxf1o)
LAVSplitter_Ordered_Only (http://www.mediafire.com/?2pcqu4q21hb3apy)

We can jump between edition with Chapter menu.
But the file the result is not like we want because we have all edition one after the other and not only the one we selected.

So here the total lenght time is 01:55, and i don't know if it's on splitter side to detect Edition and only display the current edition or if it's on ffmpeg side :)

Maybe also an help is to look on ffmpegsource that use haali part of code (and maybe edition code).

EDIT : Another patch some cleanup : Ordered-Chapter-for-libav-more-cleanup (http://www.mediafire.com/?e20dmm6lzez97zp)

Cheers,
Seb.

jmone
17th March 2011, 04:54
Hi Nevcairiel - I think we touched on this once before but, here is a link to an mpg file (MPEG2/PCM - http://www.megaupload.com/?d=9VZWU96N ) that according to LAV Splitter has a "PCM_S16BE, 48000Hz, 2 channels, s16, 1536kb/s" audio track. Trouble is there is neither a Audio Decoder or Renderer is being loaded (so you either get no sound, or bursts of static).
Thanks
Nathan

jmone
17th March 2011, 05:13
Another one - There is a thread on the JRMC board I started with an issue on random crashes that seems to be related to the LAV Splitter - sample file and more in this thread: http://yabb.jriver.com/interact/index.php?topic=62956.msg422321#msg422321

nevcairiel
17th March 2011, 08:30
Hi Nevcairiel - I think we touched on this once before but, here is a link to an mpg file (MPEG2/PCM - http://www.megaupload.com/?d=9VZWU96N ) that according to LAV Splitter has a "PCM_S16BE, 48000Hz, 2 channels, s16, 1536kb/s" audio track. Trouble is there is neither a Audio Decoder or Renderer is being loaded (so you either get no sound, or bursts of static).
Thanks
Nathan

LAV Audio Decoder should load for all audio codecs if its used with LAV Splitter. I would guess your DTS hacking disabled that feature, because without you wouldn't be able to block DTS. ;)

In any case, i can wire the BE PCM to the appropriate QT PCM Types (only Mediatypes i know for BE PCM, if there are others, let me know. :p)

jmone
17th March 2011, 09:08
Mmmm you are of course correct, the DTS hack is what has stuffed this up! Replaced my hacked LAVAudio.ax with the "pure" one and it loads for these files just fine. I have a feeling I should wait to see what develops over time :)

jmone
17th March 2011, 23:03
nevcairiel - you may be interested in some quotes from the JRMC forum (if you have not come across it already) in your consideration of how to handle DTS-HD and it's relative importance....

Quote from: jmone on Today at 09:24:33 am
FYI - The growth of the use of DTS-HD is been staggering with over 50% of all Blu-ray discs every released now having DTS-HD http://www.blu-raystats.com/Stats/Stats.php. I really don't see many new releases with any other Audio Codec for the primary track (I wonder what deal they have done).

author=mojave link=topic=62784.msg422490#msg422490 date=1300398257]
It was mentioned in a thread at HomeTheaterShack back in November that DTS had signed a deal to have DTS-HD on all (or almost all) new releases going forward. In releases in 2011, TrueHD has only been on 17 titles (9.94%). This dropped to 7.35% for Feb and 5.26% (only 2 titles) for March.

nevcairiel
17th March 2011, 23:06
There is nothing i can do. You install the ArcSoft decoder, you get DTS-HD decoding. Thats all thats to it.

TBH, 90% of people don't have a sound system anyway where they would hear the difference between DTS Core and DTS-HD.

tetsuo55
17th March 2011, 23:14
There is nothing i can do. You install the ArcSoft decoder, you get DTS-HD decoding. Thats all thats to it.

TBH, 90% of people don't have a sound system anyway where they would hear the difference between DTS Core and DTS-HD.
Here is a "review" of the various audio formats included on bluray discs, in what you could say are the best possible ABX circumstances with what i can only guess are the most high end speakers possible.
Even in this situation the difference in sound quality subjectively was rated at 4% between the worst and best sounding formats http://www.hemagazine.com/node/Dolby_TrueHD_DTS-MA_versus_Uncompressed_PCM

It sounds probable that only those with a professionally calibrated listening area and very high quality speakers will be able to detect core vs dts-hd in a double-blind-ABX test. And even then you need to know what to look for in the sound.

---

Also keep in mind, that the lossless audio tracks can losslessly be converted, although this will not help for playback from bluray disc.
I've heard that some flac encoders can create smaller files than the dts-hd track itself.