Converting .VDR Files to .TS with VLC 2 (Windows 7)

I tried to process some historic .vdr files using the script I posted 3 years ago (using VLC 1), and noticed that the command line parameters did not work anymore. Instead, VLC 2 gave me the error message

The command line options could not be parsed.
Make sure they are valid.

First I tried the VLC command-line help, but found that the Advanced Streaming Using the Command Line on the VLC wiki was more helpful.

After a bit of trial and error, my vdr-to-ts conversion batch file looks like this:

set input=c:\path\to\movie\timestamp.rec
set output=c:\\path\\movie.ts

copy "%input%\info.vdr" "%output%.txt"

"C:\Program Files\VideoLAN\VLC\vlc" "%input%01.vdr" --verbose=2 ↩
--sout "#standard{mux=ts,access=file,dst=%output%}" vlc://quit

for %%i in (002 003 004) do if exist "%input%\%%i.vdr" ↩
"C:\Program Files\VideoLAN\VLC\vlc" "%input%\%%i.vdr" --verbose=2 ↩
--sout "#standard{access=file{append},mux=ts,dst=%output%}" vlc://quit

Note that the ↩ character means that the command line continues – the line breaks are inserted for legibility reasons only.

Converting .VDR Files to .TS with VLC (Windows 7)

VDR saves TV recordings as .vdr files which can be viewed using players such as VLC. VLC can also be used to convert .vdr files into .ts files, or to transcode them into different formats.

I found various examples on how to use the command-line to convert between the formats, but none of them worked immediately with VLC 1.0.5 under Windows 7, so here are the versions that work for me:

Convert a single .vdr file to .ts:

"C:\Program Files\VideoLAN\VLC\vlc"
-vvv "d:\path\to\film\date-time.rec\‌001.vdr"
--sout=#standard{access=file,mux=ts,dst="d:\\path\\to\\film.ts"}
vlc://quit

If the TV recording consists of several .vdr files, using file{append}:

"C:\Program Files\VideoLAN\VLC\vlc"
-vvv "d:\path\to\film\date-time.rec\‌002.vdr"
--sout=#standard{access=file{append},mux=ts,dst="d:\\path\\to\\film.ts"}
vlc://quit

I also tried the combination of –sout-all and –sout-keep parameters with the #gather:standard stream commands, but that resulted in .ts files that VLC could not play.

Note that the dst parameter needs to escape the backslashes in the path name, and that not all characters are recognized (probably due to escaping), such as the percent sign %, which is used by VDR to indicate cut films.

Preview failed: UnableToStartGraph

I recently installed MediaPortal (1.1.0.0, Windows 7, Terratec Cinergy S2 HD PCI) and noticed two problems:

• A channel scan did not recognize any channels (unlike TerraTec Home Cinema)
• After importing a channel file and trying to preview a channel raised the error message “Preview failed: UnableToStartGraph”

The scanning problem was fixed by opening the TV Server Configuration, navigating to TV Servers, (computer name), (card), selecting the DvbS card type, “Edit”, and selecting DVBS as preferred network provider (it had been set to Generic before).

This allowed me to scan channels using DiSEqC = None.

The preview problem was fixed by selecting CyberLink decoders under Codecs and Renderer where available, and selecting Enhanced Video Renderer (EVR) in the Video Renderer tab.