PDA

View Full Version : dummy's query re opening .mp4


halsboss
18th April 2009, 04:30
<dummy alert>
Hi, wondering about accessing .mp4 source format in avisynth.

Been using .avi with the AVIsource statement for years, and had tried ffmpegsource on occasion.

I am wondering what recommendations people have ("latest technique" ?) to open ".mp4" files in avisynth ? Assuming mpeg4-asp/mp3 content, and possibly sometimes mpeg4-AVC. I have xvid and coreavc (which comes with haali) installed, but no ffdshow.

Is it DirectShowSource("...",fps=25,convertfps=true) ?

If I recall, DGAVCDec only handles elementary streams. Not sure it it handles mpeg4-ASP or only AVC. Will have to look up the latest state of play.

Am happy to demux to elementary streams [avidemux?] if that'd help (which mp4 demuxer?). (If that's the way then I guess I could do similar with xvid/mp3 AVIs too to avoid packed-bitstream/non-packed-bitstream AVIs, providing that the recommended demuxer handles demuxing of packed bitstream .avi OK.)
</dummy alert>

Alex_ander
18th April 2009, 08:48
In case of AVC I use YAMB to demux ('raw stream' option for h264) then DGAVCIndex for importing to AviSynth. AAC audio can be decompressed in Graphedit if some playback filter (like Core AVC Audio decoder) is configured in the system.

halsboss
18th April 2009, 15:52
Thanks Alex_ander. What do you use for ASP ?

qyot27
20th April 2009, 17:23
I just use FFmpegSource. Both 1.21 and the 2.00 betas handle MP4 just fine, no matter if the video is H.264 or ASP, or if the audio is AAC or MP3. DirectShowSource would also work if you can play the files in WMP.

FFmpegSource("video.mp4",atrack=-1)
FFmpegSource2("video.mp4",atrack=-1)

BIG FAT WARNING: I'm using the wrapper function for FFMS2, so that the syntax matches v1.21. The function is in the FFmpegSource development thread, in this post (http://forum.doom9.org/showthread.php?p=1246055#post1246055).

For VFR files, I'd recommend using DirectShowSource with the convertfps option as usual, although FFmpegSource 2.00 is also supposed to be able to handle them (I've never used the fpsden and fpsnum parameters with a clearly-VFR source, so I can't say how well it handles such streams).