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

Name User
16th June 2013, 01:43
I was using Haali Media Splitter at first, but decided to switch to LAV Filters and noticed when making GIF files with AvsPmod, the file sizes are mostly different.

The smaller sizes with LAV are welcome, but some are bigger. One of the GIFs with Haali is 3.80 MB and the same one with LAV Filters is 5.03 MB.

What causes them to be smaller/bigger with LAV Filters?

ryrynz
16th June 2013, 08:05
Nevcairiel is there any performance improvement to be had with a Haswell based CPU with -march=core-avx2 switches in GCC4.8.1 with LAV?
This article here (http://www.phoronix.com/scan.php?page=article&item=intel_core_avx2&num=1) shows some substantial benefits with some apps.

nevcairiel
16th June 2013, 08:07
All the important code is manually asm optimized in ffmpeg. The difference would be marginal.

Edit:
Did a quick test.

The default build measured an average of 121.19 fps on my choosen sample.
Using -march=core-avx2, the average was 122.71 fps (or 101.2%), hardly worth the custom build, if you ask me.

You can probably get some more speed by adding AVX2 variants of the handwritten ASM code in some situations, though.

petran79
16th June 2013, 16:41
Having two gpus messes up the system...

I have a laptop with an optimus card (nvidia gt555m and intel 3000)

Lav 64 detects cuvid (nvidia gpu light flashes)
It also detects dvxa through intel card. Nvidia light doesnt flash. So lav detects the card but quicksync codec isnt detected

.

for the record, this problem occurs only with Potplayer 64-bit version and LAV Video. Havent tested any other players.

In MPC-HC 64-bit, Intel Quicksync is detected without problems

wanezhiling
17th June 2013, 05:41
Run your PotPlayerMini64.exe in iGPU mode.(go into Nvidia Control Panel to set that.)

ryrynz
17th June 2013, 05:46
Did a quick test.

The default build measured an average of 121.19 fps on my chosen sample.
Using -march=core-avx2, the average was 122.71 fps (or 101.2%), hardly worth the custom build, if you ask me.

Interesting, you were bang on and yes for 1% difference it's not worth it.


You can probably get some more speed by adding AVX2 variants of the handwritten ASM code in some situations, though.

One can hope one of the devs will take an interest in optimizing some code in the future.

Aleksoid1978
17th June 2013, 07:26
nevcairiel

I see you add support for G2M2/G2M3 - but ffmpeg do not support decoding this video.

wanezhiling
17th June 2013, 08:03
About G2M, here is a sample: http://www.sendspace.com/file/ftysdu

blackscreen with lav, fine with offical codec (https://www1.gotomeeting.com/downloads/711919949/C58E664F486384B/null/manualFull/InstallCodec/g2m_codec.exe) :)

Aleksoid1978
17th June 2013, 08:10
About G2M, here is a sample: http://www.sendspace.com/file/ftysdu

blackscreen with lav, fine with offical codec (https://www1.gotomeeting.com/downloads/711919949/C58E664F486384B/null/manualFull/InstallCodec/g2m_codec.exe) :)

Because ffmpeg do not support:

if ((magic & 0xF) != 4) {
av_log(avctx, AV_LOG_ERROR, "G2M2 and G2M3 are not yet supported\n");
return AVERROR(ENOSYS);
}

mecedo
17th June 2013, 09:53
Hi. Can you check this sample:

https://hotfile.com/dl/229086480/56191cb/LAV_error_-_Poklosie_(2012).m2ts.html

I can't manage it. With nvidia GPU it plays without any problems. But on computers with Intel HD Graphics when hardware acceleration is used with LAV Splitter then this movie stutters every second. Changing splitter from LAV Splitter to any other resolves problem.

nevcairiel
17th June 2013, 20:33
I see you add support for G2M2/G2M3 - but ffmpeg do not support decoding this video.

I only copies the FourCCs that ffmpeg recognized for this format, i disable those two again now.

nevcairiel
17th June 2013, 21:00
Hi. Can you check this sample:

https://hotfile.com/dl/229086480/56191cb/LAV_error_-_Poklosie_(2012).m2ts.html

I can't manage it. With nvidia GPU it plays without any problems. But on computers with Intel HD Graphics when hardware acceleration is used with LAV Splitter then this movie stutters every second. Changing splitter from LAV Splitter to any other resolves problem.

I can reproduce the issues, i'll have a look.

Della
17th June 2013, 21:07
Please pardon the newbie type question, but with a new i7 Ivy Bridge, 16gB Ram & SSD build with Nvidia GTX 460 could someone please recommend the best video acceleration method? I'm currently using CUVID, but was wondering if perhaps Intel QuickSync or maybe none would be a better choice.
Thank you.
Della (Dog)

itsonlyjustincase
18th June 2013, 11:40
Depends on what you want to do but overall i'd say QS is the best thing to use

Della
18th June 2013, 12:18
Depends on what you want to do but overall i'd say QS is the best thing to use

Thank you. It's playback quality I am most concerned with, I don't much care about power consumption.

nevcairiel
18th June 2013, 12:19
If you have enough CPU performance, i would use software decoding, its the most reliable and least error prone.
As an alternative, DXVA2 Copy-Back would be my second choice. All others all have some sort of caveats or limitations.

Della
18th June 2013, 12:35
If you have enough CPU performance, i would use software decoding, its the most reliable and least error prone.
As an alternative, DXVA2 Copy-Back would be my second choice. All others all have some sort of caveats or limitations.

Thank you sir, that is exactly what I suspected.

My concern was that one of the other acceleration methods somehow improved quality by allowing playback improvements that software decoding limited because of horsepower.

I'll select NONE for hardware acceleration.

petran79
18th June 2013, 16:23
Run your PotPlayerMini64.exe in iGPU mode.(go into Nvidia Control Panel to set that.)

Same result. Avcodec is active but it reads from nvidia gpu, not intel igpu. Because quicksync is not detected and nvidia light is on. I'd also know from the cpu fan not going active,since there is help from nvidia gpu.
While on mpc hc 64 it reads only from igpu and theres higher cpu load.

nevcairiel
18th June 2013, 16:24
Hi. Can you check this sample:

https://hotfile.com/dl/229086480/56191cb/LAV_error_-_Poklosie_(2012).m2ts.html

I figured out whats wrong with this file, but i'm not sure how to safely fix it without potentially breaking other stuff.

One possible fix would be to turn off the Annex B -> AVC1 conversion. Does anyone still use a broken decoder that can't deal with Annex B H.264 streams?

I'll probably have to think about this for a while. Its a very rare issue, and i don't want to break other stuff by fixing this one file. So don't expect a fix soon, sorry.

wanezhiling
18th June 2013, 16:37
@petran79, whats the result of 32bit player? (PotPlayerMini.exe and mpc-hc.exe)

SeeMoreDigital
18th June 2013, 16:45
I figured out whats wrong with this file, but i'm not sure how to safely fix it without potentially breaking other stuff.

One possible fix would be to turn off the Annex B -> AVC1 conversion. Does anyone still use a broken decoder that can't deal with Annex B H.264 streams?

I'll probably have to think about this for a while. Its a very rare issue, and i don't want to break other stuff by fixing this one file. So don't expect a fix soon, sorry.I've just discovered that if mecedo's .m2ts source is re-muxed into the .MKV container, it plays okay ;)

Soukyuu
18th June 2013, 17:13
What could be the reason for LAV taking longer to jump to certain mkv chapters? For example, a jump to 00:12:20.573 takes <1 second, a jump on the same file to 00:12:20.570 take 1-3 seconds to complete, using the same jumping sequence (e.g.: jumping OP -> partA -> partB)

sneaker_ger
18th June 2013, 17:17
Seeking performance is highly depended on the position of the keyframes. If there's a keyframe at exactly 00:12:20.573, but the preceding one is at 00:12:15.000, the seeking will take way longer for the 570 seek. Look up the keyframe positions to see if this is the case.

DarkSpace
18th June 2013, 17:19
What could be the reason for LAV taking longer to jump to certain mkv chapters? For example, a jump to 00:12:20.573 takes <1 second, a jump on the same file to 00:12:20.570 take 1-3 seconds to complete, using the same jumping sequence (e.g.: jumping OP -> partA -> partB)
That depends on the file, but one possible reason is that there is no seekpoint at the Chapter Point. In this case, I define a seekpoint as a point from where the video and audio streams can be decoded without requiring data from before that point in time. With an AVC Video Stream, this means that at this timecode, there's a Keyframe.

nevcairiel
18th June 2013, 17:28
I've just discovered that if mecedo's .m2ts source is re-muxed into the .MKV container, it plays okay ;)

The problem with the file is that its muxed badly, so remuxing would fix it, indeed.

What could be the reason for LAV taking longer to jump to certain mkv chapters? For example, a jump to 00:12:20.573 takes <1 second, a jump on the same file to 00:12:20.570 take 1-3 seconds to complete, using the same jumping sequence (e.g.: jumping OP -> partA -> partB)

Like the others said, if there is a seek point, it'll seek basically instantly, otherwise it'll seek to the previous seek point and decode from there, depending on the speed of the decoder this can take a bit longer.
So assuming there is a seek point at 00:12:20.573, there obviously isn't going to be one just 3ms before.

SeeMoreDigital
18th June 2013, 18:19
The problem with the file is that its muxed badly, so remuxing would fix it, indeed.
Looks as though TSDoctor is able to repair the .m2ts stream so it can be played with LAV Filters ;)

nevcairiel
18th June 2013, 18:21
Which would indicate its broken, yes? :)

SeeMoreDigital
18th June 2013, 18:26
Which would indicate its broken, yes? :)Actually, I've just noticed that when I installed TSDoctor, it sneakily installed Haali's splitter as well. And it was this splitter that enabled the .m2ts file to be played :scared:

As soon as I removed Haali's splitter, the .m2ts file would not play correctly :mad:

nevcairiel
18th June 2013, 18:28
I can change some knobs in LAV Splitter as well and it will play properly, but i'm somewhat certain that it might break other files instead, or interaction with some decoders, so its all a bit complicated.
I'll keep thinking about it, i put it on my task list so its not forgotten.

Aleksoid1978
19th June 2013, 00:17
nevcairiel

Hi. Can you add support Crop parameters from matroska files in splitter. Set this parameters to VIDEOINFOHEADER->rcSource/rcTarget.

MPC-BE:
http://s019.radikal.ru/i619/1306/50/5ec76d1c9bc6t.jpg (http://radikal.ru/F/s019.radikal.ru/i619/1306/50/5ec76d1c9bc6.png.html)


Video: MPEG4 Video (H264) 854x480 25fps

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

VIDEOINFOHEADER:
rcSource: (70,40)-(600,400)
rcTarget: (70,40)-(600,400)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 400000


MPC-BE + LAV Source:
http://s53.radikal.ru/i140/1306/ac/8881e2605968t.jpg (http://radikal.ru/F/s53.radikal.ru/i140/1306/ac/8881e2605968.png.html)


Video: MPEG4 Video (H264) 854x480 (137:77) 25fps

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

VIDEOINFOHEADER:
rcSource: (0,0)-(854,480)
rcTarget: (0,0)-(854,480)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 400000


sample - http://aleksoid.voserver.net/Sample/cropping_sample.mkv

nevcairiel
19th June 2013, 07:13
Maybe later, not happening soon, too many problems involved to do it properly.

Kinjal
19th June 2013, 07:44
Nevcairiel
Can you please:
1. add support for chapters(cuesheets) in ape/flac/wv?
2. add support for more ID3 tags in MP3?
MPC, Internal filters:
http://light-alloy.ru/temp/mpc-internal_filters.png
MPC, Lav Splitter:
http://light-alloy.ru/temp/mpc-lavsplitter.png

File for test:
http://light-alloy.ru/_nev/02_Theme_Of_SSS.mp3

3. Add support for IDSMResourceBag / IPropertyBag interface, so media players will be able to request and show covers(which could have mimes: image/jpeg, image/jpg, image/png) from mp3/flac/ape (without depending on MediaInfo).

Thanks :)

petran79
19th June 2013, 07:47
@petran79, whats the result of 32bit player? (PotPlayerMini.exe and mpc-hc.exe)

they detect the codec properly (quicksync in LAV Video)
same with mpc hc-64 (quicksync in LAV Video)

but in Potplayer 64 If I set it to Quicksync I get avcodec instead. Quicksync is not detected and Nvidia GPU decodes through avcodec. Same if I set it to software mode. Avcodec and Nvidia are used instead.

cuvid and dvxa codecs are detected properly through Nvidia.

hence I dont know if its a Potplayer 64, LAV 64 or Windows 7 issue

nevcairiel
19th June 2013, 08:23
Nevcairiel
Can you please:
1. add support for chapters(cuesheets) in ape/flac/wv?
2. add support for more ID3 tags in MP3?
3. Add support for IDSMResourceBag / IPropertyBag interface, so media players will be able to request and show covers(which could have mimes: image/jpeg, image/jpg, image/png) from mp3/flac/ape (without depending on MediaInfo).


I put these on my task list, but not sure when i'll get to it.

Nicola
19th June 2013, 15:01
1. Thank you for adding suppost for ordered chapters and segment linking.

2. I found a small issue with one .mkv which uses ordered chapters, plays fine with haali or smplayer; what do you need and where should I post the thing? the 2 feedback link on 1st page don't work (I get a 404).

nevcairiel
19th June 2013, 15:43
I need the file that has problems, or at least the part of the file with the problem. If a smaller part can reproduce the issue properly, that is preferable.
Upload the sample somewhere, DropBox or Google Drive or Sky Drive, or one of the free hosts like MediaFire, and just link it here or PM me the link.

Nicola
19th June 2013, 16:16
OK, I'll see what I can do, slow up here.
Oh, now those 2 links load. gotta check my dns settings.

Nicola
19th June 2013, 16:31
OK, got lucky and the stuff is still on the web.

(links removed)

The glitch happens at the end of the episode, just before the ending theme (1s before the chapter), some frame get repeated fast, and then the ED starts.
Other episodes exibit the same behaviour (just with lav splitter, haali is fine, and smplayer too).
I put there the OP in case you want to check it too.

nevcairiel
19th June 2013, 17:01
Thanks, i'll have a looksie. Sounds odd though, usually with the ED in its own file, there shouldn't be any hiccups. But i'll see whats going on!

Edit:
One thing i know is that it doesn't actually link to the ED, it has its own ED inside the file.

nevcairiel
19th June 2013, 19:14
I managed to fix this specific file by tweaking some values, however i'll have to think about a more generic solution for this specific problem.

The real problem is that the chapter for the ending isn't perfectly on the same timecode as the Cue, so seeking is getting a bit weird there.
Now i tweaked the fuzzy matching for this, so that it'll look for a Cue point within the duration of one frame, because that would end up the same anyway. This file is only 10ms off with its Chapter, and the frames are 41ms, so that works out, but its still only a "fuzzy" solution, so, meh.

I'll put it on my list.

Nicola
19th June 2013, 20:19
It doesn't link to the external ED? mmm, curious, maybe ext ED is used by later eps only?
Nice being on your list, it is a good thing. Thanks.
In any case, you can always check how smplayer handles this.
As soon the next lav is out I'll check all of those pesky files.
(removed the links)

Aleksoid1978
19th June 2013, 23:20
hi nevcairiel
Question - why do you have such an output channel mask:
http://i.imgur.com/KhqHz7R.png

Why is different. I think it's must equal.

I check other audio with different channels - it's happened only with 5.1 input.

DarkSpace
19th June 2013, 23:55
hi nevcairiel
Question - why do you have such an output channel mask:
Why is different. I think it's must equal.
I check other audio with different channels - it's happened only with 5.1 input.
You probably have the Option to convert to standard Channel Layouts enabled in LAV Audio.

kasper93
20th June 2013, 00:35
I found minor bug changing mixer options work instantly, but "status" tab is not updated to reflect changes.

Aleksoid1978
20th June 2013, 00:45
You probably have the Option to convert to standard Channel Layouts enabled in LAV Audio.

No - i enable/disable this options. Do not change. And - 5.1 it's a standard channel layout.

DarkSpace
20th June 2013, 02:09
No - i enable/disable this options. Do not change. And - 5.1 it's a standard channel layout.
Okay, my apologies then. This sounds weird, indeed. Is it specific to ac3 files? Anyway, I believe a sample may help.

Aleksoid1978
20th June 2013, 02:35
Okay, my apologies then. This sounds weird, indeed. Is it specific to ac3 files? Anyway, I believe a sample may help.

Any 5.1 audio. Open any files with 5.1 audio and see channel mask in LAV Audio 'status' tab.

truexfan81
20th June 2013, 07:11
Any 5.1 audio. Open any files with 5.1 audio and see channel mask in LAV Audio 'status' tab.

i love it when i look at my LAV and see it say "bitstreaming" :D

Aleksoid1978
20th June 2013, 07:28
i love it when i look at my LAV and see it say "bitstreaming" :D

What about FLAC/PCM 5.1 :) ???

truexfan81
20th June 2013, 08:17
What about FLAC/PCM 5.1 :) ???

have to use a different decoder for that, with a slight quality loss i can have ffdshow tryouts encode it to ac3 5.1 and bitstream it

receiver is old enough it doesn't have hdmi, so i use toslink