Log in

View Full Version : It's possible a .bat for avi that convert at 25fps and merge with mp3 ?


Robertus
12th August 2010, 19:09
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 )

Blue_MiSfit
13th August 2010, 07:04
Why do you need to convert a 24p avi to 25p? Furthermore, I'm sure others will ask about the origins of these AVIs.

Long story short, this isn't a very good idea...

Robertus
13th August 2010, 12:01
Why do you need to convert a 24p avi to 25p? Furthermore, I'm sure others will ask about the origins of these AVIs.

Long story short, this isn't a very good idea...

because audio that i wish insert into avi is at 25fps, then is important convert avi at 25fps, or there is desync.

Robertus
13th August 2010, 16:42
i tried to load my video with directshow source and works, i tried with avisource and works...

...but when i try to load mp3, video not works, is totally white, but audio is loaded and works.

this is my script, someone can help me?

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

anyway rest other problems, convert video at 25fps, direct stream copy ( i don't want re-encode video ), and save new avi.
i wish to make a .bat that when i launch, automatically make these operations. i think that is possible, but i don't know a way to make it.

note: mp3 is VBR

easyfab
13th August 2010, 18:19
here is an example of a little batch script that do this in MKV ( to adapt at your needs ) :

@echo off

set aspect-param="1:4/3"
set fps="1:25:fps"

for %%a in (*.avi) do (

mkvmerge.exe -o "%%~na.mkv" --noaudio --nosubs --default-duration %fps% --aspect-ratio %aspect-param% "%%~na.avi" --language 1:eng --track-name "1:English" "%%~na.mp3" --engage keep_bitstream_ar_info --ui-language en
)

Robertus
13th August 2010, 19:22
here is an example of a little batch script that do this in MKV ( to adapt at your needs ) :

@echo off

set aspect-param="1:4/3"
set fps="1:25:fps"

for %%a in (*.avi) do (

mkvmerge.exe -o "%%~na.mkv" --noaudio --nosubs --default-duration %fps% --aspect-ratio %aspect-param% "%%~na.avi" --language 1:eng --track-name "1:English" "%%~na.mp3" --engage keep_bitstream_ar_info --ui-language en
)

isn't good mkvmerge for avi

make always mkv container , also when you set up avi in save as.

and convert avi at 25fps with mkvmerge, make some problems of audio video.

EuropeanMan
15th August 2010, 09:53
encoding 24p to 25p JUST so you can synch up mp3 (25fps)...will not work.

Mystery Keeper
15th August 2010, 11:01
Audio with FPS? (Frame Per Second) o_0

EuropeanMan
15th August 2010, 21:08
^ What the user is attempting to do is use VIDEO taken from a 24p source, add audio from a 25p source and mux together successfully. BUT, because of the 4% speedup on the PAL, he/she can't really synch them properly. One theoretically has to either (speed up)/(slow down) the audio or video to get the muxing down pat. Unfortunately through my experiences, it'll be challenging.

easyfab
16th August 2010, 13:35
OK, I understand now.

But when I do this (NTSC vids at 23.976 and PAL audio at 25.00 ), I don't change the video FPS but adjust the audio file.

I use Besweet for this and the preset (PAL -> NTSC (25.000 to 23.976)) .

Music Fan
23rd August 2010, 15:24
You don't have to reencode the video if you wanna accelerate (or slow down) it. You only have to change its fps with Virtual Dub (or mpeg4modifier) : video, framerate, source rate adjustment, change frame rate to.
It's like "assumefps" in avisynth, but without unuseful reecoding.
If the number of frames of the 24fps video is the same than the 25fps video you used for the sound, it should be ok for the audio/video synch. But the first frame has to be the same of course.