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

andyvt
14th May 2011, 17:34
Anyhow, if decoding does not work, its basically the same issue the MPC-HC MPEG splitter has, except that the MPC-HC one additionally sends the wrong media type. :p
I will have to write my own parser to separate the TrueHD frames from the AC3 frames in those streams .. i'll get to it eventually, its somewhere on the list..

They changed their demux to parse out the AC3 and it's working great now with M2TS. Thank you again for working on this.

Is there a "buy Nevcairiel a beer" link somewhere?

Andy o
14th May 2011, 18:04
nevcairiel

Thanks for LAV!

Still can not play dts hd ma 2.0 audio in mkv http://www.multiupload.com/FJ7YOCNC6M
MPC+LAV splitter+LAVaudio (bitstream) + system renderer= static noise when switching audio tracks
MPC+Halii+LAVaudio (bitstream) + system renderer= OK
MPC+LAV splitter+LAVaudio (bitstream) + Audio Switcher + system renderer= OK

And if I remux everything in .ts, I have the same issue.

Sample plays OK here, switching between audio tracks w/ LAV audio and splitter.

nevcairiel
14th May 2011, 18:30
nevcairiel

Thanks for LAV!

Still can not play dts hd ma 2.0 audio in mkv http://www.multiupload.com/FJ7YOCNC6M
MPC+LAV splitter+LAVaudio (bitstream) + system renderer= static noise when switching audio tracks
MPC+Halii+LAVaudio (bitstream) + system renderer= OK
MPC+LAV splitter+LAVaudio (bitstream) + Audio Switcher + system renderer= OK

And if I remux everything in .ts, I have the same issue.

Thats an interesting problem, the audio renderer seems to just connect to the splitter, and accept the still encoded audio..

Maybe i can change the stream switching a bit to make this better..
The problem is that the DirectShow graph renderer will always try to avoid adding new filters to the graph, so if the renderer accepts it, no matter with how low merit .. it'll use it.

There is no perfect way to solve this, but i can try some things.
What the other Splitters do is, they just reuse the old decoder, and do not allow you to change the decoder for different streams, thats why there are no problems.
Sadly, DirectShow really does not have the capability to do this flawlessly, unless i delete the whole audio chain .. i can certainly try that, but i don't think its pretty.

Just keep the audio switcher running, for now.

andyvt
14th May 2011, 18:56
Thats an interesting problem, the audio renderer seems to just connect to the splitter, and accept the still encoded audio..

Maybe i can change the stream switching a bit to make this better..
The problem is that the DirectShow graph renderer will always try to avoid adding new filters to the graph, so if the renderer accepts it, no matter with how low merit .. it'll use it.

There is no perfect way to solve this, but i can try some things.
What the other Splitters do is, they just reuse the old decoder, and do not allow you to change the decoder for different streams, thats why there are no problems.
Sadly, DirectShow really does not have the capability to do this flawlessly, unless i delete the whole audio chain .. i can certainly try that, but i don't think its pretty.

Just keep the audio switcher running, for now.

Couldn't you check the downstream filter and refuse the connection if it is a registered renderer?

Andy o
14th May 2011, 18:57
Oh, I had the audio switcher enabled, sorry. Is there a reason to disable it, though? I've always had it enabled but all its options disabled.

nevcairiel
14th May 2011, 19:05
Oh, I had the audio switcher enabled, sorry. Is there a reason to disable it, though? I've always had it enabled but all its options disabled.

Well there is no reason to keep it enabled, either.

Anyhow, removing all audio related filters from the graph (including the renderer) seems to work, at least in MPC-HC. It'll build a completely new audio graph, which includes the proper decoder.
This kind of graph rebuilding is required for Blu-ray title switching anyway, so its a good start to test some things, i guess. :)

I'll throw a quick UI option on there to help debug any possible failures caused by this.

nlnl
14th May 2011, 19:34
There is no perfect way to solve this, but i can try some things.
What the other Splitters do is, they just reuse the old decoder, and do not allow you to change the decoder for different streams, thats why there are no problems.
Sadly, DirectShow really does not have the capability to do this flawlessly, unless i delete the whole audio chain .. i can certainly try that, but i don't think its pretty.

Just keep the audio switcher running, for now.

Thanks!

May this is one more reason to start developing LAV audio renderer (wasapi based) :).
It would not reply to graph rebuilder that it accepts DTS HD MA :)

Gleb Egorych
14th May 2011, 21:02
Unless you can produce one specific sample, there isn't anything i can do.
I PMed sample file to you.

Besides, just use LAV. :)
I do :).
BTW I compared speed of seeking of LAV Source and Haali Splitter. When I make a seeking to a random position of a file, sound changes almost instantly (like with Haali) while video starts playing from the new position with a delay. This delay is noticeably higher than with Haali. The same behaviour for different containers (MP4, MKV, TS) and different decoders.

nevcairiel
14th May 2011, 21:22
At least with MKV, you can use cue-point seeking, which will sacrifice accurate seeks, but should give you faster seeks. However, your player needs to support it, read the cue-points from the splitter, and redirect any seeks to those. Maybe Haali forces seeks to those points, i really didn't test much with Haali.

Sadly, seeking to keyframes without cue points is currently not easily possible. :(
The seek API in ffmpeg is really lacking.

However, people are supposed to watch stuff, not seek to stuff. ;)


BTW, with AVI Splitter you mean the MS one, not the MPC-HC/Gabest one, right?

Gleb Egorych
14th May 2011, 21:47
Thanks for the explanation.

BTW, with AVI Splitter you mean the MS one, not the MPC-HC/Gabest one, right?
Yes, MS one from quartz.dll.

nevcairiel
14th May 2011, 21:47
So before i move myself to the couch for some TV enjoyment, here a quick new build.

http://files.1f0.de/lavf/LAVFilters-0.25-51-g2a551ca.zip

Highlights this time around:
- A more aggressive approach at stream switching, as outlined a few posts above. All components downstream from the LAV Splitter audio pin will be removed, and should be re-created by a graph builder. Only tested in MPC-HC, works perfectly there. Can be turned off in the settings.
- The A/V sync adjustments got an option to turn it off for debugging
- Improvements to the ArcSoft decoder interface

@Gleb Egorych:
I did some changes, and couldn't reproduce any crashes anymore, but it was pretty hard to reproduce them in the first place, so if you could try as well, that would be great.

jmone
14th May 2011, 22:21
Some very odd impact in MC16 if the stream switching "agressive approach" is enabled (I'd suggest it is turned off by default at this stage!)
1) On BD playback (and some TS) the std Default DirectShound drivers is loaded (turning it off and the J.River renderer is reloaded)
2) On BD playback if you switch from a DTS-HD (using Arcsoft) to say DD (using avcodec) then it plays through at hyper speed (whole disc in seconds)
3) Got a few MC16 crashed with random sample files, or it will advance to the next file

nevcairiel
14th May 2011, 22:46
As mentioned before, this kind of graph rebuilding is required for Blu-ray title switching, or at least it would make it significantly easier.
Sadly, lots of players do not implement DirectShow graph building properly. They manually build a graph, but if any graph changes occur initiated by a component outside of their control, all hell breaks loose.

On players where the aggressive mode does not work, the advanced Blu-ray features will most likely not work either.

fps
14th May 2011, 23:06
Secret tip for ArcSoft Audio decoder: Use the ASAudioHD.ax from TMT3, and the dtsdecoder.dll from TMT5 - the TMT3 .ax allows full 24-bit/96khz output (the TMT5 version doesn't, for some reason), and the new dtsdecoder fixes some bugs. :)


- The ability to use the ArcSoft dtsdecoder directly through LAV Audio, just drop "dtsdecoderdll.dll" in the LAV Audio directory, and lean back for full DTS-HD enjoyment. On the LAV Audio status page, the ffmpeg decoder is called "dca", and the ArcSoft decoder is called "dts" (or postfixed with the profile), so you can see if its active.
Just to clear things up, do I still need to use the combination of ASAudioHD.ax from TMT3 and the dtsdecoder.dll from TMT5 to get full 24-bit/96khz output (just register the ax and put the dll in the LAV folder, I guess?)?

jmone
14th May 2011, 23:07
Thanks - opened up a topic in the MC16 beta board on support for Blu-ray title switching in general

jmone
14th May 2011, 23:08
Just to clear things up, do I still need to use the combination of ASAudioHD.ax from TMT3 and the dtsdecoder.dll from TMT5 to get full 24-bit/96khz output (just register the ax and put the dll in the LAV folder, I guess?)?

No need to register anything, use checkactivate, the "wrapper", edit win.ini..... all you need to do is drop just the dtsdecoder.dll (pref from TMT5) into your LAVAudio install folder :)

Portioli
14th May 2011, 23:08
i love this screenshot

http://i.imgur.com/A90f2.jpg

CiNcH
14th May 2011, 23:15
What are common media subtypes for True HD and DTS-HD?

nevcairiel
14th May 2011, 23:21
To expand on the previous comment, and explain why stream switching is such a problem.

The main issue is that i want to allow changing the decoder when you switch the stream.
If i were to do it like the MPC-HC splitter, or Haali, a stream switch would just mean clearing the buffers, and sending a new media type. This is easy, and works flawlessly in nearly every player. This is how its done if you switch the video stream, because video decoders are most of the time not really happy about being dumped from the graph mid-playback (and files usually don't contain video tracks of different codecs).

Now, if you want to switch the decoder, you actually have to remove the old decoder from the graph first.
- The old way: I stop the graph, remove the decoder, and instruct DirectShow to render the graph again, which will cause it to fill in the gaps to make a connection. This has, however, one downside. It will first try to make due without a new decoder, so if the existing filters accept the output type of the splitter, it'll just form a direct connection. In the case of some audio renderes, this is particularly bad, as they accept those types without really supporting them (connecting DTS and FLAC directly to the renderer, not working too good)
- The new (aggressive) way: I stop the graph, and i remove the decoder, and in addition, i remove the filter that was connected to the decoder, and any filters after that, including the renderer. This way i avoid the whole direct connection issue, because the graph builder has to start from scratch. If the player properly implements its own graph building interface (like MPC-HC does), it'll create a perfect graph.

Sadly, there is no way that "just works" with every player. DirectShow was not meant to be used like this. Even the old way has its issues, if for example the player inserts a filter between splitter and decoder, maybe a bitrate monitor, or who knows what.

One thing i can do, i can try to force the graph builder to insert a new filter in the chain when doing it the "old" way, by simply denying connection to the downstream filter that came after the decoder.

Considering LAV Splitter is the only commonly used splitter that lets you switch decoder, is that really worth all the trouble?
For me it isn't. I only use LAV Audio.

PS:
A "good" solution to the whole problem would be pretty simple.
- LAV Splitter creates one output pin for every stream, and connects the appropriate decoders.
- There is an extra stream switching filter, that sits between all the decoders, and the renderer.
- When you switch streams, you'll tell the stream switching filter, and it'll tell LAV Splitter. That way all the pins are connected, but only the active one produces data to be decoded.

Sadly, this basically requires player support.

nevcairiel
14th May 2011, 23:23
Just to clear things up, do I still need to use the combination of ASAudioHD.ax from TMT3 and the dtsdecoder.dll from TMT5 to get full 24-bit/96khz output (just register the ax and put the dll in the LAV folder, I guess?)?

Just the dtsdecoderdll.dll, nothing else. No hacks, no tricks, no complicated setup. Just drop the dll in the folder.
The versions from TMT3 should work as well, for most content, but the newer the better, i guess.

fps
14th May 2011, 23:34
No need to register anything, use checkactivate, the "wrapper", edit win.ini..... all you need to do is drop just the dtsdecoder.dll (pref from TMT5) into your LAVAudio install folder :)

Just the dtsdecoderdll.dll, nothing else. No hacks, no tricks, no complicated setup. Just drop the dll in the folder.
The versions from TMT3 should work as well, for most content, but the newer the better, i guess.

Thanks for the clarification! :)

Mark_A_W
15th May 2011, 01:58
Why not use DPLIIx for 5.1 content? I'm using it and it works fine.

Because the ffdshow implementation converts Stereo to 5.1.

I want to convert 5.1 to 7.1.


I've not been able to get ffdshow to do that using DPLIIx. Am I missing something?

Mark_A_W
15th May 2011, 02:11
I only use LAV Audio.

PS:
A "good" solution to the whole problem would be pretty simple.
- LAV Splitter creates one output pin for every stream, and connects the appropriate decoders.
- There is an extra stream switching filter, that sits between all the decoders, and the renderer.
- When you switch streams, you'll tell the stream switching filter, and it'll tell LAV Splitter. That way all the pins are connected, but only the active one produces data to be decoded.

Sadly, this basically requires player support.


I'm down to two audio decoders, LAV Audio and madFLAC. I'm not sure if LAV Audio does FLAC, and if it's using ffmpeg as a base, then I think it's 16 bit only (hence the reason for madFLAC).

Blight seems responsive to requests, and ZP version 8 is not done yet (although it's close I think). And obviously the MPC-HC boys.

Or you could basically gut MPC-HC and build a slimline player with madVR/madFLAC/LAV Filters and Reclock. It would still need some directshow custom graph support*, as there are always quirks, but not the full internal filter package.

* For instance I use ffdshow audio (delays and mixer), then Convolver Wrapper (room correction) after the audio decoder. And I have to use Arcsoft video decoder for VC-1 EVO files directly off the HD DVD disc, as ffdshow video decoder won't connect. Quirks...

Andy o
15th May 2011, 02:12
Ah sorry, I think ffdshow doesn't do DPLIIx, only DPLII. I just assumed you were using HDMI for 7.1 audio, cause pretty much all receivers I've seen capable of 7.1 HDMI can do DPLIIx. Mine (Pioneer) can apply DPLIIx to 5.1 signals, and leave stereo alone. Are you using analog?

Mark_A_W
15th May 2011, 02:17
Ah sorry, I think ffdshow doesn't do DPLIIx, only DPLII. I just assumed you were using HDMI for 7.1 audio, cause pretty much all receivers I've seen capable of 7.1 HDMI can do DPLIIx. Mine (Pioneer) can apply DPLIIx to 5.1 signals, and leave stereo alone. Are you using analog?

Yup, analogue.

Direct connection from a Xonar HDAV 1.3 Deluxe (bought for 8 channel analogue only...annoying that I had to get all the HDMI rubbish, but that's the only top end 8 channel PCIe card)...

..to an active crossover then to Rotel power amps.

No receiver or preamp at all. The PC is the preamp. I miss out on some receiver based tricks, but I get 8 channel Digital Room Correction using Denis Sbragion's DRC software (free).

If I was doing it all again I probably wouldn't go this way, but that's how it grew.

Andy o
15th May 2011, 02:23
The Xonar doesn't have DPLIIx? My DX and U1 do, but the Xonar drivers are notoriously buggy.

Mark_A_W
15th May 2011, 02:53
The Xonar doesn't have DPLIIx? My DX and U1 do, but the Xonar drivers are notoriously buggy.


Nup. Every other Dolby related trick but the one that would be useful....

I use the Uni Xonar drivers, they work well.

Andy o
15th May 2011, 03:16
You sure? Cause I just tested with my DX and it does work. The thing is that it hides it if your input is 8 channel. Change it to 6 channels, and then your output to 7.1 speakers, and the DPLIIx option should appear. I'm on Windows 7 btw, if you're using XP it might be different.

Mark_A_W
15th May 2011, 03:47
Ha!! You're right!

I only ever leave it on 8 channels, so I've never seen that.

Wish they would make it automagic...


Thanks Andy :)

Andy o
15th May 2011, 03:53
And thanks for letting me know about the uni drivers. I'm gonna test my DX for the stereo expansion, but I only use it for Dolby Headphone anyway.

Maybe if you use WASAPI exclusive you won't need to change the channel input? I know Dolby Headphone doesn't get bypassed with WASAPI exclusive (except for stereo 96kHz), maybe DPLIIx doesn't get bypassed either?

Andy o
15th May 2011, 04:02
Anyway, back on topic, I have an mkv which LAV splitter reports as 29.97 to madVR, but ReClock sees it (correctly) at 23.976. If I use the MPC mkv splitter, it gets reported to madVR correctly as well. Remuxing with mkvmerge doesn't fix it. I'll see if I can cut up a clip.

EDIT: I think I see the problem, this is what mediainfo says:

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 37s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Original frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Writing library : x264 core 76 r1271 496d79d

skingery
15th May 2011, 04:25
So before i move myself to the couch for some TV enjoyment, here a quick new build.

http://files.1f0.de/lavf/LAVFilters-0.25-51-g2a551ca.zip



Trying this with a MKV rip of Star Wars Episode 2 from DVD. So this is mpeg 2 with AC-3. Using MPC-HC, LAV splitter, LAV audio bitstreaming and LAV CUVID.
When I start the file the audio is a second or so behind the video. I watched for a while to see if it would catch up and it didn't. It got too annoying so I stopped it and restarted MPC-HC and tried playing the same file (I have MPC-HC keep the location so it started at that spot) and it is all good now.


My HTPC is attached to my old Onkyo via S/PDIF, don't have HDMI audio yet.

Mark_A_W
15th May 2011, 04:49
Nev

I'm having an issue with the version you posted today (not sure if it's just this version).

When I use LAV Splitter for mkv files with FLAC audio, it insists on trying to load the LAV Audio decoder, giving an audio format not supported error. This is despite having madFLAC selected in Zoom Player for FLAC, and having the FLAC option unticked in the formats section of LAV Audio.

If I allow FLAC in LAV Audio, playback works, but with the "wrong" decoder (LAV).

If I change splitter, then madFLAC is loaded, as per the Zoom Player smart play settings.

So:

- LAV Splitter seems to be forcing LAV Audio, at least for me. I don't think it should force the matter.

- Is there any reason not to use LAV Audio for FLAC? Limited to 16 bit? Seems to be reporting 24 bit..

madshi
15th May 2011, 07:05
PS:
A "good" solution to the whole problem would be pretty simple.
- LAV Splitter creates one output pin for every stream, and connects the appropriate decoders.
- There is an extra stream switching filter, that sits between all the decoders, and the renderer.
- When you switch streams, you'll tell the stream switching filter, and it'll tell LAV Splitter. That way all the pins are connected, but only the active one produces data to be decoded.
But won't there be problems when having multiple active audio decoders? They all will want to connect to some renderer, won't they? So won't there be multiple audio renderers, too? I think only one of them can use WASAPI, correct? What if it's the wrong one that manages to grab WASAPI rights? Wouldn't there also have to be multiple Reclock instances?

If you can somehow fix all these issues, *and* if you can still properly support IAMStreamSelect, then I guess it would be ok with me. But I think I would still prefer the current logic.

nlnl
15th May 2011, 09:52
So before i move myself to the couch for some TV enjoyment, here a quick new build.

http://files.1f0.de/lavf/LAVFilters-0.25-51-g2a551ca.zip


nevcairiel

http://www.multiupload.com/FJ7YOCNC6M
MPC+LAV splitter (aggressive) +LAVaudio (bitstream) + system renderer= crash when switching audio tracks using A key, and =OK using menu (MPC or splitter) for switching.

nevcairiel
15th May 2011, 10:05
But won't there be problems when having multiple active audio decoders? They all will want to connect to some renderer, won't they? So won't there be multiple audio renderers, too? I think only one of them can use WASAPI, correct? What if it's the wrong one that manages to grab WASAPI rights? Wouldn't there also have to be multiple Reclock instances?

If you can somehow fix all these issues, *and* if you can still properly support IAMStreamSelect, then I guess it would be ok with me. But I think I would still prefer the current logic.

Thats where that extra stream switching filter comes in, basically a multiplexer that takes all decoders, and forwards only the active one to the renderer.
But yeah, its not a viable solution, unless a player fully supports this mode.

The problem with the current logic is that switching the decoder for different audio tracks is just not easily doable, especially with all the different players out there, all trying to be smart about graph building, and DirectShows graph building routines trying to be smart and skip decoders if possible..


- LAV Splitter seems to be forcing LAV Audio, at least for me. I don't think it should force the matter.

There is no code whatsoever that forces any decoder. Blame ZoomPlayer, its "smart play" is usually not so smart.


Trying this with a MKV rip of Star Wars Episode 2 from DVD. So this is mpeg 2 with AC-3. Using MPC-HC, LAV splitter, LAV audio bitstreaming and LAV CUVID.
When I start the file the audio is a second or so behind the video. I watched for a while to see if it would catch up and it didn't. It got too annoying so I stopped it and restarted MPC-HC and tried playing the same file (I have MPC-HC keep the location so it started at that spot) and it is all good now.
The Bitstreaming code does not yet use the new logic to check and correct A/V sync, i hope to add this in the future there as well, but it adds an extra layer of complexity.

Gleb Egorych
15th May 2011, 10:21
http://files.1f0.de/lavf/LAVFilters-0.25-51-g2a551ca.zip

.....

@Gleb Egorych:
I did some changes, and couldn't reproduce any crashes anymore, but it was pretty hard to reproduce them in the first place, so if you could try as well, that would be great.
Unfortunately, I reproduced crashes, on original file and on the small sample sent to you.
Problem signature:
Problem Event Name: APPCRASH
Application Name: zplayer.exe
Application Version: 8.0.0.0
Application Timestamp: 2a425e19
Fault Module Name: avcodec-53.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 4dcee988
Exception Code: c0000005
Exception Offset: 001cab01
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1049
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

There is another problem, seems to be related to LAV Audio. Before the latest build and now I sometimes get hang of Zoom Player when I try to exit the player. I thought it was related to source filter but now I got hang with LAV Audio only in the graph. So I guess it is related to LAV Audio Decoder.

Here is a screenshot of thread list of hanged player:
http://img811.imageshack.us/img811/7658/zphangonexitwithlavaudi.th.png (http://img811.imageshack.us/img811/7658/zphangonexitwithlavaudi.png)
Zoom Player has special "Guard dog" feature which restarts the player if hang is detected. Interestingly that in the case the feature does not work. Also while normal playing I can't see LAVAudio.ax thread in the thread list, guess it runs in player's thread or something like this. Other decoders have their own threads.

nevcairiel
15th May 2011, 10:26
An audio decoder does not need its own thread. It just takes the data it gets, decodes it, and sends it to the renderer. Adding a thread in the middle there would just add unnecessary overhead.

nevcairiel
15th May 2011, 10:53
@Gleb Egorych:

Here is a new one to try. I hope this time around it helps, at least in my mind the change i did this time would prevent the one crash i have been seeing.

http://files.1f0.de/lavf/LAVFilters-0.25-53-ge0ade4c.zip

CiNcH
15th May 2011, 11:14
Hmm, trying my luck once more...

Can anybody summarize the common media subtypes for the BD HD audio formats (TrueHD, DTS-HD, LPCM)?

Would be cool... thanks in advance :)

Mark_A_W
15th May 2011, 11:24
There is no code whatsoever that forces any decoder. Blame ZoomPlayer, its "smart play" is usually not so smart.



Ok, sorry, just reporting what I'm finding. I'll post it on the inmatrix forum.


I have one more question:

- Is there any reason *not* to use LAV Audio for FLAC?

madshi wrote madFLAC for a reason, as ffdshow FLAC decoding was not up to scratch (16 bit for 24 bit streams). As LAV Audio is also based on ffmpeg, I am after confirmation that all is ok (it appears ok, reading the graph properties).


Thanks

Mark

Gleb Egorych
15th May 2011, 11:25
CiNcH, AFAIK, different splitters send different subtypes. If you are asking about LAV Splitter then

TrueHD {EB27CEC4-163E-4CA3-8B74-8E25F91B517E}
DTS-HD {00002001-0000-0010-8000-00AA00389B71}
LPCM {949F97FD-56F6-4527-B4AE-DDEB375AB80F}

I believe in case of DTS-HD LAV Splitter makes some on-the-fly tweak if ArcSoft is used for decoding since ArcSoft requires special subtype.

nevcairiel, thanks, I'll test it.

CiNcH
15th May 2011, 11:28
Thanks Gleb,

so there is no real standard yet? What about those defined by Microsoft? Are they only used for protected audio?

nevcairiel
15th May 2011, 11:29
- Is there any reason *not* to use LAV Audio for FLAC?

madshi wrote madFLAC for a reason, as ffdshow FLAC decoding was not up to scratch (16 bit for 24 bit streams). As LAV Audio is also based on ffmpeg, I am after confirmation that all is ok (it appears ok, reading the graph properties).

I don't know how good the ffmpeg flac decoder is, but it will output full bitdepth. I don't know what ffdshow did to break it, but that might've also been years ago..

nevcairiel
15th May 2011, 11:31
Thanks Gleb,

so there is no real standard yet? What about those defined by Microsoft? Are they only used for protected audio?

MEDIASUBTYPE_DOLBY_TRUEHD is defined my Microsoft (in wmcodecdsp.h from the Windows SDK).
DTS is also the official Microsoft subtype, it does not use a special DTS-HD subtype.

LPCM is rather special, MS does not have a type at all for that. They probably use "normal" PCM for that, but its not exactly the same.
LAV Splitter supports two formats there, its own format, that only LAV Audio understands, and the MPC-HC format thats supported by the MPC-HC decoders and ffdshow.

Gleb Egorych
15th May 2011, 12:30
Yes, I was wrong, special subtype is not required for ArcSoft (although it exists), it accepts {00002001-0000-0010-8000-00AA00389B71}. Some time ago there was problem that gabest splitter output DTS-HD with {E06D8033-DB46-11CF-B4D1-00805F6CBBEA} subtype, and here (http://forum.doom9.org/showthread.php?p=1470148#post1470148) was suggested to patch the splitter to output custom subtype.

nevcairiel
15th May 2011, 12:43
I just changed the main DTS type to that one ({00002001-0000-0010-8000-00AA00389B71}), because the other one caused some funny issues. FYI.

Also, the aggressive mode was removed again, as it didn't really solve the problem properly, and only caused issues.
I'll be working on some new logic for stream switching for 0.27 or so, more details when its closer.

PS:
How about that avi crash?

jmone
15th May 2011, 12:55
Any luck with that JTV Sample BTW?

VipZ
15th May 2011, 14:03
Nev just tested latest build vs official 0.25, you might still be doing work on this, but sync is totally off now, in the region of 2-3 seconds with DTS in MKV. I was bitstreaming, and the toggle for the auto av sync didn't do anything.

nevcairiel
15th May 2011, 14:12
The A/V sync toggle didn't do anything for Bitstreaming yet.

Can you try this:
http://files.1f0.de/lavf/LAVFilters-0.25-55-g31d0dd6.zip

It now uses the A/V sync control for bitstreaming as well, maybe that solves your issue.

Timing for Bitstreaming is really stupid, well actually, bitstreaming itself is totally stupid. :p