Transcoding query

About encoding, codec settings, muxers and filter usage
kewa
New Cone
New Cone
Posts: 7
Joined: 16 Mar 2007 22:16

Transcoding query

Postby kewa » 06 Jul 2008 01:27

I am trying to convert some MP3 files in a folder to .ts format.

I am using the following...
for %%a in (*.mp3) do "C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy -vvv %%a --sout=#transcode{acodec=mp2a,ab=192,channels=6}:standard
access=file,mux=raw,dst=%%a.ts} vlc:quit

which works but there are a couple of flaws

1) The MP3 files have spaces in the file name but the code only works if I replace all the spaces with a _ which is very time consuming
2) The output file name becomes filename.mp3.ts

How do I change the code so I don't have to replace all the spaces in the file names and the output filename becomes filename.ts?

Thanks in anticipation

Kewa

olegkirillov
Blank Cone
Blank Cone
Posts: 46
Joined: 29 Jun 2008 21:04

Re: Transcoding query

Postby olegkirillov » 09 Jul 2008 11:05

Welcome to Windows. :)
The easiest way to complete this in Win is via... Excel, or, my preference, OpenOffice Calc.
First, issue:
dir /b *.mp3 >filelist.csv
Then open the filelist in the spreadsheet processor and use some sort of text substitute function to replace " " and "mp3" to the desired text. Save the result in the ajacent column. Then add the prefix "ren " to each row and concatenate the filenames columns. Your result should look something like this:
ren "file name.mp3" file_name.ts
for each row.
Save the file (despite warnings of formatting loss), rename it to filelist.bat and run. Voila! :)


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 5 guests