logo Sign In

Post #272822

Author
Moth3r
Parent topic
Converting PAL (H264) to NTSC
Link to post in topic
https://originaltrilogy.com/post/id/272822/action/topic#272822
Date created
20-Feb-2007, 3:47 AM
It's useful to have the relevant information here for future reference, thanks.

Couple of additional notes, bearing in mind that we are all still learning these methods (I hadn't attempted an H.264 conversion before DJ asked me for help, so most of this is based on my experiences with the sample he sent me).

The reason for using the xport Transport Stream Demuxer (http://www.w6rz.net/xport.zip) is that it will start the video from the first key frame, and trim the audio to match. This alleviates the need for trial-and-error to obtain an audio delay when re-muxing your converted video.

Reading AVC (H.264) streams into AVISynth:

There are two mechanisms by which AVISynth can read H.264-encoded files: DirectShow or Video for Windows (VfW).

To use DirectShow, you must have a DirectShow decoding filter present on your system, for example, the Cyberlink H264 decoder that is included with PowerDVD 7. If you can play H264 files in Windows Media Player, then you should be able to read them in AVISynth. It's also recommended that you use AVISynth 2.5.7 or later, because the DirectShowSource() code was improved in this version.

I found that the output from the AVS script was the wrong length (too long, because some of the video was repeated at the end). I don't know why this happened, but a possible workaround is to use the framecount option in DSS, i.e. DirectShowSource("file", framecount=123456).

The alternative is to put the H264 stream into an AVI file using avc2avi_mod (http://sourceforge.net/projects/avc2avi). In order for AVISynth to read the file using AVISource() you will need an VfW H.264 decoder. I used ffdshow; you need to go into the configuration and enable H.264 decoding (libavcodec).