Playing DVD videos
July 19, 2010 —
BarryK
The on-going saga of playing DVD videos in Puppy...
When a DVD is inserted, a disc icon appears just above the tray. The default behaviour is if you click on the icon, if it is an iso9660 filesystem then it mounts, if it is a DVD video then the mediaplayer starts playing it.
The script for this is /usr/local/bin/drive_all.
I have fixed one thing. If a DVD video is detected, it was launching with "exec defaultmediaplayer dvd://" but in the case of mplayer and gnome-mplayer that only runs the first "chapter" of the DVD and then it exits -- which on some DVDs is just a splash screen.
I have changed it to "exec defaultmediaplayer dvdnav://"
A DVD video is detected by this:
dvd+rw-mediainfo /dev/sr0 | grep 'Mounted Media: .* DVD-ROM'
which usually works. However, I do have one DVD video which actually has a iso9660 f.s. and the line I test gives this:
Mounted Media: 11h, DVD-R Sequential
...so the script thinks it is not a DVD video.
However, running the Gnome-mplayer, if I choose 'File->Disc->Open DVD with menus' then it opens as a normal DVD video, with menus.
The problem is, I don't know how to detect that it is a DVD video. I shouldn't have to mount it to do so, Gnome-mplayer doesn't. Interesting what 'disktype' returns:
--- /dev/sr0
Block device, size 3.566 GiB (3828711424 bytes)
CD-ROM, 1 track, CDDB disk ID 023BFD01
Track 1: Data track, 2.197 GiB (2358986752 bytes)
UDF file system
Sector size 2048 bytes
Volume name "DHUN_SCN"
UDF version 1.02
ISO9660 file system
Volume name "DHUN_SCN"
Data size 3.565 GiB (3828187136 bytes, 1869232 blocks of 2 KiB)
...anything in there that identifies it as a DVD video?
Comments
DVD-VIDEO definitionUsername: tempestuous
Most DVD-related applications I'm aware of (playback/burning/ripping) simply look for the presence of a "VIDEO_TS" folder at the root directory, containing (at the very least) a "VIDEO_TS.IFO" file."19 Jul 2010, 23:09"01732"220.101.77.71'vlc"linuxcbon"I think the easiest is to have VLC play everything, audio video so we don't need any other programs or codecs. OK it's big, but mplayer and libavcodec are big too."20 Jul 2010, 2:01"01732"93.26.251.144'DVD Playing"Tony"Hi Barry, I have yet to find a distro or media player that will reliably handle DVDs.There is always some issue with FF or Rew or chapters etc. If you can crack this we will be well impressed. Hope health is back to full strength. Tony"20 Jul 2010, 4:56"01732"92.26.71.63'dvd-video"zigbert"Had to check how Pburn detects a video-DVD, and I am sorry to say; Pburn mounts the disc and looks for a video_ts directory"20 Jul 2010, 7:44"01732"83.108.177.27'Improved DVD video detection"BarryK"Ok, this what I now have in /usr/local/bin/drive_all: [code] 0) #failed to detect type. #cddetect does not work properly for dvd's, try something else... #100719 properly detect dvd video... if [ "`df | grep "$dPATTERN"`" == "" ];then #only test if not mounted. FLAGDVDVIDEO="`dvd+rw-mediainfo /dev/${ONEDRVNAME} | grep 'Mounted Media: .* DVD-ROM'`" if "$FLAGDVDVIDEO" == "" ];then #mount and look for 'video_ts' directory (dir should contain file video_ts.ifo)... mkdir -p /mnt/${ONEDRVNAME} mount -t iso9660 /dev/${ONEDRVNAME} /mnt/${ONEDRVNAME} if [ $? -eq 0 ];then [ -d /mnt/${ONEDRVNAME}/video_ts -o -d /mnt/${ONEDRVNAME}/VIDEO_TS ] && FLAGDVDVIDEO="yes" umount /mnt/${ONEDRVNAME} fi fi if [ "$FLAGDVDVIDEO" != "" ];then ln -snf /dev/${ONEDRVNAME} /dev/dvd [ -f /usr/local/bin/defaultdvdplayer ] && exec defaultdvdplayer [ "`grep 'mplayer' /usr/local/bin/defaultmediaplayer`" != "" ] && exec defaultmediaplayer dvdnav:// #100719 exec defaultmediaplayer dvd:// fi fi ;; esac [/code] Username: 20 Jul 2010, 8:32
"01732"114.129.167.148'smplayer"smil99"Hi Barry, It might be worth it if you take a look at [url=http://www.murga-linux.com/puppy/viewtopic.php?t=54954//url]smplayer[/url]. Quote: SMPlayer intends to be a complete front-end for MPlayer, from basic features like playing videos, DVDs, and VCDs to more advanced features like support for MPlayer filters and more. Username: 20 Jul 2010, 8:41
"01732"113.197.171.64'VIDEO_TS"tempestuous"Barry, your script looks fine to me. Have you tested it? It's worth noting that although the DVD drive needs to be unmounted when MPlayer plays a DVD-VIDEO disc, my understanding is that MPlayer (and most other video player apps) actually mounts the DVD drive as part of the playback process. This highlights the fundamental difference between DVD-VIDEO discs and CD audio discs: CD audio is raw digital data - it has NO file structure whatsoever (thus there is no reliable data verification!) and obviously does not need to be mounted. DVD video, on the other hand, is media data stored as conventional files within a conventional filesystem. You can browse those files under any operating system. Regarding VLC; it's the second-best video player appplication in Linux. MPlayer has consistently been the most fully-featured, powerful, reliable media player application in Linux to date. The fact that its development is directly linked to ffmpeg development is testament to this."20 Jul 2010, 11:10"01732"220.101.77.71'SMPlayer"Tony"Hi smil99, I also suggested SMPlayer as it seems the best of the bunch but as Barry kindly pointed out to me it uses some large libraries which means it would make puppy a lot bigger. Username: 20 Jul 2010, 15:13
"01732"92.27.46.114'medisplayers"Firewave"I installed smplayer as GUI for mplayer. It works better than the UI, that comes with quirky, but still isn't perfect. The only depedency on quirky 1.2 was qt. For DVD playback I use vlc, but I didn't get the UI to work, so I simply use the command-line cvlc, which works the best for DVDs so far. It skips the first few "chapters" and goes right to the inital menu, but the menus work and you can properly FF and rewind."21 Jul 2010, 6:57"01732"79.218.15.86'
Tags: woof