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!
+ Reply to Thread
Results 1 to 4 of 4
-
-
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/ -
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. -
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
Similar Threads
-
[FFmpeg] Problems encoding a MOV
By Klagar in forum Video ConversionReplies: 0Last Post: 29th Apr 2011, 11:18 -
Problems with splitting AVI in ffmpeg
By avalk in forum ProgrammingReplies: 0Last Post: 14th Feb 2011, 05:13 -
FFMPEG converting problems with flvs
By Gixm87 in forum LinuxReplies: 6Last Post: 29th Jul 2008, 12:03 -
ffmpeg -- encoding while muxing new audio w/out source's audio, how ?
By vhelp in forum AudioReplies: 8Last Post: 21st Nov 2007, 19:53 -
Problems converting files using either mencoder or ffmpeg
By krisbee in forum LinuxReplies: 12Last Post: 21st Sep 2007, 07:26