Page 1 of 1

Batch transcode .ts to .mpg

Posted: 08 Jan 2013 09:49
by T-buch
I have tried to find a easy way of transcoding a folder of .ts files to mpeg2

I have been reeding some stuff in this forum and VideoLAN Wiki and this is what i have learned (perhaps not much :-()

The folder is called D:\Recorded
The new Folder is goind to be called "E:\Converted"

I open the CMD in Windows XP and type:

CD D:\Recorded

for %a in (*.ts) do cmd /c "C:\Programmer\VideoLAN\VLC\vlc.exe" -I dummy -vvv %a --sout #transcode{vcodec=mp2v,vb=6000,fps=25,scale=0,acodec=mpga,ab=128,channels=2,samplerate=44100}:standard{access=file,mux=ps,dst=E:\Converted\%a.mpg} vlc://quit

This is not working

Re: Batch transcode .ts to .mpg

Posted: 08 Jan 2013 13:51
by mederi

Code: Select all

for %%a in (*.ts) do "C:\Programmer\VideoLAN\VLC\vlc.exe" -I dummy -vvv "%%a" --sout=#transcode{vcodec=mp2v,vb=6000,fps=25,scale=0,acodec=mpga,ab=128,channels=2,samplerate=44100}:standard{access=file,mux=ps,dst="E:\Converted\%%a.mpg"} vlc://quit
Tip: Put it in "!convert.bat" file in "D:\Recorded\" folder and simply execute the batch file there.

Re: Batch transcode .ts to .mpg

Posted: 08 Jan 2013 14:12
by T-buch
If I do so I got a message "%%a was not expected at this time." (translated from danish)

Re: Batch transcode .ts to .mpg

Posted: 08 Jan 2013 16:03
by mederi
Command-line interface: %a
Batch file: %%a

Re: Batch transcode .ts to .mpg

Posted: 08 Jan 2013 16:25
by T-buch
Yes i find out - also have I tried your tip with the Concert.bat file. But the files is not converted - I tried to omit the "vlc://quit" part and there - and then there was a lot of warning message and so on
By doing it via the convert funktion in the file-menu of VLC - there is no trouble of converting the files

Re: Batch transcode .ts to .mpg

Posted: 08 Jan 2013 16:31
by mederi
Make sure:
* it is all one long command on one line
* paths are correct and "E:\Converted" folder already exists

Re: Batch transcode .ts to .mpg

Posted: 09 Jan 2013 07:13
by T-buch
Thanks - I tried for the third time - and it works - apparently, cause vlc only convert the half of the file.
I.e. if the video is one hour, the converted file is about ½ hour???