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

HeadlessCow
13th September 2010, 19:22
Awesome. I knew it was on the to-do list for ffdshow, but starting on something relatively simpler (there's not 5 years of dshow hacks in the code already) like this gets a lot of the way there since a large portion of time the audio/video codecs are supported by extenders, just not the container format :)

nevcairiel
13th September 2010, 19:29
Yes, i plan to do Media Foundation.

pankov
13th September 2010, 23:38
nevcairiel,
I've sent you a PM with couple of samples that don't work with your splitter.
sample_A.mkv brings an error "Cannot load specified file" when I try to add lavfsplitter in GraphStudio. The "special" thing about this file is that it has huge amount of embedded subtitles ... 40 if I remember correctly. Haali splitter doesn't work on it too but MPC's MatroskaSplitter.ax works just fine.
sample_G.mkv crashesh GraphStudio without even given an error. The "special" thing about it is that it has two "versions" of the movie in it - both Theatrical and Extended. Haali works fine with it and gives the option to switch the streams while MPC's splitter doesn't show the two streams.
I really hope that your splitter will be "the one to rule them all".

LloydA
14th September 2010, 00:03
0.9 can't be installed on a standard W7 x64 system.

Dependency Walker says MSCVP100.DLL, MSVCR100.DLL, GPSCV.DLL and IESHIMS.DLL are missing dependencies.

Log:

Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

EDIT:

Nevermind, just saw the message about the runtime. Perhaps this could be placed a bit more prominently in the first post (bold, bigger font, ...)

nevcairiel
14th September 2010, 06:57
sample_A.mkv brings an error "Cannot load specified file" when I try to add lavfsplitter in GraphStudio. The "special" thing about this file is that it has huge amount of embedded subtitles ... 40 if I remember correctly.
Interesting, will check it out.

sample_G.mkv crashesh GraphStudio without even given an error. The "special" thing about it is that it has two "versions" of the movie in it - both Theatrical and Extended. Haali works fine with it and gives the option to switch the streams while MPC's splitter doesn't show the two streams.

I can probably fix the crash, however the mkv "editions" and ordered chapters are not supported by libavformat at this time, so i cannot easily fix this. There are plans to get this working in the future.

mariner
14th September 2010, 08:17
Yes, i plan to do Media Foundation.

Greetings nevcairiel. This is excellent.

You can use TMT3 ver 175 video decoder for VC1 testing without a loader. Later versions seem to have problem with handling interlaced contents using DXVA.

By the way, any plans to support evo, like in Potplayer?

Many thanks and best eragrds.

hoborg
14th September 2010, 08:25
Greetings nevcairiel. This is excellent.

You should use TMT3 ver 175 video decoder for VC1 testing. It works without the need for a loader. Later versions seem to have problem with handling interlaced contents using DXVA.

By the way, any plans to support evo, like in Potplayer?

Many thanks and best eragrds.

Is not TMT VC-1 decoder 30days trail only?
Cyberlink doesnot have any limitation.

nevcairiel
14th September 2010, 08:27
I do own a retail copy of TMT3, so i could probably test that somehow.
I, however, have 185 installed. ;)

mariner
14th September 2010, 08:36
You may need this (http://forum.doom9.org/showpost.php?p=1392750&postcount=1). Courtesy of _shard.

nevcairiel
14th September 2010, 12:14
I'm currently working on defining the logic for smart stream selection, and here is what i have so far.
This is mostly based on the flag description in the mkv spec

- Filter Streams by user preferred languages
- If Streams matching language found, check if one is marked "Forced" and use that one
- If no Streams matching language found, check if one is marked "Default"
- If there is either no stream found by now, or more then one matches the criteria above, match by Quality (Codec and Resolution or number of channels, for video/audio respectively, and bitrate if available)

I want to add one option to the whole thing, that is for subtitles. You could select "Never use subs" (always select "no subtitles"), "Forced Subs" (only shows forced subs), "Always use subs" (always selects a subs stream matching your preferred language, possibly even one not set as forced to have full subs?)

Anyhow, suggestions on the whole concept are welcome!

starla
14th September 2010, 13:06
Anyhow, suggestions on the whole concept are welcome!

Ability to disable that feature to allow the playback application to handle the preferred language for audio / subtitle tracks :)

nevcairiel
14th September 2010, 13:08
I could add a checkbox, but in theory it doesn't matter. It won't force anything, its just for the selection of which streams to start with, if the application (or the user) changes something, it'll change the streams like now.

SamuriHL
14th September 2010, 13:27
I'm currently working on defining the logic for smart stream selection, and here is what i have so far.
This is mostly based on the flag description in the mkv spec

- Filter Streams by user preferred languages
- If Streams matching language found, check if one is marked "Forced" and use that one
- If no Streams matching language found, check if one is marked "Default"
- If there is either no stream found by now, or more then one matches the criteria above, match by Quality (Codec and Resolution or number of channels, for video/audio respectively, and bitrate if available)

I want to add one option to the whole thing, that is for subtitles. You could select "Never use subs" (always select "no subtitles"), "Forced Subs" (only shows forced subs), "Always use subs" (always selects a subs stream matching your preferred language, possibly even one not set as forced to have full subs?)

Anyhow, suggestions on the whole concept are welcome!

THAT would rock! This is what a lot of us are looking for in a splitter right now and would absolutely rule all if you were to implement it exactly like that. From what I understand it's possible to have multiple subs on at the same time in some cases...I.E. forced and non-forced could be on at the same time. I thought that was odd, but, apparently it's true.

nevcairiel
14th September 2010, 13:31
From what I understand it's possible to have multiple subs on at the same time in some cases...I.E. forced and non-forced could be on at the same time. I thought that was odd, but, apparently it's true.
Now that will be more complicated. It won't exactly fit my stream selector thing, and i would have to create new output pins for them .. oh well.
I'll keep that in mind for some time later.

Did i mention that i'm not a big subtitle user?

pankov
14th September 2010, 13:35
nevcairiel,
I think that the stream selection should be done by the player, but I do agree that we should have good "defaults" ... I'm just not sure if all this is worth the effort.
btw
There is still problem using your splitter in ZoomPlayer. I can't find the reason why every other splitter/source filter I've tried works fine just LAVFSplitter doesn't. And I've used a few including Haali, MPC's different source filters, HDTV Pump, DC-Bass Source, madTestpatternSource, DivX MKV Demux, NVidia ATSC File source and others. So I guess it's simply some kind of "communication issue" that prevents ZoomPlayer from using your splitter, which I hope will be my future favorite splitter/source filter.

SamuriHL
14th September 2010, 13:36
Now that will be more complicated. It won't exactly fit my stream selector thing, and i would have to create new output pins for them .. oh well.
I'll keep that in mind for some time later.

Did i mention that i'm not a big subtitle user?

I'm not, really, either except in the case of forced subs. But when I was discussing the forced sub flags with Solveig someone mentioned this issue. I thought it was pretty whacked myself, but, I guess it's possible in the spec to do that. I just thought I'd mention it. The way it supposedly works is that forced are "always on" if set, and then they can also select another sub that gets played in addition. I don't know, that just seems weird to me, but, supposedly that's how it works.

nevcairiel
14th September 2010, 13:37
I think that the stream selection should be done by the player, but I do agree that we should have good "defaults" ... I'm just not sure if all this is worth the effort.


There is currently no way to export the "Default" and "Forced" flags to the player, so it can't do this choice for you. If some of the player developers would be willing, we could define a new interface i can export on the output pins to query those flags, or an extension on IAMStreamSelect, but right now, only the splitters knows.

I'm not, really, either except in the case of forced subs.
Too bad i can't get the Forced flag out of m2ts for blurays (yet!). :(

SamuriHL
14th September 2010, 14:16
Too bad i can't get the Forced flag out of m2ts for blurays (yet!). :(

You'll get there. :) Maybe madshi or one of the other gurus can help you out on that one.

nevcairiel
14th September 2010, 14:40
I don't think the info is actually in the m2ts, rather in the playlists or clipinfo files, and i don't want to parse them manually.
libbluray needs to mature a bit. :)

SamuriHL
14th September 2010, 14:42
The chapter info is in the playlists. I thought the forced flags were embedded in the PGS subs inside the m2ts container, though. Maybe I'm mistaken on that.

rack04
14th September 2010, 14:49
The chapter info is in the playlists. I thought the forced flags were embedded in the PGS subs inside the m2ts container, though. Maybe I'm mistaken on that.

I think you are correct since BDSup2Sub is able to detect the forced flag on PGS subs.

tetsuo55
14th September 2010, 15:23
I'm currently working on defining the logic for smart stream selection, and here is what i have so far.
This is mostly based on the flag description in the mkv spec

- Filter Streams by user preferred languages
- If Streams matching language found, check if one is marked "Forced" and use that one
- If no Streams matching language found, check if one is marked "Default"
- If there is either no stream found by now, or more then one matches the criteria above, match by Quality (Codec and Resolution or number of channels, for video/audio respectively, and bitrate if available)

I want to add one option to the whole thing, that is for subtitles. You could select "Never use subs" (always select "no subtitles"), "Forced Subs" (only shows forced subs), "Always use subs" (always selects a subs stream matching your preferred language, possibly even one not set as forced to have full subs?)

Anyhow, suggestions on the whole concept are welcome!Exactly like that would be perfect (for video, audio and subtitles)

There is one other variant of multiple subtitles, and thats what chinese often use, both english and chinese at the same time. (and sometimes even a 3rd)

nevcairiel
14th September 2010, 15:36
I think you are correct since BDSup2Sub is able to detect the forced flag on PGS subs.

I looked into the BDSub2Sub source and trying to see how its done, but without a documented specification of the PGS format, its still stabbing into the dark.

nevcairiel
14th September 2010, 17:19
Okay, i figured out how to do it, in theory. However, it won't be that easy in practice. The problem is that i won't have any data about the sub stream until the first package arrives. And with subs, especially forced subs, that can be a while. Quite a while, actually. I can't start parsing the whole movie in the hope finding the one forced sub entry somewhere at the end of the movie =/

If someone knows how to extract those flags from a MPEG-TS, i'm willing to listen, until then, i'll put this on hold.
When i implement libbluray, it might give me this information in another form, until then, i'm out of ideas - for now.

dann23
19th September 2010, 07:05
can lavfsplitter be used to decode aac streams?

nevcairiel
19th September 2010, 09:25
lavfsplitter is not a decoder, its a demuxer. However in theory it should be able to read .aac files, you still need a decoder, however.

dann23
19th September 2010, 13:57
please excuse me :D I wanted to say demux not decode. right now I'm using DCBasssource. but if possible I want to use lavfsplitter. as decoder I already have ffdshow installed. And to be sure, by aac streams I mean online radio stations.

nevcairiel
19th September 2010, 14:00
It doesnt currently work for streaming media, but it could in theory. I am however not sure if those aac streams are part of that fucntionality in ffmpeg.

dann23
19th September 2010, 15:02
I'm not sure either. Maybe someone can help here.

adam777
21st September 2010, 07:51
Hello all,
I've just found out about LAVFSplitter and was eager to try it out.
I tried watching a 1080p MKV movie using latest (or close to latest) MPC-HC, FFDShow and madVR, and the result was a very choppy playback with the splitter enabled.
It is not a CPU usage problem, as it never goes up over 50% at max, and using Haali under the same setup I have no problem.
I realize this might not be the most informative feedback, but let me know what to check next in order to provide you with better details.
Thanks, Adam.

TheFluff
21st September 2010, 10:07
LAVF is still really bad at MKV. In FFMS2 we "solved" it by using Haali's parser instead, but that probably won't help you much.

nevcairiel
21st September 2010, 10:11
You mean libavformat itself is bad, or my directshow filter for it? Thats not always clear =P

I've heard before that people consider libavformat itself not pretty good for mkv, although it seems to work fine for me, but all my systems are pretty beefy, so if there is any performance bottleneck, i would probably not run into it.

I still have plans to use mplayers demuxer as an alternative, once time permits implementation.
I wonder how much work it would be to do it "manually" using libmatroska, though.

adam777
21st September 2010, 12:45
LAVF is still really bad at MKV. In FFMS2 we "solved" it by using Haali's parser instead, but that probably won't help you much.

Ah, that's good to know.
I mean, not "good" as in "good", but "good" as in "at least I know the cause".
Thanks.

TheFluff
21st September 2010, 13:10
You mean libavformat itself is bad, or my directshow filter for it? Thats not always clear =P

I've heard before that people consider libavformat itself not pretty good for mkv, although it seems to work fine for me, but all my systems are pretty beefy, so if there is any performance bottleneck, i would probably not run into it.

I'm talking about libavformat itself. It's not limited to just performance problems, it also has all sorts of other funny issues.

I don't really recommend libmatroska either; what we use is Haali's matroskaparser.c/h; it has a very nice and simple API. Take a look at matroska* in the FFMS2 source tree (http://code.google.com/p/ffmpegsource/source/browse/#svn/trunk/src/core) if you're interested.

nevcairiel
21st September 2010, 13:31
Nice, i didn't know that he provided his parser for open source projects to use, this looks great.

BatKnight
22nd September 2010, 14:21
Nice, can't wait to see Haali's matroskaparser in LAVFSplitter instead of libavformat.

Thanks for being interested in improving LAVFSplitter. Some of us maybe silent about it, but we are using it.

Bat

rack04
22nd September 2010, 14:46
I was wondering if XhmikosR can modify the installer so the user can select 32-bit or 64-bit?

v0lt
23rd September 2010, 17:15
nevcairiel
Build LAVFSplitter in VS2008 is real?

nevcairiel
23rd September 2010, 17:36
What now?
I don't understand your question, but it should build in VS2008 just fine, i just didn't bother with a project file since i'm using 2010.

rack04
24th September 2010, 03:07
I've noticed that some of my 24000/1001 fps mkv files with are played back at 24.000 fps (as reported by madVR) using LAVFSplitter. Using MPC-HC internal mkv splitter and Haali the file is played back at 23.976.

v0lt
24th September 2010, 03:50
nevcairiel
I want to compile the source code in VS2008. Not obtained yet.

nevcairiel
24th September 2010, 05:52
I've noticed that some of my 24000/1001 fps mkv files with are played back at 24.000 fps (as reported by madVR) using LAVFSplitter. Using MPC-HC internal mkv splitter and Haali the file is played back at 23.976.
Thats just a display issue, they are played at their proper speed. This seemed to be a issue with mkvs where the container said its a 24fps movie, and the movie itself claimed it was 23.976.

Fixed with h264, as this was the only format i encountered the problem with. If other files have the same issue, please let me know.

Virtual_ManPL
24th September 2010, 12:43
It's just me or AVI splitter don't work, because all I can see in MPC-HC is that, the default Windows AVI Splitter is used with File Source (Async.) in all avi files

XhmikosR
24th September 2010, 13:09
It works fine here with the latest git.
Filter : lavf dshow source filter - CLSID : {B98D13E7-55DB-4385-A33D-09FD1BA26338}

- Connected to:

CLSID: {04FE9017-F873-410E-871E-AB91661A4EF7}
Filter: ffdshow Video Decoder
Pin: In

- Connection media type:

Video: Xvid 624x352 23.98fps
Though I have an other problem with the video being played at 15fps instead of 23.976.

nevcairiel
24th September 2010, 16:34
Though I have an other problem with the video being played at 15fps instead of 23.976.

Fixed.

SamuriHL
24th September 2010, 17:04
Any idea when a new build will be posted? I'm interested in the LPCM fix you put in for MKV's. Thanks!

nevcairiel
24th September 2010, 17:32
I did want to get the stream selection in the next version, and i'm hoping to be able to implement it over the weekend. But who knows what happens.

SamuriHL
24th September 2010, 17:35
That'd be really sweet. Yea, no rush. Was merely curious if you had a target date. Thanks!

dann23
25th September 2010, 16:15
Is it possible to add support for amr and bink files?

Jeffster
25th September 2010, 16:55
Hi nevcairiel,

Could I humbly inquire if you have any update on the status of LATM AAC (http://forum.doom9.org/showthread.php?p=1427013#post1427013) support in LAVFSpitter?

It would be really great if there was finally a DirectShow splitter that works with LATM as this audio format was adopted here also for DVB-T broadcasts and it's proved to be nothing but a headache.

Thanks. :)