I know this is a bit old but can someone explain where %xml% and %ffmpeg% come from in jeffski10's bat file?
I understand that %ffmpeg% is the path to the executable but where is the variable set?
Also %xml%? What is this and where is it set?
Many Thankls for any help!
Post Processing from ts to another container format.
Re: Post Processing from ts to another container format.
OK I have got a bit further, xml is a variable set to the path to xml.exe executable which is available from here:http://xmlstar.sourceforge.net/ so I can set this and the path to ffmpeg.exe at the beginning of the batch file. I have also corrected a small typo in comment section of the call to ffmpeg.
So it now looks like this:
So it now looks like this:
Code: Select all
:Convert_Radio
echo Radio Conversion Utility
echo.
echo Started Processing
echo %date% %time%
REM First do the tags
set xml=C:\Bat\xml.exe
set ffmpeg=C:\Bat\ffmpeg.exe
pushd %~dp1
copy "%~dpn1.ARG" "xmlsel.ARG"
%xml% sel -t -v Recording/Title "xmlsel.ARG">mp3title.txt
%xml% sel -t -v Recording/Description "xmlsel.ARG">mp3description.txt
%xml% sel -t -v Recording/ProgramStartTime "xmlsel.ARG">mp3date.txt
%xml% sel -t -v Recording/ChannelDisplayName "xmlsel.ARG">mp3channel.txt
set /P mp3title=<mp3title.txt
set /P mp3description=<mp3description.txt
set /P mp3date=<mp3date.txt
set mp3date=%mp3date:~0,10%
set mp3year=%mp3date:~0,4%
set /P mp3channel=<mp3channel.txt
set "mp3fulltitle=%mp3title% %mp3date%"
REM Convert to MP3
%ffmpeg% -y -i "%~dpn1.ts" -vn -ar 44100 -ac 2 -ab 160k -f mp3 -id3v2_version 3 -metadata genre="Podcast" -metadata title="%mp3fulltitle%" -metadata artist="%mp3channel%" -metadata
service_name="%mp3channel%" -metadata album_artist="%mp3channel%" -metadata album="%mp3title%" -metadata comment="%mp3description%" -metadata creation_time="%mp3date%" -metadata
date="%mp3year%" -metadata track=1 "%~dpn1.mp3"
REM del /q xmlsel.ARG
REM del /q mp3title.txt
REM del /q mp3description.txt
REM del /q mp3date.txt
REM del /q mp3channel.txt
popd %~dp1
Re: Post Processing from ts to another container format.
Ah, sorry, I must not have posted the full file so it missed off the programs from the top.
I'm actually just in the processing of moving this to vbscript as it handles the xml natively.
I'm actually just in the processing of moving this to vbscript as it handles the xml natively.
Server: Windows 7, Argus recorder, Silicon Dust tuners
Clients: Openelec on a Pi and Gigabyte Brix
Who is online
Users browsing this forum: No registered users and 31 guests