Log in

View Full Version : x264 directshow filter and ASF


ipanema
7th July 2010, 13:08
I know that it is not recommended to store H.264 encoded data in an AVI container due to the limitations of the AVI format.

But would it be possible to store x264 encoded data in an ASF file? Are there any limitations of the ASF format which would make this unadvisable?

Also, is there a DirectShow filter available which wraps the x264 encoder, so that x254 encodes could be done in a filter graph to an ASF output file?

Raptus
7th July 2010, 13:41
Are there any limitations of the ASF format which would make this unadvisable?
The wrath of MS lawyers?

Midzuki
7th July 2010, 14:18
SolveigMM ASF Multiplexer:

http://www.videohelp.com/tools/SolveigMM_ASF_Multiplexer

Use at your own risk. :)

P.S.: according to Avery Lee,
ASF is just a "poor man's AVI" :D You have been warned.

Keiyakusha
7th July 2010, 15:42
But would it be possible to store x264 encoded data in an ASF file? Are there any limitations of the ASF format which would make this unadvisable?
Maybe possible but why do you want to do so? On post-XP systems mp4 has not less support than asf and mp4 is a native container for h264... h264-in-asf also unlikely will work fine on XP. Of course with 3rd party software it is possible to make anything work anywhere, more or less ^_^

ipanema
7th July 2010, 16:49
I may look into the mp4 format when I have some time, but I already have a ASF mux filter working fine and was wondering whether I could quickly extend its usefulness by dumping x264 output into it. As the mux is a DirectShow filter it would be better if there already existed a DirectShow filter that wrapped the x264 encoder.

The only DirectShow wrapper for x264 I can find is x264vfw which seems to be frowned upon by many here. Is this because its output is usually sent to an AVI file, or is there some problems with the actual data structures it outputs that would cause the same problems if it was stored in an ASF file instead?

Stephen R. Savage
7th July 2010, 16:59
x264vfw is not a DirectShow filter (it is a VfW codec). It produces streams that are mangled in various ways due to limitations in VfW (e.g. b-frames), but it can also be configured to produce an untouched raw bitstream.

Altenatively, you could look into using some software by MONOGRAM (http://blog.monogram.sk/janos/), such as the MONOGRAM x264 Encoder (http://dev.monogram.sk/websvn/log.php?repname=x264_enc). I believe they also have a selection of free DirectShow multiplexing filters. Of course, I have not used any of these filters personally.

Edit: As for ASF, I am not sure that the MS splitter will actually accept and demux H.264 video correctly.

Gromozeka
7th July 2010, 17:13
x264vfw is not a DirectShow filter (it is a VfW codec). It produces streams that are mangled in various ways due to limitations in VfW (e.g. b-frames), but it can also be configured to produce an untouched raw bitstream.
.
x264vfw work fine with SolveigMM_ASF_Multiplexer/ You must use monogram graphstudio
I has good asf file

roozhou
7th July 2010, 17:59
I know that it is not recommended to store H.264 encoded data in an AVI container due to the limitations of the AVI format.
This is not true. MS AVI splitter will handle AVC in AVI without any problem, so you don't need to take a risk on ASF. Even some DVs use AVC + AAC in AVI.

FFmpeg from here (http://forum.doom9.org/showthread.php?t=152419) can do this. You can directly remux AVC in Annexb/MP4/MKV/FLV to AVC in AVI. There is no 2GB size limit and no problem in DXVA. VFR is well supported.

[ReX]
9th July 2010, 11:54
This is not true. MS AVI splitter will handle AVC in AVI without any problem

The post you quoted never said the contrary, he's talking about something else.

nm
9th July 2010, 12:24
;1416017']The post you quoted never said the contrary, he's talking about something else.

He's talking about AVC in ASF because AVC in AVI is not recommended. I'd agree with roozhou that given these alternatives, AVC in AVI is probably more compatible with existing software.

kidjan
9th July 2010, 16:58
I may look into the mp4 format when I have some time, but I already have a ASF mux filter working fine and was wondering whether I could quickly extend its usefulness by dumping x264 output into it. As the mux is a DirectShow filter it would be better if there already existed a DirectShow filter that wrapped the x264 encoder.

You could certainly do this, but the resulting files wouldn't be particularly useful to anyone. I don't know of an ASF file reader that supports anything besides WMV/VC1, and AFAIK there really isn't a lot of standardization. So even if you managed to mux H264 into an ASF container, then you have a whole new problem trying to locate a demux filter.

You'd have much better luck with MP4, which now has broad support on *nix, windows 7 and osx. Writing an MP4 muxer wouldn't be too hard with mp4v2:

http://code.google.com/p/mp4v2/


The only DirectShow wrapper for x264 I can find is x264vfw which seems to be frowned upon by many here. Is this because its output is usually sent to an AVI file, or is there some problems with the actual data structures it outputs that would cause the same problems if it was stored in an ASF file instead?

Someone else mentioned it, but the MONOGRAM filter is pretty decent, and I've been using it for some test tools for the last year or two.

mediator
10th July 2010, 09:15
ASF has the same level of B-frame support that AVI has.

Midzuki
10th July 2010, 13:23
ASF has the same level of B-frame support that AVI has.

:confused: :confused: :confused:

Sharktooth
10th July 2010, 14:46
it means no support... hacks needed.

Midzuki
10th July 2010, 17:11
I thought it was a <irony>feature</irony> of the older WMV codecs,
not a design flaw of the ASF container itself
(or of the ASF splitter available).