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

dann23
25th September 2010, 17:23
And I have another feature request. is it possible to make a configuration file where to specify for what formats to register?
Also I found a bug. If I'm using ffdshow dxva, I can't choose external subtitles and no external subtitle is used. If I'm not using dxva mode than external subtitles works but I can't choose the right one (I have some subtitles in the same folder as my movie).

nevcairiel
25th September 2010, 21:52
Is it possible to add support for amr and bink files?
Sample files?

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?

I didn't really put more work in it so far. I can try again, but it proves to be quite difficult as libavformat doesn't understand it either.

And I have another feature request. is it possible to make a configuration file where to specify for what formats to register?

This will be in the config GUI.

Also I found a bug. If I'm using ffdshow dxva, I can't choose external subtitles and no external subtitle is used. If I'm not using dxva mode than external subtitles works but I can't choose the right one (I have some subtitles in the same folder as my movie).

External subtitles are not handled by the splitter, so i would vote for a ffdshow bug.

Jeffster
26th September 2010, 02:30
I didn't really put more work in it so far. I can try again, but it proves to be quite difficult as libavformat doesn't understand it either.

Thanks. :o Any efforts you can put in that direction, when you have the time and inclination of course, would be greatly appreciated by many I'm sure.

I must admit I got my hopes up perhaps too quickly when I saw this thread because the only applications that can understand and work with my TS files, and the LATM audio, are VLC and Handbrake which I tend to associate with libavformat/libavcodec (rightly or wrongly) but that probably doesn't mean anything.

dann23
26th September 2010, 05:36
Links with sample for amr and bink files
http://www.mediafire.com/?1353t5kyt9oya5c
http://www.mediafire.com/?8xbs4o87761afgx

And about the settings that will be in the GUI it's fine. but if I'm using regsrv32 to register the filter, how can I specify for what types to register before doing this?

nevcairiel
26th September 2010, 08:28
And about the settings that will be in the GUI it's fine. but if I'm using regsrv32 to register the filter, how can I specify for what types to register before doing this?

You can't. But after registering you can open the properties page (once its implemented), and turn off the formats you don't want it to handle.
It'll still be registered for those formats, but when a player tries to use it for a mkv file, and you turned mkv off, it'll just fail silently, and the player will try the next source filter.

Sebastiii
26th September 2010, 10:02
You can't. But after registering you can open the properties page (once its implemented), and turn off the formats you don't want it to handle.
It'll still be registered for those formats, but when a player tries to use it for a mkv file, and you turned mkv off, it'll just fail silently, and the player will try the next source filter.

Thanks, effectively it would be great :)
I always have pb with Mediaportal :( i try like we suggest with Tourettes but it doesn't work well too :(
I don't know how to help on this. I try on many version i have (for mediaportal final and svn and LAVF latest source too).
But i have also this issue with MPC-HC many times the video don't start and the player is freeze.
I suppose it's on splitter side and no Libavformat but i'm not sure too.
Again :) it's really appreciate the work you made m8 :) and also alone.
+++

Virtual_ManPL
26th September 2010, 11:37
It works fine here with the latest git.
Odd, in my case I use MPC-HC internal decoders & external Xvid and I can't get LAVFSplitter to work with AVI files.
Can you or someone confirm this ?

Virtual_ManPL
3rd October 2010, 21:17
nvm guys, I find finally what causes it

http://github.com/Nevcairiel/LAVFSplitter/issues/#issue/25

nevcairiel
4th October 2010, 11:12
Why can't everyone just speak english. =(
I probably know how to fix it, will try when i get home later today.

In related news, my time has been somewhat occupied with other projects that had an approaching deadline, and probably will be for at least a couple more weeks.

I'll release the last version i'm comfortable with as 0.10 soon, to fix more media playback issues. Guess stream/language selection has to wait again.

renethx
4th October 2010, 15:20
@nevcairiel

Will you add the support for ArcSoft Audio Decoder HD (TMT2/TMT3) to decode DTS-HD (and TrueHD) to LPCM? The trick in this post (http://forum.doom9.org/showthread.php?p=1446017#post1446017) works fine for DTS-HD decode with any DirectShow player + MPC MPEG Source (Gabest) + ArcSoft Audio Decoder HD (my own test (http://www.avsforum.com/avs-vb/showthread.php?p=19282099#post19282099)).

MPC MPEG Source (Gabest) + ArcSoft Audio Decoder HD does not work for TrueHD decode (silent). In the same split: MPC MPEG Source (Gabest) presents TrueHD as MEDIASUBTYPE_DOLBY_AC3 {E06D802C-DB46-11CF-B4D1-00805F6CBBEA} and the Arcsoft Demuxer presents the stream as {4288B843-610B-4E15-A53B-43007FCFF614}. So I opened MpegSplitter.ax in a hex editor and replace the two occurences of the hex string "2C806DE046DBCF11B4D100805F6CBBEA" with "43B888420B61154EA53B43007FCFF614" in the file. This worked to some extent, but not perfect...

nevcairiel
4th October 2010, 16:18
I already added support for using the ArcSoft decoder for DTS. TrueHD has another special media type as well?

SamuriHL
4th October 2010, 16:22
Yes, and it doesn't pass it properly in its own chain, either. MKV's, for example, won't play with TrueHD sound. I've reported it to ArcSoft so maybe that'll eventually get fixed.

renethx
4th October 2010, 17:30
I already added support for using the ArcSoft decoder for DTS. TrueHD has another special media type as well?
Hmm, lavf dshow source filter (v0.9) never connects ArcSoft Audio Decoder HD (TMT3) directly. :confused: It still presents DTS-HD as MediaSubType_DTS, the same as MPC source filters for DTS-HD, which is not a media subtype supported by AS decoder. Hex edit (http://forum.doom9.org/showthread.php?p=1446017#post1446017) makes it connect to AS decoder. DTS (non-HD) in DVD is fine with lavf dshow source filter/MPC source filters + ArcSoft Audio Decoder HD.

ArcSoft Demuxer presents TrueHD as {4288B843-610B-4E15-A53B-43007FCFF614}, while lavf dshow source filter/MPC Mpeg/Matroska source filter presents it as MEDIASUBTYPE_DOLBY_AC3 {E06D802C-DB46-11CF-B4D1-00805F6CBBEA}. So these filters won't work with ArcSoft Audio Decoder HD for TrueHD. These source filters still connect to AS decoder because MEDIASUBTYPE_DOLBY_AC3 is one of the supported media types of AS decoder (for AC3, not for TrueHD).

nevcairiel
4th October 2010, 20:59
It was added after 0.9 :p MEDIASUBTYPE_DTS2 is it, btw

In any case, why use ArcSoft for TrueHD?

renethx
4th October 2010, 21:21
It was added after 0.9 :p

In any case, why use ArcSoft for TrueHD?
I am not pretty sure about this point. For example, suppose that a user with an analog sound card wants to play M2TS/MKV files with HD audio tracks, TrueHD or DTS-HD. So he has to use both ffdshow and ArcSoft, with DTS support in ffdshow disabled and placing ArcSoft below ffdshow in external filters in MPC-HC. Further if a file contains multiple audio tracks, say AC3 primary and DTS secondary, then ffdshow is connected and changing audio to DTS later would result in no sound, I guess.

Using ArcSoft for the BD/DVD audio codecs and ffdshow for the rest is perhaps less troublesome.

nevcairiel
4th October 2010, 21:41
Actually switching audio tracks re-negotiates the audio codec thats being used with LAVFSplitter, so it would work switching around later.
Anyhow, i'll test with a truehd track.

nevcairiel
5th October 2010, 20:32
I implemented the ArcSoft TrueHD subtype today, seems to be working fine.

renethx
5th October 2010, 20:38
Great! Thanks.

Sebastiii
5th October 2010, 20:42
Nice :)

SamuriHL
5th October 2010, 20:42
Can you send the code to ArcSoft now? :D

renethx
5th October 2010, 21:30
OK, another request. :) For LPCM audio tracks, LAVFSplitter can't connect to ArcSoft Audio Decoder HD. If this is fixed, we can use ArcSoft Audio Decoder HD exclusively to ouput all BD audio codecs by analog, I think.

rica
5th October 2010, 22:19
As far as i understand it can not use "Open DVD" option; you should use "Open File" option on MPC-HC?

In this case Arcsoft MPEG Demux already done the job:

http://forum.doom9.org/showpost.php?p=1448413&postcount=49


_ _ _ _ _

nevcairiel
6th October 2010, 06:27
No you cannot use the Open DVD option. It would be cool if that worked, but thats not how it is right now. ;)
With the internal MPEG Splitter in MPC-HC you can open the index.bdmv file to get seamless branching to work, at least.
I'll try to implement this at a later date as well.

@renethx:
You wouldnt happen to have the LPCM media type arcsoft uses, would you?

renethx
6th October 2010, 08:38
You wouldnt happen to have the LPCM media type arcsoft uses, would you?
ArcSoft MPEG Demux presents LPCM as

MEDIATYPE_MPEG2_PES
{697AD091-7F64-43CC-86B0-5D190A372E2E}.

But replacing HDMV_LPCM_AUDIO {949F97FD-56F6-4527-B4AE-DDEB375AB80F} with {697AD091-7F64-43CC-86B0-5D190A372E2E} in MPC Mpeg Source (Gabest) does not work, but replacing HDMV_LPCM_AUDIO with MEDIASUBTYPE_DVD_LPCM_AUDIO {E06D8032-DB46-11CF-B4D1-00805F6CBBEA} works.

nevcairiel
6th October 2010, 08:55
You mixed up mediatype and media subtype here. I'll run som tests, i guess.

v0lt
7th October 2010, 18:45
nevcairiel
Where to get correct avconfig.h? Here (http://git.1f0.de/gitweb?p=ffmpeg.git;a=summary) it is not.

v0lt
7th October 2010, 19:04
I took a avconfig.h from the mpc-hc project.

But there was another error:
1> LINK: fatal error LNK1104: cannot open file 'avformat-52.lib'

nevcairiel
7th October 2010, 19:45
You have run the build script i supplied. It creates the avconfig and the library its looking for.

v0lt
7th October 2010, 19:57
You have run the build script i supplied.
I have not done this? What is it called?

Kurtnoise
7th October 2010, 21:10
build_ff_win32.sh or build_ff_x64.sh in the root directory...

v0lt
8th October 2010, 04:21
Kurtnoise
What to do with it?
Visual Studio 2010 can not do anything with them. Quest?

Kurtnoise
8th October 2010, 08:00
You have to run it through MinGW/Msys...

I believe it's written in the ReadMe file.

v0lt
8th October 2010, 16:24
Thank you.
Only the errors appeared again.:confused:

XhmikosR
8th October 2010, 17:39
@v0lt: try this (http://pastebin.com/BAh8cGDW).

v0lt
8th October 2010, 19:03
@v0lt: try this (http://pastebin.com/BAh8cGDW).
Success!
:thanks:

v0lt
8th October 2010, 22:42
two video tracks, and no sound:
corpsebride_trailer_01.mov (http://www.mediafire.com/?gd8dubpapf5t713)
(in mpc-mp4-splitter sound is)

v0lt
9th October 2010, 10:16
update again :)
patch to support for these files:
(udta) RQ004F14.MOV (http://samples.mplayerhq.hu/mov/RQ004F14.MOV)
(wide-free) Chicherina_-_Uhodya_uhodi.mov (http://www.mediafire.com/?tp10yzb60sn5njd)
(free-cmov) breaking_up_the_girl.mov (http://www.mediafire.com/?rlucnt543bl7jf7)
(free-mvhd) detect_640_dl.mov (http://samples.mplayerhq.hu/mov/animatrix/detect_640_dl.mov)
(pnot-PICT) 1.mov (http://samples.mplayerhq.hu/mov/pnot-PICT/1.mov), P4250048.MOV (http://samples.mplayerhq.hu/mov/pnot-PICT/P4250048.MOV), pict0162.mov (http://samples.mplayerhq.hu/A-codecs/qtraw/pict0162.mov)
...\src\LAVFDShowSplitter\dllmain.cpp
// MP4
chkbytes.push_back(L"4,4,,66747970"); // ftyp
chkbytes.push_back(L"4,4,,6d6f6f76"); // moov
chkbytes.push_back(L"4,4,,6d646174"); // mdat
chkbytes.push_back(L"4,4,,736b6970"); // skip
+ chkbytes.push_back(L"4,4,,75647461"); // udta
chkbytes.push_back(L"4,12,ffffffff00000000ffffffff,77696465000000006d646174"); // wide ? mdat
+ chkbytes.push_back(L"4,12,ffffffff00000000ffffffff,776964650000000066726565"); // wide ? free
+ chkbytes.push_back(L"4,12,ffffffff00000000ffffffff,6672656500000000636D6F76"); // free ? cmov
+ chkbytes.push_back(L"4,12,ffffffff00000000ffffffff,66726565000000006D766864"); // free ? mvhd
+ chkbytes.push_back(L"4,14,ffffffff000000000000ffffffff,706E6F7400000000000050494354"); // pnot ? PICT
chkbytes.push_back(L"3,3,,000001"); // mpeg4 video

Code is added in version 0.10-0.

v0lt
14th October 2010, 16:26
patch for support little-endian "in24", "in32", "fl32", "fl64" in the mov files.
Method 1:
need MPC-HC 2686 и newer.
...\src\includes\moreuuids.h
struct WAVEFORMATEX_HDMV_LPCM : public WAVEFORMATEX
{
BYTE channel_conf;

struct WAVEFORMATEX_HDMV_LPCM()
{
memset(this, 0, sizeof(*this));
cbSize = sizeof(WAVEFORMATEX_HDMV_LPCM) - sizeof(WAVEFORMATEX);
}
};

+// Reverse GUIDs for little-endian 'in24', 'in32', 'fl32', 'fl64'
+// 696E3234-0000-0010-8000-00AA00389B71 (little-endian int24, reverse 'in24')
+DEFINE_GUID(MEDIASUBTYPE_PCM_IN24_le,
+ 0x696E3234, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
+// 696E3332-0000-0010-8000-00AA00389B71 (little-endian int32, reverse 'in32')
+DEFINE_GUID(MEDIASUBTYPE_PCM_IN32_le,
+ 0x696E3332, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
+// 666C3332-0000-0010-8000-00AA00389B71 (little-endian float32, reverse 'fl32')
+DEFINE_GUID(MEDIASUBTYPE_PCM_FL32_le,
+ 0x666C3332, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
+// 666C3634-0000-0010-8000-00AA00389B71 (little-endian float64, reverse 'fl64')
+DEFINE_GUID(MEDIASUBTYPE_PCM_FL64_le,
+ 0x666C3634, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);

----------------------------------
...\src\Demuxers\LAVFAudioHelper.cpp
case CODEC_ID_PCM_DVD:
mediaType.subtype = MEDIASUBTYPE_DVD_LPCM_AUDIO;
break;
+//support for little-endian 'in24', 'in32', 'fl32', 'fl64'
+ case CODEC_ID_PCM_S24LE:
+ if (codecTag == MKTAG('i', 'n', '2', '4'))
+ mediaType.subtype = MEDIASUBTYPE_PCM_IN24_le;
+ break;
+ case CODEC_ID_PCM_S32LE:
+ if (codecTag == MKTAG('i', 'n', '3', '2'))
+ mediaType.subtype = MEDIASUBTYPE_PCM_IN32_le;
+ break;
+ case CODEC_ID_PCM_F32LE:
+ if (codecTag == MKTAG('f', 'l', '3', '2'))
+ mediaType.subtype = MEDIASUBTYPE_PCM_FL32_le;
+ break;
+ case CODEC_ID_PCM_F64LE:
+ if (codecTag == MKTAG('f', 'l', '6', '4'))
+ mediaType.subtype = MEDIASUBTYPE_PCM_FL64_le;
+ break;
}
return mediaType;
}

v0lt
14th October 2010, 18:42
Method 2:
removed
non-working code

nevcairiel
14th October 2010, 18:47
I prefer the second method, it doesn't require a special decoder to handle the subtype.

I'll apply all of those "soon", been busy with other projects (that pay money, ha!)

v0lt
14th October 2010, 20:22
The second method works only with AC3Filter.
Probably will work through ffdshow. But there I do not like it RAW-decoder.
Built-in windows PCM-decoder does not work. Why is unclear.

IMHO, it is necessary to convert big-endian to little-endian in the splitter. But I do not know where yet.

ikarad
16th October 2010, 11:28
I prefer the second method, it doesn't require a special decoder to handle the subtype.

I'll apply all of those "soon", been busy with other projects (that pay money, ha!)

Nevcairiel you are assigned to this bug in mpc-hc
https://sourceforge.net/apps/trac/mpc-hc/ticket/48#comment:14

MPC-HTPC told me that your lavssplitter take care of this bug.
Hi ikarad,

IMHO nevcairiel was put as owner of the ticket you opened on the trac because he is working on a new spillter (LAVFSplitter (http://forum.doom9.org/showthread.php?t=156191)), which should be integrated into MPC-HC once it is finished (but according to nevcairiel don't expect anything this year). Anyhow, this is the reason why all splitter related issues on the trac were assigned to nevcairiel. So maybe when LAVFSplitter will be integrated into MPC-HC your problem is solved, but until then you either have to be patient or just install the current beta builds of LAVFSplitter.
Is-it true? and is-it corrected with beta version of your software?

nevcairiel
19th October 2010, 07:06
Well. How are the subs represented in the file? Is there 2 streams that should both be active? Or is it one subtitle stream?

If its one stream, the sub renderer is to be blamed, not the splitter. If its two streams, i guess we need to figure out a way to allow people to activate multiple subtitles.

ikarad
19th October 2010, 16:48
Well. How are the subs represented in the file? Is there 2 streams that should both be active? Or is it one subtitle stream?

If its one stream, the sub renderer is to be blamed, not the splitter. If its two streams, i guess we need to figure out a way to allow people to activate multiple subtitles.

there is 2 differents subs that should both be active in the same time but I don't know what means 2 streams.

It's doesn't worked with mpc-hc since the start of support of pgs subs in mpc-hc. Although it works with news sub renderer in ffdshow.

I give you the example with update link

http://www.zshare.net/info.html?81452501-e2bfc0923908879619cc19b5006bf196
http://www.zshare.net/info.html?81501504-69cd3f161fc197a467a33062183f6750

http://www.zshare.net/info.html?81536706-5cae5e2b0cbc4d364139310e81b24090
http://www.zshare.net/info.html?81536007-e6c9b354543a456359e20397bc82f70f
http://www.zshare.net/info.html?81536710-f29b5944c344d5b9e6d78ef54b362352
http://www.zshare.net/info.html?81539836-94a081fa954f746aa42ebcfa7fc240a6
http://www.zshare.net/info.html?81537337-da6f5db4d02f020ea1087416a0100bad

whurlston
23rd October 2010, 06:52
Can someone share the compiled .dll and .lib files for the ffmpeg fork? For some reason I keep getting a "Cannot find [pathto]/[somefile].h" error when I try to compile it even though the file exists in the path given in the error.

v0lt
25th October 2010, 16:10
@whurlston
ffmpeg_libs_for_LAVFSplitter.7z (http://www.mediafire.com/?wgy915qg57jg76v)

whurlston
26th October 2010, 01:14
Much appreciated. Thanks.

nevcairiel
26th October 2010, 18:24
LAVFSplitter 0.10
- Added more MOV/MP4 byte markers
- Added support for multichannel PCM tracks
- Added support for DVD LPCM tracks
- Added support for usign the ArcSoft HD decoder for DTS and TrueHD tracks
- Send the proper media type for TrueHD instead of trying to connect with AC-3
- Improved H264 frame rate detection
- Improved FLAC support
- Fix loading of files with unicode characters in their names
- Fixed timestamping issues that caused certain videos to play too fast
- Fixed M-JPEG media type
- Fixed corruption with MPEG-4 ASP (DivX/Xvid) when using the Xvid decoder

Download: 32-bit (http://files.1f0.de/lavf/LAVFSplitter-0.10.zip) & 64-bit (http://files.1f0.de/lavf/LAVFSplitter-0.10-x64.zip)

Its been quite a while, and most of those fixes have been in the repository for a long time, so i wanted to get it out before it starts to go bad!

In any case, i hope to have some more time again soon, and can work on new features.

v0lt
26th October 2010, 18:57
LAVFSplitter 0.10
- Added more MOV/MP4 byte markers
...
Thank you!

SamuriHL
26th October 2010, 19:33
Wonderful! I'm gonna give this a try as soon as I can fit it onto my plate.