Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd October 2008, 17:31   #4381  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
After looking on ffmpeg mailing list, they advise to use libavformat to create the correct audio frames.

But I don't want to waste time integrating libavformat into FFDShow if it gives the same results...
albain is offline   Reply With Quote
Old 4th October 2008, 08:46   #4382  |  Link
CiNcH
Registered User
 
CiNcH's Avatar
 
Join Date: Jan 2004
Posts: 567
Quote:
Which player/splitter and file format should be used to be in the right conditions ?
MPC MpegSplitter IMHO outputs the full ES for a BDMV TrueHD stream within m2ts, so AC3 and MLP interleaved.
Our DVBSource filter currently only extracts AC3 frames from a BDMV TrueHD stream.
__________________
Bye
CiNcH is offline   Reply With Quote
Old 4th October 2008, 17:12   #4383  |  Link
chadamir
Registered User
 
Join Date: Apr 2003
Posts: 92
Would ffdshow be able to pass the bitstream of truhd or dts-hd (ma) via hdmi without PAP on say a 4xxx series radeon?
chadamir is offline   Reply With Quote
Old 4th October 2008, 19:57   #4384  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by albain View Post
After looking on ffmpeg mailing list, they advise to use libavformat to create the correct audio frames.
Sure they do. But it's not necessary if you have your own splitters. My eac3to tool has no problems whatsoever with any of the libav audio decoders, although eac3to doesn't use libavformat. I've simply written my own splitters instead.

I think the main reason why the Haali splitter works and the internal MPC splitter is not is that the Haali splitter "collects" data and tries to send full frames to the output pin. In contrast I think the MPC internal splitter sends every small data bytes forward as soon as it gets them. So with the MPC internal splitter you'll likely get small packages of 100 bytes each (or something like that). In order to make your ffdshow branch work with that you need to buffer the data internally until you have enough data available for at least one audio frame.
madshi is offline   Reply With Quote
Old 4th October 2008, 22:56   #4385  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
Quote:
Originally Posted by madshi View Post
Sure they do. But it's not necessary if you have your own splitters. My eac3to tool has no problems whatsoever with any of the libav audio decoders, although eac3to doesn't use libavformat. I've simply written my own splitters instead.

I think the main reason why the Haali splitter works and the internal MPC splitter is not is that the Haali splitter "collects" data and tries to send full frames to the output pin. In contrast I think the MPC internal splitter sends every small data bytes forward as soon as it gets them. So with the MPC internal splitter you'll likely get small packages of 100 bytes each (or something like that). In order to make your ffdshow branch work with that you need to buffer the data internally until you have enough data available for at least one audio frame.
This is what I did (i.e collecting full blocks before feeding the parser then the decoder then the renderer) but that did not make it.
For an unknown reason the parser rejets 1 blocks of 2 on my sample.

From the other hand, I spent some time studying libavformat and it appears that it would be useless for audio formats : libavformat constructs frames from the buffer for the parser for video streams only whereas audio buffers are sent directly to the parser.

So libavformat seems to be useful only for developing a "FFDShow splitter" which is not his role for now

Last edited by albain; 5th October 2008 at 09:26.
albain is offline   Reply With Quote
Old 5th October 2008, 11:50   #4386  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
The buffer given by mplayerc splitter is not the same as haali's on a DTS sample. The beginning is the same but not the end :

Haali's buffer :
Code:
7FFE8001FC3C3ED275E0D3A098C63189CE73980002DB6DB6DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF400000000000000000195755555533110CCA88733CA86242222222222399710ECA86666444666553E864422222222222355E864222222222222200000000000015CD34
MPC's buffer :
Quote:
7FFE8001FC3C3ED275E0D3A098C63189CE73980002DB6DB6DFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40000000000000000019597577533330EA8886353EC82222222222222399710CA8886646668685732A884222222222222353C8844222222222222000000000000154D4D
albain is offline   Reply With Quote
Old 5th October 2008, 14:00   #4387  |  Link
nautilus7
Registered User
 
nautilus7's Avatar
 
Join Date: Jan 2006
Location: Athens, Greece
Posts: 1,518
The dts sample you got this buffer is a DTS-HD sample in a container (and which)?

I did some tests and realized that haali media splitter outputs the core of the DTS-HD track on m2ts and evo files, while it outputs the complete DTS-HD stream in mkv files only. MPC-HC's splitter outputs the full DTS-HD info. So i tried the next graphs:

m2ts: haali (dts core) --> libav --> ok
m2ts: mpc (dts-hd) --> libav --> problem
m2ts: mpc (dts-hd) --> libdts --> ok
mkv: haali (dts-hd) --> libav --> ok
evo: haali (dts core) --> libav --> ok

ffdshow is beta 10 because beta 11 doesn't work at all.

Last edited by nautilus7; 5th October 2008 at 14:04.
nautilus7 is offline   Reply With Quote
Old 5th October 2008, 16:53   #4388  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by albain View Post
The buffer given by mplayerc splitter is not the same as haali's on a DTS sample. The beginning is the same but not the end
I think that must be 2 different frames. I'd suggest doing this:

(1) In ffdshow dump all the DTS input data into a test file.
(2) Use eac3to (or any other working demuxer) to extract the raw DTS data from the source file.
(3) Compare the ffdshow dump to the eac3to dump.

Do that with both Haali and MPC splitter. That might help finding out what's going on.
madshi is offline   Reply With Quote
Old 5th October 2008, 18:14   #4389  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
I made my tests with a regular DTS sample (no DTS-HD blocks in it).

This is Bhack_Hawk_Down_LPCM_problem_Sample.ts (don't remember from whom I got it).

I tested it with MPC and then with windows media player (that uses Haali splitter)

I made deeper analysis, and the DTS headers are fine in both cases.

This is clearly a ffmpeg bug which does not know how to handle the subframes in all cases. I won't go further in the anlysis

However libdts is okay to decode those.
albain is offline   Reply With Quote
Old 5th October 2008, 18:18   #4390  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
Quote:
Originally Posted by madshi View Post
I think that must be 2 different frames. I'd suggest doing this:

(1) In ffdshow dump all the DTS input data into a test file.
(2) Use eac3to (or any other working demuxer) to extract the raw DTS data from the source file.
(3) Compare the ffdshow dump to the eac3to dump.

Do that with both Haali and MPC splitter. That might help finding out what's going on.
Maybe but this is just the first buffer FFDShow receives in both cases.

EDIT : I spoke too quickly, actually the parser acts as the same way for Haali and MPC.

Last edited by albain; 5th October 2008 at 18:23.
albain is offline   Reply With Quote
Old 5th October 2008, 18:40   #4391  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
I may have good news, but this must be confirmed : the problem comes from the input splitter that gives wrong information about the number of channels and the bitrate.

Making my own DTS parsing and updating the libavcodec structure seems to fix the problem
albain is offline   Reply With Quote
Old 5th October 2008, 21:24   #4392  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
That makes a lot of sense. In my experience you can't trust the media type information of the input pin for compressed audio sources. All you can reliably (?) get from the media type information is which codec is being used. The media type information is reliable only for PCM, I think. E.g. just today I created a 7.1 AAC test encoding with the new Nero AAC encoder. Then I played that file back with the Nero DirectShow Audio Decoder. The source filter reported 7 channels (instead of 8).

Last edited by madshi; 5th October 2008 at 21:28.
madshi is offline   Reply With Quote
Old 8th October 2008, 11:35   #4393  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
I have made a new build that should (I hope) decode all DTS formats including DTS in wav when using libavcodec

Here is the link :
http://rapidshare.com/files/15200443...eta12.exe.html

However I have troubles to make TrueHD/MLP decoding work :
when I strip off MLP/TrueHD blocks (and keep AC3 blocks) to make decode by the AC3 decoder
or when I strip off AC3 blocks (and keep MLP/TrueHD blocks) to make decode by the MLP decoder
this does not work.

I hope to find the solution soon

Last edited by albain; 8th October 2008 at 11:38.
albain is offline   Reply With Quote
Old 8th October 2008, 13:35   #4394  |  Link
STaRGaZeR
4:2:0 hater
 
Join Date: Apr 2008
Posts: 1,302
Testing the lastest beta now, it works! All DTS files and DTS in WAV also! Perfect.

However, this lastest betas are incomplete or something? Opening a video with ffdshow = crash, Vorbis = doesn't load, TTA = freeze. But DTS works now
__________________
Specs, GTX970 - PLS 1440p@96Hz
Quote:
Originally Posted by Manao View Post
That way, you have xxxx[p|i]yyy, where xxxx is the vertical resolution, yyy is the temporal resolution, and 'i' says the image has been irremediably destroyed.
STaRGaZeR is offline   Reply With Quote
Old 8th October 2008, 14:11   #4395  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Quote:
Originally Posted by STaRGaZeR View Post
Testing the lastest beta now, it works! All DTS files and DTS in WAV also! Perfect.

However, this lastest betas are incomplete or something? Opening a video with ffdshow = crash, Vorbis = doesn't load, TTA = freeze. But DTS works now
I get a crash too with ffdshow video.
rack04 is offline   Reply With Quote
Old 8th October 2008, 14:40   #4396  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
It should not.

Here is an updated version (with the last updates from the trunk).

I recompiled it completely

Link :
http://rapidshare.com/files/15204455...eta12.exe.html
albain is offline   Reply With Quote
Old 8th October 2008, 15:25   #4397  |  Link
MatMaul
Registered User
 
Join Date: Apr 2004
Posts: 402
Quote:
Originally Posted by Anima123 View Post
I've tested the mpeg-1 audio decoder of libavcodec and found a bug, i.e., the mp3 stream showed as mp2 @ info&cpu.
same "problem" here

otherwise everything works fine for me
MatMaul is offline   Reply With Quote
Old 8th October 2008, 15:33   #4398  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Quote:
Originally Posted by albain View Post
It should not.

Here is an updated version (with the last updates from the trunk).

I recompiled it completely

Link :
http://rapidshare.com/files/15204455...eta12.exe.html
This build works. Thanks.
rack04 is offline   Reply With Quote
Old 8th October 2008, 15:37   #4399  |  Link
STaRGaZeR
4:2:0 hater
 
Join Date: Apr 2008
Posts: 1,302
Nice, now everything works like it should. If I find any bug I'll post it.

EDIT: It seems there are still some files that will show mp2 instead of mp3.
__________________
Specs, GTX970 - PLS 1440p@96Hz
Quote:
Originally Posted by Manao View Post
That way, you have xxxx[p|i]yyy, where xxxx is the vertical resolution, yyy is the temporal resolution, and 'i' says the image has been irremediably destroyed.

Last edited by STaRGaZeR; 8th October 2008 at 16:06.
STaRGaZeR is offline   Reply With Quote
Old 8th October 2008, 16:54   #4400  |  Link
albain
Media Control author
 
Join Date: Dec 2006
Location: Paris
Posts: 1,014
Quote:
Originally Posted by STaRGaZeR View Post
Nice, now everything works like it should. If I find any bug I'll post it.

EDIT: It seems there are still some files that will show mp2 instead of mp3.
Indeed, there was a bug, fixed in revision 2192
albain is offline   Reply With Quote
Reply

Tags
ffdshow, ffdshow tryouts, ffdshow-mt, ffplay, icl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:36.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.