Batch transcode .ts to .mpg

About encoding, codec settings, muxers and filter usage
T-buch
Blank Cone
Blank Cone
Posts: 23
Joined: 21 Jan 2009 18:13

Batch transcode .ts to .mpg

Postby T-buch » 08 Jan 2013 09:49

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

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Batch transcode .ts to .mpg

Postby mederi » 08 Jan 2013 13:51

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.

T-buch
Blank Cone
Blank Cone
Posts: 23
Joined: 21 Jan 2009 18:13

Re: Batch transcode .ts to .mpg

Postby T-buch » 08 Jan 2013 14:12

If I do so I got a message "%%a was not expected at this time." (translated from danish)

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Batch transcode .ts to .mpg

Postby mederi » 08 Jan 2013 16:03

Command-line interface: %a
Batch file: %%a

T-buch
Blank Cone
Blank Cone
Posts: 23
Joined: 21 Jan 2009 18:13

Re: Batch transcode .ts to .mpg

Postby T-buch » 08 Jan 2013 16:25

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

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Batch transcode .ts to .mpg

Postby mederi » 08 Jan 2013 16:31

Make sure:
* it is all one long command on one line
* paths are correct and "E:\Converted" folder already exists

T-buch
Blank Cone
Blank Cone
Posts: 23
Joined: 21 Jan 2009 18:13

Re: Batch transcode .ts to .mpg

Postby T-buch » 09 Jan 2013 07:13

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???


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 9 guests