VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. Member
    Join Date
    Mar 2008
    Location
    Italy
    Search Comp PM
    Hi Everybody

    i have a little problem.

    I'm trying to create a .bat that convert an avi into dir at 25fps, disable all audio into avi and insert mp3 into dir.

    example:

    C:\Episode1 this dir contain these files:

    episode1.avi ( is at 23.976fps and stream audio )
    myaudio.mp3

    so i wish that this bat, convert episode1.avi from 23.976fps to 25, disable stream audio and insert myaudio.mp3, and of course create myepisode1.avi

    at the moment i use virtualdub, but i looking for a way that with one click, i can make it. ( execute this .bat without open virtualdub, open avi, set up 25fps, disable audio and add my mp3), i try with vcf in virtualdub, but with it, i must open virtual dub and load this file, and also not work for all avi, but with am avi specified into vcf.

    dir avi and mp3 could be different, then needed a bat that works with an avi and mp3 into in a dir, i think that .bat could be catch .avi and mp3 name into a dir, and then execute the code.

    i hope that someone can help me.

    ( use virtualdub is very boring, especially when avi are a lot )
    Quote Quote  
  2. Man of Steel freebird73717's Avatar
    Join Date
    Dec 2003
    Location
    Smallville, USA
    Search PM
    I'm sure you could do it with ffmpeg. Of course I'm no wizard with ffmpeg so I can't give you an example script. But if you search you could probably find some examples.

    Maybe if you're lucky someone more experienced with ffmpeg will chime in and steer you in the right direction.
    Donadagohvi (Cherokee for "Until we meet again")
    Quote Quote  
  3. If you're gonna do batch files, you might as well look into AviSynth. Think of it as batch file for video and it will do what you want.
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by Robertus View Post
    Hi Everybody

    i have a little problem.

    I'm trying to create a .bat that convert an avi into dir at 25fps, disable all audio into avi and insert mp3 into dir.
    Are you sure this is really necessary? Almost all DVD players in Europe that play AVI files can play AVI files at 23.976 fps without any problems.
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    Italy
    Search Comp PM
    Originally Posted by jman98 View Post
    Originally Posted by Robertus View Post
    Hi Everybody

    i have a little problem.

    I'm trying to create a .bat that convert an avi into dir at 25fps, disable all audio into avi and insert mp3 into dir.
    Are you sure this is really necessary? Almost all DVD players in Europe that play AVI files can play AVI files at 23.976 fps without any problems.
    i know but mp3 audio that i wish insert into avi, is at 25fps, then is important convert avi to 25fps.

    Originally Posted by nic2k4 View Post
    If you're gonna do batch files, you might as well look into AviSynth. Think of it as batch file for video and it will do what you want.
    thanks, but i don't know any command in avisynth to make it. can you post an example?
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by Robertus View Post
    Originally Posted by jman98 View Post
    Originally Posted by Robertus View Post
    Hi Everybody

    i have a little problem.

    I'm trying to create a .bat that convert an avi into dir at 25fps, disable all audio into avi and insert mp3 into dir.
    Are you sure this is really necessary? Almost all DVD players in Europe that play AVI files can play AVI files at 23.976 fps without any problems.
    i know but mp3 audio that i wish insert into avi, is at 25fps, then is important convert avi to 25fps.

    NO!!!!

    Convert the MP3 instead. That is much easier. BeSweet and various other programs (maybe even eac3to - I'm not sure) can convert audio between different frame rates.
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    Italy
    Search Comp PM
    Originally Posted by jman98 View Post
    Originally Posted by Robertus View Post
    Originally Posted by jman98 View Post
    Originally Posted by Robertus View Post
    Hi Everybody

    i have a little problem.

    I'm trying to create a .bat that convert an avi into dir at 25fps, disable all audio into avi and insert mp3 into dir.
    Are you sure this is really necessary? Almost all DVD players in Europe that play AVI files can play AVI files at 23.976 fps without any problems.
    i know but mp3 audio that i wish insert into avi, is at 25fps, then is important convert avi to 25fps.

    NO!!!!

    Convert the MP3 instead. That is much easier. BeSweet and various other programs (maybe even eac3to - I'm not sure) can convert audio between different frame rates.

    convert mp3 from 25 to 23.976 generate jerky playbacks....

    anyway can you help me to create this little avisynth script?

    i tried it without success:

    LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mpasource.dll")
    directshowSource("G:\_PROVIAMO\originale.avi", audio=false)
    MPASource("G:\_PROVIAMO\audio.mp3", normalize = false)

    also nicdll not works, because when i open this avi in virtualdub, video is totally white, but audio is loaded.

    note: audio is mp3 VBR
    Last edited by Robertus; 13th Aug 2010 at 11:02.
    Quote Quote  
  8. Member
    Join Date
    Mar 2008
    Location
    Italy
    Search Comp PM
    i tried this .bat
    "C:\Program Files\GordianKnot\VirtualDubMod\VirtualDubMod.exe" /p"original.avi","saved.avi" /r "/s script.vcf"
    script.vcf:
    VirtualDub.RemoveInputStreams();
    VirtualDub.stream[0].SetSource("G:\\_PROVIAMO\\audio.mp3",0x00000202,1 );
    VirtualDub.stream[0].DeleteComments(1);
    VirtualDub.stream[0].AdjustChapters(1);
    VirtualDub.stream[0].SetMode(0);
    VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
    VirtualDub.stream[0].SetClipMode(1,1);
    VirtualDub.stream[0].SetConversion(0,0,0,0,0);
    VirtualDub.stream[0].SetVolume();
    VirtualDub.stream[0].SetCompression();
    VirtualDub.stream[0].EnableFilterGraph(0);
    VirtualDub.stream[0].filters.Clear();
    VirtualDub.video.DeleteComments(1);
    VirtualDub.video.AddComment(0x00000002,"ISFT","can t touch this");
    VirtualDub.video.AdjustChapters(1);
    VirtualDub.video.SetDepth(24,24);
    VirtualDub.video.SetMode(0);
    VirtualDub.video.SetFrameRate(40000,1);
    VirtualDub.video.SetIVTC(0,0,-1,0);
    VirtualDub.video.SetRange(0,0);
    VirtualDub.video.SetCompression();
    VirtualDub.video.filters.Clear();
    VirtualDub.subset.Clear();
    VirtualDub.subset.AddRange(0,30335);
    but when i execute this .bat, create an avi without direct stream copy and without audio, but if i open virtualdub and open original.avi, and load vcf and save, works, ( avi generate have audio and is direct stream copy)

    i don't know where i mistake
    Quote Quote  
  9. Converting the audio to 23.976fps is definetly the easiest. I've done it a few times and never had any problem. Besweet does a good job and is easy, look at this guide to get an idea. Just make sure to convert to CBR to avoid trouble. WSOLA is another program that's supposed to be even better, you would have to convert your MP3 to WAV with Besweet first, here's a guide for it.

    As for your AVIsynth script, are you trying to frameserve into VDub? Have you tried to open the video with AviSource instead of directshowSource? If you have to use directshowSource, it should probably look like this:

    directshowSource("G:\_PROVIAMO\originale.avi", fps=23.976, audio=false)

    If the audio goes out of sync, you might have to add convertfps=true.

    If you're going to use AVISynth, you should do all the work with it. I'm not an expert with it. You should start a new thread specific to AVIsynth.
    Last edited by nic2k4; 14th Aug 2010 at 11:48.
    Quote Quote  
  10. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by Robertus View Post
    [

    convert mp3 from 25 to 23.976 generate jerky playbacks....
    No, converting VIDEO from 23.976 to 25 can result in jerky playbacks. NOT converting audio.
    Quote Quote  
  11. I was in a hurry yesterday; I think this is what your script should look like to merge the video and audio:

    VIDEO=directshowSource("G:\_PROVIAMO\originale.avi ", fps=23.976, audio=false)
    AUDIO=directshowSource("G:\_PROVIAMO\audio.mp3", fps=25, convertfps=true)
    AudioDub(VIDEO, AUDIO)

    This is fine for merging, but it won't work. I'm assuming you want to frameserve into Vdub and have it convert the video to 25fps... The problem with this script is the audio and video have different fps, so you'd be working on something that's already out of sync. Just like batch file programming, the basic stuff is easy, but there's so much more you can do, just takes some learning. That's what I meant by starting a new thread for AVISynth; you need an IVTC filter on the video to convert to 25fps. All the work would be done with AVIsynth, in fact I believe it can do it without frameserving. I just don't know enough to tell you how.

    Looking at your VCF, it doesn't work unless you load the AVI in Vdub first because you don't load the video in the script. I'd need to look at one of mine to give you more details, but I haven't got one available right now. If your VCF loads the audio and video files correctly, you only need to load the VCF in Vdub and it will run on it's own. A VCF would be another way to make a 1 click converter. Use a generic name for the folder, audio and video files, then you can re-use the same VCF just put the files in the same folder and rename them. Use a batch file to rename the files.

    Again, converting the audio to match the video fps is still the best solution, it's a lot faster to work on audio than video. You can still do it in Vdub with a VCF, just look at it from the other angle.
    Quote Quote  



Similar Threads

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