Home » Questions » Computers [ Ask a new question ]

Playing VCD[.dat] in linux

Playing VCD[.dat] in linux

Currently i am using gxine for playing VCD .dat files.

Asked by: Guest | Views: 176
Total answers/comments: 2
Guest [Entry]

"As Wil has mentioned, your chances of playing a VCD .dat file by double clicking on it seems pretty low, unless you change the default behaviour of your GUI file manager.

Here's a few random suggestions …

Suggestion 1 - Have you considered creating a desktop shortcut to gxine (or VLC) and then dropping the VCD .dat onto the shortcut?

Suggestion 2 - Assuming that the VCD track to play is always track 1 (which may or may not be true), create a shell script (make sure the script executable) with your gxine command

#!/bin/bash
gxine vcd://1

Create a desktop shortcut to your shell script. Double click on the shell script to start gxine. Of course, this will only work if the VCD track is always track 1.

Suggestion 2a - In response to cdb's comment, here's a suggestion for a bash shell script which will extract the track number from the VCD .dat filename and then invoke gxine. This script as a whole is untested, but the perl regular expression has had superficial testing.

#!/bin/bash

VCD_FILENAME=${1}
if [ ""${VCD_FILENAME}"" == """" ]
then
echo ""${0}: missing input VCD filename""
exit 1
fi

TRACK_NUMBER=`echo ${VCD_FILENAME} | perl -ne 'print $1 if m/AVSEQ(\d+)\.DAT$/;'`
if [ ""${TRACK_NUMBER}"" == """" ]
then
echo ""${0}: cannot extract track number from input filename""
exit 2
fi

gxine vcd://${TRACK_NUMBER}
exit $?

You'd probably want to improve the error checking to make the script much more robust. I'd expect that there are alternatives to using perl to extract the track number from the VCD .dat filename.

Suggestion 3 - You could convert your VCD to another format and then use your favourite video player. HandBrake, mplayer/mencoder and/or VLC may be able to do the conversion for you. You'll need to confirm.

I must admit that I do not understand your reluctance to use the command line. The command line is the most powerful tool that you'll ever use on your Linux machine."
Guest [Entry]

"I think VLC can play the DAT files as well. I found some of the workarounds to play *.DAT files on Ubuntu. By Using Mplayer,

mplayer avseq01.dat

Or By Renaming *.dat to *.mpg"