Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

Pages: (23) « First ... 12 13 [14] 15 16 ... Last » ( Go to first unread post )
New FLV and Matroska plugins for VirtualDub, (works in progress)
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
ale5000
Posted: Mar 20 2011, 05:23 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Here: http://www.bunkus.org/videotools/mkvtoolni...#default_values

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Mar 20 2011, 05:56 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE
The Matroska specifications know a feature called "default values". These default values have been in place since the beginning in 2002.

OK, that's what this one dude says. But I can't find anything like that in the official specs at matroska.org. Sorry, I need better evidence than his claim.

Incidentally, I am not at all convinced that mkvtoolnix is a proper implementation of the Matroska specification.


--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Mar 20 2011, 06:07 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Go here: http://www.matroska.org/technical/specs/index.html
Look at "Language" in the table, the default value is "eng".

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Mar 20 2011, 06:15 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Ah, there it is. You win! I will implement this in the next release. Thank you my friend. biggrin.gif

--------------------
May the FOURCC be with you...
 
     Top
stephanV
Posted: Mar 20 2011, 10:41 AM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



QUOTE (fccHandler @ Mar 20 2011, 06:56 AM)
QUOTE
The Matroska specifications know a feature called "default values". These default values have been in place since the beginning in 2002.

OK, that's what this one dude says. But I can't find anything like that in the official specs at matroska.org. Sorry, I need better evidence than his claim.

Incidentally, I am not at all convinced that mkvtoolnix is a proper implementation of the Matroska specification.

Whatever you think of his implementation, he (Moritz Bunkus/Mosu) is one of the people from who the Matroska spec originated so generally you can take his word on it. smile.gif

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
ale5000
Posted: Mar 20 2011, 11:24 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Test file (Manual cut.mkv): http://www.mediafire.com/?i2pi62oiz1j29lq

1) The second audio track (with PS) is detected as Mono instead of Stereo (it isn't related to new changes it happen also with old versions of your plugin)

2) The test file was too big so I cut some parts in the middle.
MPC-HC (using Haali splitter + ffdshow-tryout) can play the parts before and after the cut in the middle instead VirtualDub can see only the initial part of the file.
Seeing the entire "remaining" file is important (but there isn't any urgency) so your plugin can be used to recover broken matroska files.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
JaliM
Posted: Mar 23 2011, 11:15 AM


Member


Group: Members
Posts: 23
Member No.: 29948
Joined: 17-February 11



@fcchandler: Is it possible to add native MPEG2 video to Matroska input plugin? If possible, could be easy to add 'Direct stream copy' feature in video side?
I know the problems in putting MPG in AVI, but, if FFmpeg & Mencoder are able, why not VDUb? (apart from using FFDShow VFW MPEG-in-AVI codec which is possible. But, the newer versions of FFDshow unfortunetely lack encoding features like Xvid, MPEG, x264.... sad.gif
At the moment if I open a MKV with ES MPEG2 native video inside, it is not detected (NO VIDEO STREAM message appears). Otherwise a MKV mpeg2-VFWed video file using FOURCC mpg2 (MPG-in-AVI muxed to MKV with Mkvtoolnix) is detected by the MPEG-in-AVI featured FFDshow VFW decode interface.
Perhaps a MPEG input plugin update could be appreciated allowing 'Video direct stream copy'... wink.gif
Thanks,
 
    Top
ale5000
Posted: Mar 23 2011, 07:54 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



Edit: Post removed

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Mar 24 2011, 04:15 AM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



@fcchandler: Test file (HE-AAC test.zip): http://www.multiupload.com/UUT54GJZHE
This is an HE-AAC track with sampling rate: 48.0 KHz (for HE-AAC decoders) / 24.0 KHz (for AAC decoders)
The two sample files are the same track but the first has "HE-AAC flag" not set while in the second file it is set.

You can notice that VirtualDub see 24000Hz on both files (probably because HE-AAC is made to be retrocompatible with software that support only AAC) so the HE-AAC sampling rate should be read in a different way.
This also mean that the Matroska input plugin is writing wrong values of the sampling rate when direct stream copying HE-AAC in avi files.

PS: It would be nice if it show "48000Hz / 24000Hz" in File => File Information... (at least for the HE-AAC in MKV)

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Mar 24 2011, 02:06 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



In case you can't easily detect the sampling rate from inside the "AAC ACM Codec" you can use this method (that I think is the method that most software uses), if the file is AAC use reported sampling rate instead if the file is HE-AAC use reported sampling rate * 2.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Mar 26 2011, 06:13 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Mar 20 2011, 07:24 PM)
2) The test file was too big so I cut some parts in the middle.
MPC-HC (using Haali splitter + ffdshow-tryout) can play the parts before and after the cut in the middle instead VirtualDub can see only the initial part of the file.
Seeing the entire "remaining" file is important (but there isn't any urgency) so your plugin can be used to recover broken matroska files.

My Matroska plugin is not intended to be a tool to recover broken files. I require the input to conform to the Matroska spec. I do try to work around minor damage, but if needed headers are missing from the beginning of the file, that is game over dude.

I will be looking into native MPEG-2 support and the AAC stuff you posted.


--------------------
May the FOURCC be with you...
 
     Top
fccHandler
Posted: Mar 26 2011, 04:13 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Mar 20 2011, 07:24 PM)
Test file: http://www.mediafire.com/?i2pi62oiz1j29lq

1) The second audio track (with PS) is detected as Mono instead of Stereo (it isn't related to new changes it happen also with old versions of your plugin)


QUOTE (ale5000 @ Mar 24 2011, 12:15 AM)
@fcchandler: Test file (HE-AAC test.zip): http://www.multiupload.com/UUT54GJZHE
This is an HE-AAC track with sampling rate: 48.0 KHz (for HE-AAC decoders) / 24.0 KHz (for AAC decoders)
The two sample files are the same track but the first has "HE-AAC flag" not set while in the second file it is set.

In all of these cases the containers are overriding the actual AAC properties.

Both AVI files specify 24000 Hz in the audio header, so that is the sampling rate which VirtualDub passes to the AACACM codec. The codec has no control over this; it has to give the client what he asked for.

The second Matroska audio track contains a "Channels" field with a value of 1, which (in my opinion) overrides Parametric Stereo. It is debatable whether it should, but it is a decision I had to make and I will stick to it. If you want this track to play in stereo then you should set Channels to 2, or just omit the Channels field (in which case PS should be detected automatically).


--------------------
May the FOURCC be with you...
 
     Top
ale5000
Posted: Mar 26 2011, 04:17 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



In the posted file (Manual cut.mkv) the header is NOT missing it is just: first good part of the file + some zero where there was data + correct end of the file.

Your plugin seems to stop at the zero.

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
ale5000
Posted: Mar 26 2011, 04:28 PM


Advanced Member


Group: Members
Posts: 1114
Member No.: 22180
Joined: 30-September 07



The AVI header must contain data to play correctly the LC profile of the AAC, to play SBR the decoder must multiply sampling rate * 2.

QUOTE
ADTS sample rates and channel counts are for HE-AAC and HE-AACv2 to try to maintain compatibility with LC only decoders. The good news is that it they are inaccurate in a precise manner. HE-AAC will report half the sample rate and HE-AACv2 will always report a mono stream. This is because HE-AAC adds SBR which double the sample rate and HE-AACv2 adds parametric stereo to SBR and PS turning a mono stream into a stereo image. The SBR payload lives inside an AAC fill element which is ignored by an LC only encoder and the PS payload lives inside the SBR payload.

Some decoders assume SBR if the sample rate <= 24kHz and always decode mono streams to stereo to avoid detecting these features up front. In that case the SBR decoder can be run in a pure upsampling mode if SBR data is not found.


QUOTE (Moritz Bunkus @ 2010-08-25, 08:33:36)
https://www.bunkus.org/bugzilla/show_bug.cgi?id=548 => That's not a bug. HE-AAC files contain _half_ their actual sampling rate in their headers.


By specifying the full sampling rate you are breaking playback in "LC only decoders".

--------------------
New VirtualDub forum
VirtualDub AIO (All-in-One installer for VirtualDub and plugins)
Codec Toolbox RS (A tool to read/change merit of codecs and many other things)
Input plugins for VirtualDub / ACM codecs / VFW codecs
 
     Top
fccHandler
Posted: Mar 26 2011, 04:36 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (ale5000 @ Mar 26 2011, 12:17 PM)
Your plugin seems to stop at the zero.

Specifically, it goes haywire after the SimpleBlock at 1629472 when it hits an invalid Element ID of 0xB2. After this everything falls apart because we are out of sync with the Elements. You know the old saying, Garbage In, Garbage Out...

--------------------
May the FOURCC be with you...
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
337 replies since Sep 26 2010, 04:58 AM Track this topic | Email this topic | Print this topic
Pages: (23) « First ... 12 13 [14] 15 16 ... Last »
<< Back to VirtualDub Filters and Filter Development