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

BelowSky
28th May 2011, 21:42
Thank you for the Ogg fix
And regarding amr, are there any news on replacing the ffmpeg native amr with OpenCore? Playing an amr file containing dtx mutes entire system sound. That's until I stop the amr playback.
http://www.mediafire.com/?pi6ev8wagqaaq2u

BloodySword
28th May 2011, 22:04
In my system, your AMR is played back correctly with ffdshow libavcodec decoder.

ney2x
29th May 2011, 16:23
In my short stay here at doom9, here's the summary:

LAV Filters - perfect
LAVCUVID - near to perfection
madvr - perfect
Reclock - perfect
MPC-HC - perfect if I could replace the windows 95 gui/skin
and last but not the least.... LAV Player - the question is when???

BloodySword
29th May 2011, 17:00
I found a small bug, not realy a problem for normal user but for me: Sometimes I discover some videos played back slower. When I change the IMediaPosition->Rate property, A/V is out of sync because video is much slower than audio. Jitter correction is active in ffDshow - does not work.

CruNcher
29th May 2011, 18:35
Maybe you stumbled over this current limitation http://forum.doom9.org/showthread.php?p=1502471#post1502471 ?

BloodySword
29th May 2011, 18:56
The strange thing is, that if I use a rate <1 (slower) video plays ~2x slower than audio. If I set it to >1 (faster) then video plays ~2x faster than audio.

nevcairiel
29th May 2011, 19:06
Like mentioned up in that post, rate adjustments are currently not supported. It may be added in the future. Any behavior when you change rate is purely random.

pirlouy
29th May 2011, 23:47
Sorry if it has been asked before but... Is it possible to bitstream DTS-HD only, not simple DTS ?

Maybe in a future version, or it's not recommended to do this ?

Boltron
30th May 2011, 00:30
Sorry if it has been asked before but... Is it possible to bitstream DTS-HD only, not simple DTS ?

Maybe in a future version, or it's not recommended to do this ?

For me, DTS bitstream works fine with MPC-HC, LAV Splitter/Audio and madVR. All DD and DTS work fine. The only one I have had a problem to bitstream is PCM.

Andy o
30th May 2011, 00:42
For me, DTS bitstream works fine with MPC-HC, LAV Splitter/Audio and madVR. All DD and DTS work fine. The only one I have had a problem to bitstream is PCM.

The only way to stream bit-perfect LPCM with Win 7 and Vista is to use WASAPI exclusive. With most 32-bit DirectShow players, you can do that with ReClock.

nevcairiel
30th May 2011, 07:18
You cannot/do not "bitstream" PCM. Bitstreaming refers to sending the compressed audio to the receiver, so it can decode it. PCM is not compressed, its already uncompressed audio. So you do not need to "bitstream" it. But like Andy said, the closest you can get is to use a exclusive mode WASAPI renderer, so it by-passes the windows mixer and output the audio "as is".

neoufo51
30th May 2011, 08:54
I have a question:

Many people ask me why LAV Filters don't include support for video decoding and I turn them to CUVID if they have Nvidia cards but for the people who don't have compatible hardware, do you plan to support video decoding (LAV Video) in a future release of LAV Filters to go with LAV Audio and thus give people a basic alternative to ffdshow?

nevcairiel
30th May 2011, 09:46
Its planned, but there is no ETA.

BloodySword
30th May 2011, 10:04
Like mentioned up in that post, rate adjustments are currently not supported. It may be added in the future. Any behavior when you change rate is purely random.

I hope it does not have a low priority because for some this feature is essential. I can use VLC so far, but it is a little bit buggy in this point (crashes sometimes, adjustments not really accurate).

nevcairiel
30th May 2011, 10:06
It has a pretty low priority. I focus on perfect playback/watching experience, not artificial circumstances where you would need slower or faster playback.

BloodySword
30th May 2011, 10:15
You could lock the rate like the Windows Media DMO filters till the development of this feature is done. Do you understand what I mean?

Kaotech
30th May 2011, 15:44
Are you sure Wasapi is bit perfect ? If your track is a 48khz sample and your soundcard is 44khz, wasapi change your soundcard at 48khz ? I know with ASIO it do that, but with wasapi i'm not sure.

SamuriHL
30th May 2011, 15:49
WASAPI exclusive bypasses windows audio and sends the PCM audio to your receiver as is. It doesn't mess with it. It's as close to "bitstreaming" PCM as you're going to get.

nevcairiel
30th May 2011, 16:22
As long as your sound card supports 48Khz output, WASAPI exclusive mode will switch it to 48khz and output the PCM untouched. If it doesn't support 48khz, it'll just fail, and the application has to take care of converting the audio before output.

BelowSky
30th May 2011, 16:37
In my system, your AMR is played back correctly with ffdshow libavcodec decoder.

ffdshow doesn't use libavcodec for amr as far as I can tell. And this isn't really about LAV not able to playback amr which is okay. It is about LAV filter muting the system sound.
To give you an example, let say you are on Skype, and you opened one of these dreaded amr files, the sound in skype will just stop working until you stop the playback of that amr.

nevcairiel
30th May 2011, 16:38
LAV Audio does not do anything to the system sound. It just sends decoded audio to the renderer .. or it does not, if decoding fails. It does not communicate with the system at all.

BelowSky
30th May 2011, 17:25
Since you have dvbviewer can you open it and watch any channel and then open my uploaded file with another player and wait for dtx code to kick in (around the 16th second).
If that didn't affect the sound in your system, then it will mean that the problem MUST be related to my "USB SPEAKERS".

Boltron
30th May 2011, 17:48
It has a pretty low priority. I focus on perfect playback/watching experience, not artificial circumstances where you would need slower or faster playback.

"I focus on perfect playback/watching experience" Ahhhh... :)

<3 Nevcairiel.

Gleb Egorych
30th May 2011, 17:54
BelowSky, I also loose sound after 16 sec on my Audigy 2 ZS with that amr file.

BloodySword
30th May 2011, 19:01
ffdshow doesn't use libavcodec for amr as far as I can tell. And this isn't really about LAV not able to playback amr which is okay. It is about LAV filter muting the system sound.
To give you an example, let say you are on Skype, and you opened one of these dreaded amr files, the sound in skype will just stop working until you stop the playback of that amr.

http://img832.imageshack.us/img832/6160/20110530195456.png

ffdshow rev3851 icl10

Hmm you better should not use skype, it's AdWare. It installs software wich you didn't want to install even if you press "no!".

Wich kind of sound hardware do you have? Can it be that it runs in half duplex mode?

It could be a "feature" of Skype. Check the settings.

You could try if Skype is even muted when playing back 8000 Hz PCM. I have a bad suspicion.

assassinhtpc
30th May 2011, 19:15
Update: I was able to get LAV working with Live TV via WMC today. No issues at all with the new release.

Quick question: If I have DTS-HD and DTS both available in my MKV file how do I switch between the two using WMC?

BelowSky
30th May 2011, 19:20
The problem isn't Skype. The same thing can happen also if you open two instances of MPC-HC.

http://img832.imageshack.us/img832/6160/20110530195456.png
ffdshow rev3851 icl10


You can check the source code of ffdshow, look for the file libamr.c

BloodySword
30th May 2011, 19:30
The problem isn't Skype. The same thing can happen also if you open two instances of MPC-HC.



You can check the source code of ffdshow, look for the file libamr.c

Why should I? It's not my fault that they named it wrong. And for me it works.

Did you test it to play WAVE-File with 8000 Hz?

hoborg
30th May 2011, 21:46
This sample (https://rapidshare.com/#!download|169l35|1479703935|crash.zip|26215|R~0) will crash graphstudio if LAVF splitter + FFDshow DXVA decoder is in use, working fine with MPC-HC mpeg splitter.
More info (http://forum.doom9.org/showthread.php?p=1504485#post1504485).

nevcairiel
30th May 2011, 21:49
Crashes in a decoder are the decoders fault, unless something is going terribly wrong. If it crashes simply because it receives the H264 data a tiny bit differently then from other splitters, there is nothing i can do to fix it, especially when its buggy ffdshow.
A decoder needs to have some kind of error resilience against broken streams, no matter how they arrive. The MPC-HC DXVA decoder also manages..

Andy o
30th May 2011, 22:31
Re: rate change ("slower/faster playback").

Can't ReClock do this already? Or is the question about something else?

hoborg
30th May 2011, 22:59
Crashes in a decoder are the decoders fault, unless something is going terribly wrong. If it crashes simply because it receives the H264 data a tiny bit differently then from other splitters, there is nothing i can do to fix it, especially when its buggy ffdshow.
A decoder needs to have some kind of error resilience against broken streams, no matter how they arrive. The MPC-HC DXVA decoder also manages..

I wrote it here, becouse i didnt noticed this issue before, so i did some tests:

LAVF: (+ FFDShow DXVA decoder r.3863)
.22 - no crash but choppy playback
.23 - introduce black screen
.28 - no more blackscreen, but crash in graphstudio

skingery
31st May 2011, 00:25
Update: I was able to get LAV working with Live TV via WMC today. No issues at all with the new release.
Interesting. So are you seeing an improvement of some kind that make it worth the effort?

Aleksoid1978
31st May 2011, 02:40
Can you make a Debug version.

P.S. - sorry, find :)

nevcairiel
31st May 2011, 07:12
I wrote it here, becouse i didnt noticed this issue before, so i did some tests:

LAVF: (+ FFDShow DXVA decoder r.3863)
.22 - no crash but choppy playback
.23 - introduce black screen
.28 - no more blackscreen, but crash in graphstudio

The changes in 0.28 are necessary to fix exactly that black-screen problem on alot of files. ffdshow is buggy, always was and always will be (especially its DXVA mode, which is a bad copy of MPC-HCs DXVA, introducing new bugs and skipping functionality)

The MPC-HC splitter for example will fail completely on alot of files that LAVSpitter will play, and due to supporting more "weird" files, the output on such weird files is slightly different. If a decoder doesn't cope with that, its not my responsibility to fix it.
I do have some plans for the H264 parser, but i cannot say if it'll help, and i don't know when i'll work on that.

Last i heard, the MPC-HC DXVA decoder can deal just fine with it.

jmone
31st May 2011, 12:16
nevcairiel, I've been testing subtitle handling for MC16 latest beta changes with V0.26 of LAVSplitter (you opinions in that thread would be welcome) using Avatar to test Forced Subs. I notice that at the 47:00 minute mark is the forced sub "Why me? That's not fair...", and this one hangs around for a very very long time (eg till the next forced sub at around 53:45). I know you touched on the logic for this previously...

Forgot to report back (sorry) - Forced Subs are now being cleaned of much more promptly, eg while the forced sub "Why me? That's not fair..." at the 47:00 minute mark in Avatar still overruns the dialog it is now removed after about 10 seconds instead of 7 minutes!

nevcairiel
31st May 2011, 12:26
You know, that specific sub is working just fine for me, and already did before the change. :p

jmone
31st May 2011, 12:36
I'm sure it is down to ffdshow then (and another reason for LAVVideo)! Out of interest (and not wanting to stir any pot), what is the story with ffmpeg vs libav and which "fork" are you following (or have I got this wrong)?

nevcairiel
31st May 2011, 12:49
I actually tested with both MPC-HCs internal renderer and ffdshow.

ffmpeg is the original ffmpeg, no fork or anything. Earlier this year a group of developers tried to take over ffmpeg by forcefully removing the project leader and placing themself in that position. However, they failed as eventually the original project creator confirmed the ffmpeg project leader and gave him the rights to keep the ffmpeg name. After that the developers that tried to take over split from the project and forked it as "libav". It did however seem like they just couldn't be the losers in a pissing contest, so they tried to take their grief out on ffmpeg, taking away all their resources without the ability to properly backup and move them to a new server, which caused a disruption in the mailing list and other services.

I'm following ffmpeg, for the simple reason that i think they actually behave like i would except a FOSS project to behave, and not react with insults, bans, threats and legal claims like libav did. In addition, ffmpeg is actually merging the improvements from libav (as much as possible anyway, the truly broken changes won't be merged, of course), that way i can be sure to get the best of both. Personally i think Michael Niedermayer (the project leader of ffmpeg) is doing an outstanding job keeping ffmpeg stable, despite the plainly broken or wrong changes coming in from the libav side (as demonstrated by the recent changes to swscale, which severly broke ffdshow for a while as clsid just merged libav changes)

This is only my opinion on the whole situation, of course, and this is absolutely not the place to debate which side was "right", so if anyone feels strongly about the whole thing, get your own thread to debate it.

BelowSky
31st May 2011, 19:17
Since you have dvbviewer can you open it and watch any channel and then open my uploaded file with another player and wait for dtx code to kick in (around the 16th second).
If that didn't affect the sound in your system, then it will mean that the problem MUST be related to my "USB SPEAKERS".

To answer my own question, yes, without a doubt, the culprit of that system silence is my "below the average" USB speakers. :)

CruNcher
31st May 2011, 19:26
just for the Info Cyberlink fixed those crashes with the Canal HD .m2ts sample from v0lt it was indeed their Decoder issue, it works now with lav splitter ;)
I gone again through the whole test sample database .ts not 1 problem :) (only the missing program stream selection, missing feature in that sense no bug) but @ least playback wise it crunched through everything without sync issues just amazing (no option changed), ok their is a issue but it's not really a issue in itself of lav splitter but more of lav audio with damaged latm streams in .ts you wont hear any audio it will skip it (playing the video norma) while with other decoders supporting damaged latm (Mainconcept,DivX,Cyberlink) will skip the video parts and advice the decoder to jump to the latm timestamp parts that are ok (looks funny your video being forced to skip ahead) visible in the audioframedamaged.ts sample ;) :)
Ah yeah and the Encoding issue which is a little sad not be able to use lav splitter efficient for .ts transcoding yet, @ least for now with the tested 30fpslock .ts stream provided :(


First Play Experience (straight after load no interaction):

.ts Mpeg-2/VC-1/H.264 = 100% (DXVA/ON off switching works 4:2:2/4:2:0, flag based deinterlacing,soft ivtc works)
.m2ts Mpeg-2/VC-1/H.264 = 100%

nevcairiel
31st May 2011, 19:58
lav audio with damaged latm streams in .ts you wont hear any audio it will skip it (playing the video norma) while with other decoders supporting damaged latm (Mainconcept,DivX,Cyberlink) will skip the video parts and advice the decoder to jump to the latm timestamp parts that are ok (looks funny your video being forced to skip ahead) visible in the audioframedamaged.ts sample ;) :)

Just because the audio is broken, the video can still be shown, skipping it is weird. I rather prefer this method.

Anyhow, judging from log messages, that sample also uses AAC SSR, which is not supported in ffmpeg yet. Nothing i can do.

CruNcher
31st May 2011, 20:05
Hmm could you force this non skipping behavior maybe from the supporting audio decoders ;) ?

nevcairiel
31st May 2011, 20:06
no, that depends entirely on how the decoder handles the situation.

BloodySword
31st May 2011, 20:18
To answer my own question, yes, without a doubt, the culprit of that system silence is my "below the average" USB speakers. :)

Oh I didn't know that you have USB-Speakers. I think there are problems with resampling by software for such speakers. Means you can not play back more than one audio with same samplingrate or different samplingrate, who knows... xD

I recommend you to boy a cheap mini amplifier for home usage and 2 cheap speakers with ok values 50 - 20000 Hz 40W are very cheap, and they are wooden! :>

Andy o
31st May 2011, 23:07
If it's a resampling issue, have you tried forcing upsampling to something reasonable with ReClock? If your system is being muted because a very low sampling rate PCM is being sent to the audio device, then that could solve it. Also, are you using WASAPI exclusive? Cause the Windows mixer should take care of the resampling issue, unless you're using exclusive mode.

BelowSky
1st June 2011, 01:01
Calm down people... I'm much simpler than that. I just stick the speakers USB cables and listen, that's it.
I actually enjoy listening with these cheap speakers as much as I enjoy watching videos with my cheap screen.
My only purpose with LAV - and audio/video in general - is just that I want it to JUST PLAY.

CruNcher
1st June 2011, 01:43
@nev
http://www.mediafire.com/download.php?8w2ecz4jkqqrkcc http://www.mediafire.com/download.php?uaa942eka05iku2 <- No Audio (Latm) both play fine with sound in mplayer i missed those as they had the wrong extension .mpg
Guess the problem is that lav splitter detects them as mp2 and mp1 in the streams and not AAC

jimwhite
1st June 2011, 07:11
So what's the consensus on the Arcsoft files required? Which are the best versions of dtsdecoderdll.dll, ASAudioHD.ax, and DdpDec71.dll to use for full HD audio support with no sound degradation from downsampling, etc.

:confused:

Andy o
1st June 2011, 07:35
I think nev has said that the dtsdecoder.dll from TMT2 works best (1.1.0.0 IIRC). For DD+, it's highly unlikely that you'll need to decode 7.1 any time soon, so I'd say just use LAV audio to decode that. Nev said he's not having trouble using the ASAudioHD.ax from TMT5, but I am, so you can test yourself. But I think that Arcsoft ASAudioHD.ax downsamples (I might be wrong bout that). So, you either are limited to 16/48, or you have problems after seeking into the file, when using the older .ax. Me, if I need DD+ 7.1, I can just bitstream (for the first time with ATI cards, with LAV audio).