PDA

View Full Version : add audiostream script malfunction


Daemon85
27th February 2009, 18:28
I have made a script that was suppose to add multiple audiostreams, but it doesnt work. Im not that experienced with this, i only know what i learnt by doing ^^ But as i see it the script should work but it doesnt. When i run the script it seams to add a auditostream due to output size, but i cant choose any other stream in MPC :/ Help or suggestions for other ways are welcome :)

@echo off
:-------------------
: Script made to add multiple audiostreams
:-------------------
: Lame MP3 3.98.2
: MP4Box 0.4.4
: /Daemon
:-------------------

:START
:-------------------
: Start Configuration
:-------------------
: You need to have existing mp4 videofile which you will add audiostream to.
: You need to export your second audiostream as a wav with the same filename.
: Set the filename you will use on here.

set mymovie=test

:-------------------
: Start Configuration
:-------------------
: Choose the name of the outgoing videofile.

set mymovie2=audioadded

:-------------------
:set the path to your files here (no \ at the end)
:-------------------

set mypath=f:\x264

:-------------------
:End Configuration
:-------------------


mkdir %mypath%\temp
cls

echo ======Encoding MP3 audio======
"bin\lame.exe" -V2 --vbr-new -q0 --resample 22.05 "%mypath%\%mymovie%.wav" "%mypath%\temp\%mymovie%.mp3"
echo ==============================
echo.

echo ======Adding Audiostream======
"bin\mp4box" -new -add "%mypath%\%mymovie%.mp4" -add "%mypath%\temp\%mymovie%.mp3" "%mypath%\%mymovie2%.mp4"

if EXIST "%mypath%\%mymovie2%.mp4" rmdir /S /Q temp

:END
echo.
echo The audiostream has now been added if all done correct: %mymovie2%.mp4
echo.
pause

download at
http://data.fuskbugg.se/skalman01/x264enc.rar