VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Mar 2009
    Location
    United States
    Search Comp PM
    I need to convert avi files (using DirectShow) to DVD format using a command line tool which I'm going to script.
    From everything I've seen so far the best way to go about this is to use an AviSynth script with FFMPEG. It took me a good bit of research (16bit Audio Bug) and playing around but I finally got it to encode the video perfectly after I resampled the audio to 44100 using AviSynth instead of doing it with FFMPEG, but audio is just noise. The avs file plays perfectly in VLC and Media Player so it's got to be an issue with FFmpeg but I can't find a clear solution. Here is my script and cmd line

    test.avs:
    DirectShowSource("h:\test.avi")
    ConvertToYV12()
    SSRC(44100)

    command line:
    ffmpeg -i c:\test.avs test.vob


    FFmpeg is version SVN-r16596-Sherpya

    FFmpeg output is:
    Input #0, avs, from 'c:\test.avs':
    Duration: 00:06:37.93, start: 0.000000, bitrate: 0 kb/s
    Stream #0.0: Video: rawvideo, yuv420p, 720x480, 124416 kb/s, 30.00 tb(r)
    Stream #0.1: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
    Output #0, svcd, to 'test.vob':
    Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 200kb/s, 30.00 tb(c)
    Stream #0.1: Audio: mp2, 44100 Hz, mono, s16, 64kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1

    ...

    video:23882kB audio:3107kB global headers:0kB muxing overhead 1.369898%

    Any ideas? Please help!
    Quote Quote  
  2. That build seems to have issues with mp2 audio, but works with ac3 audio fine. Maybe try a different build, or use ac3 audio instead

    For example, using one of grunster's builds, mp2 audio works fine (I used r16945)
    http://www.razorbyte.com.au/ffmpeg/
    Quote Quote  
  3. Member
    Join Date
    Mar 2009
    Location
    United States
    Search Comp PM
    Thanks! The newer build did the trick.

    I would however prefer to use AC3 anyway, but I can't seem to get it to work. I can't find clear instructions to get AviSynth to convert to ac3 and when I tried to use -acodec ac3 I ended up without any audio. All instructions I can find to do this assumes that I have a seperate audio file, which I don't.
    Quote Quote  
  4. If you are doing this for vob, you should use 48000 for AC3, which is standard. Avisynth doesn't do any conversion to AC3 directly, it's just frameserving or being used as a source filter; ffmpeg in this scenario is the actual encoding "engine"

    SVN-r16596 works for this, in this example I used an xvid/mp3/avi 44.1Khz Audio

    AVISource("file.avi")
    SSRC(48000)

    ffmpeg -i input.avs -acodec ac3 -ab 192k output.vob

    you probably want to specify video parameters too, for better quality. Note you don't have to do the audio sample rate conversion in avisynth, ffmpeg can do it too
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!