Playing VCD[.dat] in linux

7,977

Solution 1

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.

Solution 2

Have you tried VLC Player?

The only problem is, .DAT file is an extention used by quite a few items so setting anything as the default may cause problems in the future.

However, VLC can play VCD files just fine.

Share:
7,977

Related videos on Youtube

asok
Author by

asok

Updated on September 17, 2022

Comments

  • asok
    asok over 1 year

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

    For that i have to use a command gxine vcd://Track Number

    I havnt found any useful GUI tool for playing vcd dat file on double click.

    My OS is Ubuntu 9.10.

  • Iain
    Iain over 14 years
    To open .dat files with VLC: 1. In the file explorer (Nautilus) select a .dat file. 2. Choose File ▸ Open with Other Application. 3. Choose VLC. You can change it so it opens on a double click through File > Properties > Open With.
  • asok
    asok over 14 years
    i tried that but didnt work.
  • Juice
    Juice over 14 years
    VLC plays .dat file from a VCD 100%. They are simply renamed MPEG1 files. If VLC cannot play them, there is something wrong with the VCD file even though another program may be able to play them. Xine may just be more fault tolerant.
  • asok
    asok over 14 years
    i couldnt copy the files,since it is protected.Otherwise i think the mpg extension will work.
  • asok
    asok over 14 years
    @Luminose you may be right..gxine may be more fault tolerant. But even in that i have to use terminal to play the file.
  • quack quixote
    quack quixote over 14 years
    i have seen VLC have issues with MPEG1 files; seems to vary slightly between different versions. of course this could be due to improper files.
  • asok
    asok over 14 years
    yes i like command line.But still i would like to have such a feature. The chances of track number being 1 is very rare.But the tack number to be played can be found from the filename itself. For eg: AVSEQ1.DAT, AVSEQ2.DAT like that. So to play using script we have to extract the number from the file name and play using gxine. For that i need an idea for extracting number from filename on double click through script and then play using gxine vcd://[extracted number from filename]. Any way thank u for your answer.
  • asok
    asok over 14 years
    @Luminose Xine not working in my ubuntu.It hangs the system. I installed it through synaptic. But still it doesnt work.
  • Convict
    Convict over 14 years
    @cdb - I've added Suggestion 2a for you. It shows one way of extracting the track number from the VCD .dat filename.