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
20th June 2012, 21:46
I mean the libspeex stuff but I remember that from May.

Those are included in LAVs repository again.

SamuriHL
20th June 2012, 21:47
Those are included in LAVs repository again.

Yea, that's fine. Once I saw the date I realized they weren't from today's fun. :)

glorp
20th June 2012, 22:09
Aren't the settings stored either in the registry or ini depending on what the user chooses? So, couldn't someone in theory take the filterless version, set it up with lav as a sub-directory under the mpc-hc install, configure it to use those external filters, and package that? Granted you couldn't save the lav configuration as that's stored elsewhere, but, it's a hack around for now. Ideally they'd use the lav API to configure them on the fly but that requires coding.

The ini stores filter configurations by guid not path. MPC-HC prefers the .ini configuration over registry settings if the .ini is in the same directory as MPC. If you package the lite version with an ini that uses LAV filters it should work immediately on any other system as long as LAV is already installed and registered. Doesn't matter where the filters are located and you wouldn't necessarily need to include them although you could as long as they got installed and registered.

SamuriHL
20th June 2012, 22:15
Works great for lav. Not so great for mpc-hc:


ffmpeg.lib(timecode.o) : error LNK2001: unresolved external symbol ___ms_vsnpri
ntf [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(samplefmt.o) : error LNK2001: unresolved external symbol ___ms_vsnpr
intf [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(opt.o) : error LNK2001: unresolved external symbol ___ms_vsnprintf [
c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(avstring.o) : error LNK2001: unresolved external symbol ___ms_vsnpri
ntf [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(bprint.o) : error LNK2001: unresolved external symbol ___ms_vsnprint
f [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(mpc_helper.o) : error LNK2019: unresolved external symbol ___ms_vsnp
rintf referenced in function _snprintf.constprop.0 [c:\dev\projects\mpc-hc\src\
mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(utils.o) : error LNK2001: unresolved external symbol ___ms_vsnprintf
[c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(log.o) : error LNK2001: unresolved external symbol ___ms_vsnprintf [
c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
ffmpeg.lib(pixdesc.o) : error LNK2001: unresolved external symbol ___ms_vsnprin
tf [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]
c:\dev\projects\mpc-hc\bin\mpc-hc_x86\mpc-hc.exe : fatal error LNK1120: 1 unres
olved externals [c:\dev\projects\mpc-hc\src\mpc-hc\mpc-hc.vcxproj]


I suspect I have compile errors somewhere that I'll have to look into. My guess is some lib is missing somewhere.

SamuriHL
20th June 2012, 22:17
The ini stores filter configurations by guid not path. MPC-HC prefers the .ini configuration over registry settings if the .ini is in the same directory as MPC. If you package the lite version with an ini that uses LAV filters it should work immediately on any other system as long as LAV is already installed and registered. Doesn't matter where the filters are located and you wouldn't necessarily need to include them although you could as long as they got installed and registered.

That's certainly one temp option, then, yea? We don't even need to include it necessarily. We could just post one for people to use. "Here, install LAV, drop in this ini, done."

glorp
20th June 2012, 22:26
Just have to be sure the ini doesn't transport options you don't want from one system to another. Some optuions would be location dependent like MRU lists. Start with a fresh reset of MPC options to get the ini. The ini first gets generated when you choose the option to use it from MPC and then it starts with settings which come from whatever is currently set in the registry. It will always use the ini until you delete it (or turn off the option) and then it rereads the registry. Can be a little tricky when trying to reset things.

Never played with it but there's also switches to load filters from the command line which might be useful I suppose.

clsid
20th June 2012, 23:49
You don't need to do anything special to use LAV Filters with MPC-HC Lite. Simply install both and it should work. With regular MPC-HC all you need to do is disable unwanted internal filters. There is no need for any external filter settings or messing with INI files.

SamuriHL
20th June 2012, 23:51
Sweet. We should be telling more people this.

clsid
21st June 2012, 00:03
Yes, it seems some people think you need to add stuff to external filters for MPC-HC to be able to use them. But reality is that MPC-HC will automatically use the filters that are installed on your system when needed, like any other DirectShow player. The external filter settings are for overriding filter merits. Something that is rarely needed with a proper set of installed filters that are configured correctly.

SamuriHL
21st June 2012, 00:07
Yea, well, we all know that people's machines aren't always clean. ;)

clsid
21st June 2012, 00:33
That should rarely be a problem thanks to the high merit of the LAV decoders and the way the source filter sets itself as preferred.

SamuriHL
21st June 2012, 00:37
Fair enough. We just need to get people to understand that more then. Cause I didn't even realize that it'd naturally try to use LAV without forcing it in the external filters. Good to know.

powder21
21st June 2012, 01:21
Ok, so I've been using AC3Filter for my audio decoding until a mixer is implemented in LAV (currently only have stereo speakers available). I know I can use ffdshow post-processing and still use LAV for audio decoding, but I like AC3Filter's mixer better. Is there any way I can get LAV to do the decoding and AC3Filter to do just mixing like a post-processing filter?

I'm pretty new to all this so please forgive me if that's a dumb question :) Thanks.

EDIT: It may be helpful to mention that I use Reclock as the audio renderer to take advantage of WASAPI because I also don't like the windows mixer. (Not sure if that info actually IS helpful, but just in case)

kalston
21st June 2012, 02:25
Ok, so I've been using AC3Filter for my audio decoding until a mixer is implemented in LAV (currently only have stereo speakers available). I know I can use ffdshow post-processing and still use LAV for audio decoding, but I like AC3Filter's mixer better. Is there any way I can get LAV to do the decoding and AC3Filter to do just mixing like a post-processing filter?

I'm pretty new to all this so please forgive me if that's a dumb question :) Thanks.

EDIT: It may be helpful to mention that I use Reclock as the audio renderer to take advantage of WASAPI because I also don't like the windows mixer. (Not sure if that info actually IS helpful, but just in case)

If you configure AC3Filter to run after LAV (like with ffdshow, "external filters" tab in MPC-HC) it should work just fine (if AC3Filter supports RAW audio input, but why wouldn't it).

powder21
21st June 2012, 03:05
If you configure AC3Filter to run after LAV (like with ffdshow, "external filters" tab in MPC-HC) it should work just fine (if AC3Filter supports RAW audio input, but why wouldn't it).

Hey yah that works. The input on AC3Filter changed to PCM floating point and I'm now getting activity on the LAV audio status. Cool...Thanks.

ontherocks
21st June 2012, 06:16
I have GeForce GT520.
mpc-hc.1.6.3.4992.x86
LAVFilters-0.50.5
Having problem bitstreaming DD+ tracks via HDMI. There is no audio.
Sample audio link below.
http://www.mediafire.com/?a3x0q52bg1av33m

Any help on this guys?

wanezhiling
21st June 2012, 13:48
Hi nev, would the native dxva decoder fall back to sw mode when it connected Haali video renderer? :)

Having a fallback would also be useful in case of for example AviSynth scripts or DirectShow-based video converters or any other situation where the decoder isn't connected to a renderer.

clsid
21st June 2012, 13:50
If you configure AC3Filter to run after LAV (like with ffdshow, "external filters" tab in MPC-HC) it should work just fine (if AC3Filter supports RAW audio input, but why wouldn't it).Using external filters is an inferior solution. It is not very flexible and doesn't fully allow different preferred decoders for different formats. LAV, AC3Filter and ffdshow all have options to configure which formats they should decode. The proper solution is to use those options. That gives full flexibility. Use decoder A for format B, and decoder C for format D if desired.

Want to use AC3Filter only as post-processor, and not as a decoder? Then simply uncheck all formats on the "System" tab in its settings. Only leave PCM (=uncompressed audio) enabled.

In LAV audio decoder the options can be found on the "Formats" tab. In ffdshow audio decoder on the "Codecs" page.

nevcairiel
21st June 2012, 15:19
Works great for lav. Not so great for mpc-hc

I put up the required extra libs on my mingw folder and a quick instruction what to do with them, builds fine for me now.

http://files.1f0.de/mingw/

kalston
21st June 2012, 15:48
Using external filters is an inferior solution. It is not very flexible and doesn't fully allow different preferred decoders for different formats. LAV, AC3Filter and ffdshow all have options to configure which formats they should decode. The proper solution is to use those options. That gives full flexibility. Use decoder A for format B, and decoder C for format D if desired.

Want to use AC3Filter only as post-processor, and not as a decoder? Then simply uncheck all formats on the "System" tab in its settings. Only leave PCM (=uncompressed audio) enabled.

In LAV audio decoder the options can be found on the "Formats" tab. In ffdshow audio decoder on the "Codecs" page.

Hum, that's actually what the setup I suggested should do.

You can always untick all formats apart from PCM in AC3 to make sure sure it's not decoding the audio again but he said "Hey yah that works. The input on AC3Filter changed to PCM floating point and I'm now getting activity on the LAV audio status. Cool...Thanks." so to me that means AC3 isn't actually decoding anything and is just processing the uncompressed audio LAV sends to it.

SamuriHL
21st June 2012, 16:00
I put up the required extra libs on my mingw folder and a quick instruction what to do with them, builds fine for me now.

http://files.1f0.de/mingw/

Oh wow, sweet! Thanks!!!!

dawar49
21st June 2012, 16:11
nev,

speaking of updated toolchains, lav builds and runs fine using visual studio 2012 rc with two minor changes. they seem to be a standards compliance issues only.

common/DSUtilLite/gpu_memcpy_sse4.h is missing an include statement for <smmintrin.h>
decoder/LAVVideo/LAVPixFmtConverter.h is missing an include statement for <emmintrin.h>

zerowalker
22nd June 2012, 00:57
Is there anyone else who getīs Dll crashes with Lagarith decoding enabled?
I get it when itīs trying to get thumbnails from the files.

blakkheim
22nd June 2012, 06:22
First off, just wanted to say thanks for Lav Filters and all the hard work you put into it Nev.

Secondly, I didn't feel like going thru 570+ pages and search/google couldn't provide an answer so my question is:

I got Lav Splitter to load the language track I want, but there are 2 English subtitle tracks and I want Lav to load the 2nd English track. What do I have to put under Properties to get Lav Splitter to load the 2nd English Subtitle Track w/o manually going to the 2nd track?

I read the readme on 1f0.de and tried multiple variations using Advanced but I can't get Lav Splitter to load the 2nd English Subtitle Track automatically.

Lav 50.5 + MPC-HC v1.6.2.4902

Any help is greatly appreciated.

nevcairiel
22nd June 2012, 06:34
If both tracks have the same language and no other flags are different either, there is currently no way to select the second track automatically.
I'm open for ideas how to solve this, but an option like "use the second track, if it exists" seems rather specific, next someone will ask for the 3rd, etc.

patul
22nd June 2012, 08:16
If both tracks have the same language and no other flags are different either, there is currently no way to select the second track automatically.
I'm open for ideas how to solve this, but an option like "use the second track, if it exists" seems rather specific, next someone will ask for the 3rd, etc.

Drop down list? Use x track if it exists? However, I myself never find the need of this requested "feature".

DragonQ
22nd June 2012, 09:46
You could always remux it so the track you want is set as default. Doesn't take long.

blakkheim
22nd June 2012, 13:32
^ This I know. Didn't feel like doing it for 26 eps individually unless you know how to do all 26 at the same time w/o doing each one individually.

Thanks anyway Nev. I looked at the tags and they are both [eng] so I know there's no way then to default to the second track.

JEEB
22nd June 2012, 13:54
You could automate the remuxing with batch files or something, which should work as long as long as the basic structure of the files keeps the same. Adding mkvinfo to the mix could possibly let you automate it even more with different structures.

VLC tries to solve this problem with having an open integer setting that pretty much is "Default to subtitle track number X", which A) I'm not really sure is the correct way to deal with it, and B) Led to funny results the next time I loaded up a file with <X subtitle tracks :)

robpdotcom
22nd June 2012, 14:19
You could just use mmg's header editor to change the default flags - or even change the language. Would be much faster than remuxing (only a few seconds for each file).

Cudo
22nd June 2012, 14:41
Using external filters is an inferior solution. It is not very flexible and doesn't fully allow different preferred decoders for different formats. LAV, AC3Filter and ffdshow all have options to configure which formats they should decode. The proper solution is to use those options. That gives full flexibility. Use decoder A for format B, and decoder C for format D if desired.

Want to use AC3Filter only as post-processor, and not as a decoder? Then simply uncheck all formats on the "System" tab in its settings. Only leave PCM (=uncompressed audio) enabled.

In LAV audio decoder the options can be found on the "Formats" tab. In ffdshow audio decoder on the "Codecs" page.
It would be nice if there was a way to force different settings not only based on the fomat, but on other things too. I use two different copies of MPC-HC.exe with the "Store settings in .ini file" option ticked. :D

clsid
22nd June 2012, 15:42
What other things might that be?

Btw, you don't need to use an INI for both. One could use the Registry (and load a bit faster).

DragonQ
22nd June 2012, 16:38
^ This I know. Didn't feel like doing it for 26 eps individually unless you know how to do all 26 at the same time w/o doing each one individually.

Thanks anyway Nev. I looked at the tags and they are both [eng] so I know there's no way then to default to the second track.
You can do this with a batch file but it took me a while to work out how to do this. There is some documentation but it was difficult to find examples IIRC.

glorp
22nd June 2012, 16:58
^ This I know. Didn't feel like doing it for 26 eps individually unless you know how to do all 26 at the same time w/o doing each one individually.

Thanks anyway Nev. I looked at the tags and they are both [eng] so I know there's no way then to default to the second track.

Load one of the files to be changed into mkvmerge gui, change everything you need to change to remux (probably set the default flag of the sub track you want to prefer) then select mkvmerge menu: Muxing->Show the command Line. Copy the output that shows and paste into a new .txt file 26 times. Edit the input and output filenames of each entry (which probably means changing to 02, 03, 04...), save as .bat, run it. Go get a cup of coffee.

I just got done doing this myself a few minutes ago :)

kitame
22nd June 2012, 17:04
If both tracks have the same language and no other flags are different either, there is currently no way to select the second track automatically.
I'm open for ideas how to solve this, but an option like "use the second track, if it exists" seems rather specific, next someone will ask for the 3rd, etc.

how about adding a checkbox that has a feature of "if multiple tracks of the same type are present, flag each track with numbers".
now with that you could type in the selection into " Eng2 : off ; Eng1 : off ; * : Eng2 ; * : Eng1 "

simply put splitter would be renaming the flags by itself but not necessarily modifying the file.

Edit: also, can i request an individual channel volume control in the audio? well because some of the multi-channel when down-muxed to stereo overpowers the main left and right.

glorp
22nd June 2012, 17:14
If both tracks have the same language and no other flags are different either, there is currently no way to select the second track automatically.
I'm open for ideas how to solve this, but an option like "use the second track, if it exists" seems rather specific, next someone will ask for the 3rd, etc.

On a related subject, would you reconsider allowing the advanced mode to specify audio language preferences too or somehow using the default and forced flags on audio streams to override audio track language selections? I'm speaking about the cases like where something is a "foreign" language film but has an audio commentary track in a preferred language that you don't necessaily want to have selected as default.

kasper93
22nd June 2012, 21:08
@nev
http://forum.doom9.org/showpost.php?p=1577657&postcount=11254 I don't know if you have seen it? Maybe it's not important for you, but I don't like ffdshow and unfortunately I'm forced to use it ;/

clsid
22nd June 2012, 23:13
Making the audio and subtitle selection logic more complex is a bad idea.

What some of the users above need is a very basic and easy to use tool for editing the MKV header.

Pat357
23rd June 2012, 02:33
Load one of the files to be changed into mkvmerge gui, change everything you need to change to remux (probably set the default flag of the sub track you want to prefer) then select mkvmerge menu: Muxing->Show the command Line. Copy the output that shows and paste into a new .txt file 26 times. Edit the input and output filenames of each entry (which probably means changing to 02, 03, 04...), save as .bat, run it. Go get a cup of coffee.

I just got done doing this myself a few minutes ago :)

Here is a much faster and a lot easier method :
JMKVPropedit = "MKVpropedit with a nice GUI and batch support" : http://jmkvpropedit.googlecode.com/ ;)

A real time-saver for such things as changing the default track for over 20+ MKV's :)

wanezhiling
23rd June 2012, 14:20
http://www.mediafire.com/?3xd2xuden467l3s

Tested all splitters, only LAV Splitter can work, but no image no audio.

nev is the file broken?

nevcairiel
23rd June 2012, 14:25
If nothing works, what makes you think the file might not be broken? :P

wanezhiling
23rd June 2012, 14:50
Someone didn't trust what I said to him, so I proved to him.:p

Thanks nev.

jmone
24th June 2012, 13:09
Hi Nevcairiel, any progress with madshi on BD 3D support (as I now how a whole 2 x 3D disks!)

nevcairiel
24th June 2012, 13:53
Hi Nevcairiel, any progress with madshi on BD 3D support (as I now how a whole 2 x 3D disks!)

No-one is working on this (at least i am not, cannot speak for anyone else, i guess). I dunno where you got this idea.

Sebastiii
24th June 2012, 16:42
jmone how did you handle it ?
I have see that Stereoscopic Player works for BD3D, it use MPC-HC Source to output 2 Video pin and was connected to CoreMVC decoder (2 Video pin input).
I'm not sure that LAV Splitter can handle it right now (it seems that it will break IAMStreamSelect ?)
But like CoreMVC is not available, but not that Nevcairiel can start to working on it :)

jmone
24th June 2012, 23:14
Sorry - I did not mean to imply any work had started more so there was just general discussion a month or so about it. For the (very) odd 3D disc we just manually fire up TMT.

v0lt
25th June 2012, 18:08
@nevcairiel
LAV Splitter hangs on this file.
http://www.mediafire.com/?2ac07wbyndam8m8
It's not ogg vorbis, splitter must skip it.

nevcairiel
26th June 2012, 16:19
@nevcairiel
LAV Splitter hangs on this file.
http://www.mediafire.com/?2ac07wbyndam8m8
It's not ogg vorbis, splitter must skip it.

I dunno what you mean, my LAV trys to open that file, fails, and then MPC-HC says "cannot render file"

clsid
27th June 2012, 12:26
I have a question regarding container PAR vs stream PAR. Currently LAV Video defaults to always using the stream PAR, because the container PAR might be unreliable/wrong in some cases.

Which containers have a PAR that is more often wrong than right? I assume it is mostly a problem with MPEG-TS?
Which containers are likely to have a correct PAR that is intentionally different from the stream PAR? I was thinking AVI, MKV, and MP4.

What do you think about the idea of changing the current "Use Stream Aspect Ratio" option to a dropdown with three options: Automatic/Use Stream AR/Use Container AR? The automatic option will use container PAR for reliable containers and stream PAR otherwise.

nevcairiel
27th June 2012, 12:45
Detecting which container is used is not something you can reliably use. Sure, you can check based on the filename, but sometimes that just not good enough.

I could add an option to LAV Splitter to tell LAV Video which container is used, but that is again only half a solution.

Haali solves this by overwriting the Stream AR in the video bitstream when using a "reliable" container, which i did think about also doing, but then again its a rather destructive option.

Doing it based on a filename guess may work, in most cases the filename is available, and cases where the file is renamed are usually rare (but happen more often then you think).
I'll consider it.