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
14th June 2012, 21:51
It doesn't occur with ffdshow, only with LAV.
So it may be more accurate to post this here, or not?


Its either an Intel driver bug or a bug in the QS decoder.
The QS decoder outputs 60 frames, but outputs the frames with timestamps for 30fps, and then occasionally there is a huge gap in the timestamps when it re-syncs to the actual time - which causes the drops.

Overall, i'm really not happy with how the QS DI performs so far, i'll probably disable it again soon until its working properly, or Intel finally decides to release a fixed driver.

egur
14th June 2012, 22:30
Its either an Intel driver bug or a bug in the QS decoder.
The QS decoder outputs 60 frames, but outputs the frames with timestamps for 30fps, and then occasionally there is a huge gap in the timestamps when it re-syncs to the actual time - which causes the drops.


I've committed r62 which fixes some (hopefully all) of stalls/crashes related to the DI.

As for the time stamps, per your request I don't calculate them, the new (extra) frames do not have time stamps. If you have an idea to improve this, let me know.

jakmal
15th June 2012, 00:18
At the outset, I am not sure whether this is the right thread to report this issue (where do I report avcodec decoding problems?), but here it is:

Sample file: Original MP4 version of this YouTube clip: www.youtube.com/watch?v=t56ooXC9VmY [ Size : ~252 MB ]

Playback system: Core i7-3770K + GT 640. Using LAV Filters 0.50.5 (from 1f0.de, downloaded couple of days back) and MPC-HC 1.6.2.4902 x86 version, display on to 1080p monitor with EVR-CP renderer.

With Video Decoder set to avcodec, there are blocking artifacts when the words 'Peter Jackson' swivels across the middle of the screen.

With Video Decoder set to cuvid or DXVA2 CB, playback is flawless.

nussman
15th June 2012, 09:48
I don't know what that option does, but since it works with it it should be a good starting point.
Then DVBViewer waits for more video format informations.
This slows down channel switching, but some decoders need this informations.

In Graphstudio you should see the differences.

P.S. For fileplayback its always on - so you have to test it with LiveTV!

CiNcH
15th June 2012, 09:57
I don't know what that option does, but since it works with it it should be a good starting point.
Check the connection format between DVBSource and the decoder with GraphStudio for example. In case the detection is disabled, the DVBSource will propagate some default values on the video pin and the decoder has to detect the correct values by parsing the bitstream.

I have no clue however, why it works with standard EVR, but not with the EVR custom presenter.

meetajhu
15th June 2012, 12:39
hi nevcairiel, will be adding support for Windows Media Audio 9.2?

dansrfe
15th June 2012, 20:42
@ nevcairiel

Is I/O and copy/transfer from HDD -> RAM -> CPU -> RAM -> VIDEO RAM streamed or buffered?

nevcairiel
15th June 2012, 22:33
Both. :)

You should ask more specific questions if you want specific answers. :p

CruNcher
16th June 2012, 11:38
@nev
Decodinerror.ts is now falling back from Quicksync to libavcodec what is the detection reason for the fallback or is it out of your hands ?

nevcairiel
16th June 2012, 11:41
@nev
Decodinerror.ts is now falling back from Quicksync to libavcodec what is the detection reason for the fallback, or is it out of your hands ?

Half my files are named "decodingerror.ts" and the other half is named "sample.ts", so either link to the file you are referring to, or don't expect any answers.

CruNcher
16th June 2012, 11:45
This one http://www.mediafire.com/?rld8gnlh52f03ud that intel wanted to look into fixing which works on the Nvidia DSP just fine, now the fix seems to be a fallback to Software Decoding which though doesn't fix the main problem which would be Microsofts DTV Decoder (Intels Driver 2761) there the issue is still apparent ;)

nevcairiel
16th June 2012, 11:55
The Media SDK just fails when decoding the SPS/PPS of that file. Maybe egur can look more into that, but it looks like they just blocked it - maybe temporarily until it can be fixed for realz.

CruNcher
16th June 2012, 12:08
Thx i see so they seem to block it entirely and fallback by that to libavcodec instead of their own Software Decoder which i think would produce the same problematic result in this case thus also most probably why they cant fix it for Microsofts Decoder they have no libavcodec fallback possibility from there only their Software Decoder which most probably is also affected then by this SPS/PPS Decoding issue so a very Generic parsing Bug that affects both of their Decoder currently :)

I see also nothing changed on the Lav and Videolan DXVA crash state of

720p.mpg
test-720p cuda.mkv

on the Intel Driver i still wonder how long it will take till someone exploits this.

egur
16th June 2012, 14:30
I've confirmed the regression for this clip in driver 2752 though 2778, using older MSDK DLLs returns the old behavior - decode header passes and decoding produces artifacts.
With the above MSDK DLLs, the H264 header decode fails, don't know why, and thus my compatibility check fails too.
I'll report this bug tomorrow.

ipanema
16th June 2012, 16:32
I'm just trying LAV for the first time today, and I'm getting occasional crashes when seeking. I'm using the Microsoft MPEG-2 Demultiplexer which works well for all of the decoder's I've tried in the past (Mainconcept, Elecard, ffdshow etc).

It's been ages since I've had to tinker with the Microsoft MPEG-2 Demultiplexer, but as far as I recall it passes samples with a maximum size of 8192 bytes, so frames may be split into several output samples with the last one being smaller than 8192. Only the first sample for a frame carries a time stamp, the continuation samples have no time stamp. I mention this in case it helps.

The decoder seems to start streaming OK, but when I try to seek I sometimes get a crash in avcodec-lav-54.dll, exception code c0000005, and it is always at offset 00218b4f.

This is just with the default (no hardware accel) settings of LAV.

nevcairiel
16th June 2012, 16:57
As far as i know, you can't just use the MS Demultiplexer, you need an application to properly configure it for usage, so i cannot really test it unless you tell me which application you're using specifically.
While you're at it, providing a sample file that causes such a crash will greatly help to analyse and fix the problem.

wanezhiling
16th June 2012, 17:00
@nev

For some WMP users (some of my friends), a tray is really useful when using lav splitter to play back mkv files which integrate several audio tracks.

I know you have no that plan, but don't close the door please.

sneaker_ger
16th June 2012, 19:20
ftp://ftp.heise.de/pub/ct/spezial/shuttle.mpg
Crashes LAV Splitter 0.50.5 stable.

nevcairiel
16th June 2012, 19:26
ftp://ftp.heise.de/pub/ct/spezial/shuttle.mpg
Crashes LAV Splitter 0.50.5 stable.

No crash on latest Git for me.

sneaker_ger
16th June 2012, 19:30
Yes, seems to be working. No more crash with this:
https://forum.doom9.org/showpost.php?p=1578054&postcount=11285

ontherocks
16th June 2012, 19:40
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

dansrfe
16th June 2012, 19:54
@ nevcairiel and anyone else you can help me understand what exactly is going on

http://s13.postimage.org/u7erxxvwl/graphs.png

This is a screenshot of my CPU, System RAM, GPU, Video RAM, and I/O graphs along with madVR's OSD while playing a 1080p 10bit file and upscaling it to 2016 x 1134 in windowed mode (I couldn't take a screenshot in exclusive mode but in reality I upscale it to the full resolution of my monitor which is 2048 x 1152 @ 60Hz). Basically I'm dropping frames whether I upscale it to 1152p60 or play it at output 1080p24 on my other screen. It doesn't look like a decoding problem since the queue is full but I can't tell.

The only items in my filter chain are MPC-HC, madVR, LAV Filters. LAV has been set to CPU decoding. All of them are at the latest version. CPU: C2D @ 2.66Ghz. RAM: 4GB DDR2 800MHz.

I can't figure out why my GPU cannot upscale to 2048 x 1152 with anything other (higher quality) than bilinear. Currently I'm using SoftCubic 50 for chroma and Spline 3 taps for luma up/down scaling.

Thanks.

kasper93
16th June 2012, 20:39
@dansrfe
Reduce queue size in madVR options, because all your gpu memory is used and that may cause dropped frames.

Pat357
16th June 2012, 22:14
Nev,

I have a strange problem with lavfilters, probably related to the LAVsplitter.
I created a .m2v file from my .avs script using Hank's HC MPEG2 encoder.

The file has 165350 frames, but when I use LAVsplitter, I can not seek above frame 85907. The slider from MPC-HC is then completely to the right.

When I just change the splitter to MPC-HC's internal, I don't have this problem (ie I CAN seek to the end at frame 165350).

This is the info from LAVsplitter :

Filter : LAV Splitter Source - CLSID : {B98D13E7-55DB-4385-A33D-09FD1BA26338}

- Connected to:

CLSID: {EE30215D-164F-4A92-A4EB-9D4C13390F9F}
Filter: LAV Video Decoder
Pin: Input

- Connection media type:

Video: MPEG2 Video 720x576 (16:9) 25fps 9300kbps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: MEDIASUBTYPE_MPEG2_VIDEO {E06D8026-DB46-11CF-B4D1-00805F6CBBEA}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 0
bTemporalCompression: 1
lSampleSize: 1
cbFormat: 282

VIDEOINFOHEADER:
rcSource: (0,0)-(720,576)
rcTarget: (0,0)-(720,576)
dwBitRate: 9300000
dwBitErrorRate: 0
AvgTimePerFrame: 400000


I've a possible explanation for this : LAVsplitter calculates the length of the movie using the bitrate 9300.
This is the max. bit rate i had set (max. for DVD player compatibility), the video is 2 pass with an average from 4832 or something like that.
This would explain this behavior.

I guess MediaInfo and also the internal MPC-splitter somehow figure out the total nr. of frames and multiply this by the frame-time (file is CFR).

This is what MediaInfo says :

Algemeen
Volledige naam : K:\film\limitedsharpen_met_MC'd_FFT3dfilter_via_MVTools20.m2v
Formaat : MPEG Video
Formaatversie : Version 2
Bestandsgrootte : 3,72 GiB
Duur : 1h 50mn
Totale bitratemodus : Variabel
Totale bitrate : 4 832 Kbps

Video
Formaat : MPEG Video
Formaatversie : Version 2
Formaatprofiel : Main@Main
Formaatinstellingen, BVOP : Ja
Formaatinstellingen, Matrix : Aangepast
Duur : 1h 50mn
Bitrate-modus : Variabel
Bitrate : 4 832 Kbps
Maximale bitrate : 9 300 Kbps
Breedte : 720 pixels
Hoogte : 576 pixels
Beeldverhouding : 16:9
Framerate : 25,000 fps
Standaard : PAL
ColorSpace : YUV
ChromaSubsampling : 4:2:0
BitDepth/String : 8 bits
Scansoort : Progressief
Bits/(Pixel*Frame) : 0.466
Stroomgrootte : 3,72 GiB (100%)


Any idea how to fix this ?

PS : neither FFmpeg is able to determine the movie length : estimation based on bit rate (9300) : gives wrong duration.

nevcairiel
17th June 2012, 06:24
The file has 165350 frames, but when I use LAVsplitter, I can not seek above frame 85907. The slider from MPC-HC is then completely to the right

Can you create a small file that demonstrates the problem?
No sample, no fixings. :d

ipanema
17th June 2012, 14:36
As far as i know, you can't just use the MS Demultiplexer, you need an application to properly configure it for usage, so i cannot really test it unless you tell me which application you're using specifically.
While you're at it, providing a sample file that causes such a crash will greatly help to analyse and fix the problem.

The demux is part of a test environment here, so not possible to extract anything that would demonstrate the problem, without writing a new standalone program. So I guess we will have to park this for now.

Interestingly the example DS decode filter that is supplied with Intel Media SDK works fine, as do other decoders.

nevcairiel
17th June 2012, 15:03
Well if you cant give me anything to work with, i'm afraid i cannot help you.
For crashes, its crucial to be able to reproduce them, or fixing them is nearly impossible.

ipanema
17th June 2012, 16:51
Well if you cant give me anything to work with, i'm afraid i cannot help you.
For crashes, its crucial to be able to reproduce them, or fixing them is nearly impossible.

I understand and that's OK. We can carry on using other decoders as before. I wasn't sure whether the offset value alone would lead to the problem, so thought it worth mentioning.

dansrfe
17th June 2012, 17:16
@dansrfe
Reduce queue size in madVR options, because all your gpu memory is used and that may cause dropped frames.

Well that definitely worked. No frame drops or delays and even skipping back and forth is much snappier and smoother now. New queue sizes are pretty low but if that's what it takes then I guess I'll have to stick with it.

New queue sizes: 8/4/4/4

Thanks kasper93!

Pat357
17th June 2012, 18:19
Can you create a small file that demonstrates the problem?
No sample, no fixings. :d

Here's a small sample showing the problem :

http://www.mediafire.com/?uhpcg79jq7efzi7

nevcairiel
17th June 2012, 19:43
Here's a small sample showing the problem :

http://www.mediafire.com/?uhpcg79jq7efzi7

Which filter exactly you said produced the correct duration?
I can't seem to get the internal MPC-HC splitter to take over, and the fallback Microsoft splitter reports the same duration as LAV. (19 seconds for that file)

Sadly there is no functionality in place yet to actually measure the bitrate of a file and produce a duration based on that, but i suppose its a possiblity for the future.
I tried something quick and dirty, and it took reading until nearly half the file until the bitrate was accurate enough to calculate the duration properly (about 10MB in this case)

I would generally recommend to store it in an actual container format, instead of full raw video.

Pat357
18th June 2012, 02:33
Which filter exactly you said produced the correct duration?
I can't seem to get the internal MPC-HC splitter to take over, and the fallback Microsoft splitter reports the same duration as LAV. (19 seconds for that file)

Sadly there is no functionality in place yet to actually measure the bitrate of a file and produce a duration based on that, but i suppose its a possiblity for the future.
I tried something quick and dirty, and it took reading until nearly half the file until the bitrate was accurate enough to calculate the duration properly (about 10MB in this case)

I would generally recommend to store it in an actual container format, instead of full raw video.
What exactly should I store in the container ? Does an .MPG container (or .VOB) even have a field to store it ?
What about MKVmerge (MKV) or MP4Box(MP4) ? Where can I put what information ?

I must admit it was not the MPC-HC MPEG splitter that gave me correct durations : it's the MediaConcept MPEG demuxer that allows me to seek to the end...
Any idea how they do it ?

Also MediaInfo seems to be able to determine the movie length.
It displays both the average bit-rate and the max bitrate.

I gonna test with other mpeg-splitters too : cyberlink, arcsoft,.... and see what comes out.

nevcairiel
18th June 2012, 06:59
What exactly should I store in the container ? Does an .MPG container (or .VOB) even have a field to store it ?
What about MKVmerge (MKV) or MP4Box(MP4) ? Where can I put what information ?

Its simple MPEG2 video, you can store it in most containers available. MPEG-PS (.mpg/.vob) is one of the options, and it contains full timestamps which makes duration and seeking much easier. Of course you can also go with MKV or MP4 if you want.

The main problem with raw video (without a container around it) is that you can't know how many frames a file contains without counting them (or if you have CBR), so anything you try will be guesswork, accuracy depending on how much data/effort you put into it.

ajp_anton
19th June 2012, 06:58
For seeking in raw video, would it be possible to just go by filesize instead of actual duration?
Don't know if the media player can show the current location correctly, but at least when seeking, maybe you could just jump to x% of the filesize and return the next available frame.

ney2x
19th June 2012, 18:25
I just found out that there is a MPC-HC Lite here (http://xhmikosr.1f0.de/mpc-hc/lite/) , without Internal Filters. I hope someone will build a MPC-HC Lite with integrated LAV Filters only... xD

DeadlyEmbrace
20th June 2012, 10:57
I just found out that there is a MPC-HC Lite here (http://xhmikosr.1f0.de/mpc-hc/lite/) , without Internal Filters. I hope someone will build a MPC-HC Lite with integrated LAV Filters only... xD

That would be really cool, although I think I prefer it when the filters are external. Makes it a lot easier to update the separate pieces.

kitame
20th June 2012, 12:06
That would be really cool, although I think I prefer it when the filters are external. Makes it a lot easier to update the separate pieces.

how about having it work like an external plugin? where replacing some of the files updates it without issues.

i think its a good idea imho, with this the player can be fine-tuned to work perfectly with LAVs and the simplicity of updating it would be a plus.

DeadlyEmbrace
20th June 2012, 14:12
how about having it work like an external plugin? where replacing some of the files updates it without issues.

i think its a good idea imho, with this the player can be fine-tuned to work perfectly with LAVs and the simplicity of updating it would be a plus.


That would be awesome, but I fear it will require quite a bit of work. If I have some free time I might start looking into it, although I can't promise anything.

kasper93
20th June 2012, 14:33
how about having it work like an external plugin? where replacing some of the files updates it without issues.

How about you make patch for MPC-HC? I guess many people likes idea of integrating LAVF into MPC-HC, but till someone make a patch we will not have it. And it's wrong thread for that discussion.

Keiyakusha
20th June 2012, 18:13
Idea about integrating LAV and MPC-HC is around for a long time. AFAIR even before LAV was released to the public. Year? Or more already? While its a not bad idea, we still need someone to actually code it. Right now there is no developers that can do it.
Personally I like it how it is now. MPC-HC lite and separate LAV. Instead I still have hope that nev will find some time/motivation to add avisynth support to LAV, which uses avisynth api to load scripts. I still think this is the best middle-ground between those who wants filters in LAV, and those who against it.

SamuriHL
20th June 2012, 19:06
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.

hoborg
20th June 2012, 19:37
Question about MP3 in *.ISO file playback.

Hi.
I was thinking about a way how to store a mp3 album into one file and still be able to play it by using DS player.
Firstly, i was trying RARsource filter, but after open the RAR file, it will ask what file to play instead to play first one.

So i put them to iso file and by accident i noticed, that such ISO file can be played in Graphstudio - what a surpise for me. But it will play as one 40min file.

My question - is it possible to somehow support jump to next/prev. MP3 track ?

Keiyakusha
20th June 2012, 19:49
You can put all mp3 in mkv as separate tracks. You will be able to chose track then and it will be one file. Not sure about navigating... Or you can make one single mp3, again put it in mkv or mp4 but this time add chapters. This will work as you want. mkvtoolnix even supports some cues. Don't know what it means but maybe it even can make chapters from .cue file? Who knows...

hoborg
20th June 2012, 19:52
You can put all mp3 in mkv as separate tracks. You will be able to chose track then band it will be one file. Ot you can make one single mp3, again put it in mkv or mp4 but this time add chapters. This will work as you want.

Well, i already tryed that. But this will "destroy" original files, and that is not what i like to do.

Keiyakusha
20th June 2012, 19:54
Well, i already tryed that. But this will "destroy" original files, and that is not what i like to.

Not sure if I understand how it destroys anything... you will be able to extract mp3 back if needed.

hoborg
20th June 2012, 20:03
Not sure if I understand how it destroys anything... you will be able to extract mp3 back if needed.

I mean tags in MP3 will be lost, or not?

nevcairiel
20th June 2012, 21:21
In case anyone is interested, i replaced the GCC compiler used for LAV by another build.
It still uses the same basic MSYS environment as assembled by XhmikosR, but a different build of the GCC compiler. The main difference is that i am now using the same edition of the compiler for both 32-bit and 64-bit, the old environment used the legacy mingw setup for 32-bit and the new mingw-w64 setup for 64-bit. Now both builds use the same mingw-w64 runtime, which is more up2date and much better maintained these days.

Additionally, the compiler has been upgraded to GCC 4.7.1 stable.

You can get the compiler i use from now on here:
http://files.1f0.de/mingw/

To use it, i would suggest to download XhmikosR's MSYS bundle from http://xhmikosr.1f0.de/tools/, remove/rename the "mingw" directory included in that bundle, and replace it with the one from my .zip. Maybe i'll provide a complete bundle as well some day...
Of course using his bundle without any change should continue working (mostly) fine.

I do not know if the new GCC setup will work building MPC-HC or ffdshow, because i don't do that, so feel free to try. ;)

SamuriHL
20th June 2012, 21:40
Woa man! Do we need the static libs in therre, too, or just the compiler? This will be fun.

nevcairiel
20th June 2012, 21:42
Woa man! Do we need the static libs in therre, too, or just the compiler? This will be fun.

My zip contains GCC as well as static libs for zlib and the bz2 lib, which should be everything thats needed for building. Everything else is included in LAVs repository.

SamuriHL
20th June 2012, 21:43
I mean the libspeex stuff but I remember that from May. I don't think we need that for this. So I'll give it a try and see what happens. :D