[DVDnav-discuss] undvd utility
Jorgen Lundman
lundman at lundman.net
Fri Sep 18 10:26:23 CEST 2009
This is possibly not relevant to everyone here, but might be useful. At the very
least, it has been great for debugging.
I was fixing bugs in my DVD/Bluray playing code, being unhappy about how
complicated it had become. Then it occurred to me the fix I was about to apply
already existed for plain RAR playing code, which calls "unrar" to list and play
media.
So I created a "undvd", which simulates all arguments and output of "unrar", to
list (undvd v ), send to stdout (undvd p) and extract (undvd x).
Now all RAR files, DVD images (iso, img, toast, VIDEO_TS, bluray and /dev/drive)
can use the same function that calls unrar, (and now undvd).
Since my version of libdvdnav has RAR code, it can also handle ISO inside RAR
files. Although, I should note I fixed some bugs in the opendir/readdir code.
If undvd is compiled without the UDF2.50/bluray code, it can be used against the
vanilla libdvdnav library.
Example output:
**** 1 : Bluray ISO
# ./undvd v -d -v -c- -p- -y -cfg- -- movietest-bd5.iso
UNDVD 3.71 beta 1 freeware Copyright (c) 2009- Jorgen Lundman
Archive movietest-bd5.iso
Pathname/Comment
Size Packed Ratio Date Time Attr CRC Meth Ver
-------------------------------------------------------------------------------
BDMV
0 0 0% 01-12-09 12:15 drw-r--r-- 00000000 m0 2.0
[snip]
BDMV/STREAM
0 0 0% 01-12-09 12:15 drw-r--r-- 00000000 m0 2.0
BDMV/STREAM/00001.m2ts
4691957760 4691957760 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
[snip]
***** 2 : Standard DVD
# ./undvd v -v -c- -p- -y -cfg- -- dvdr.iso
Pathname/Comment
Size Packed Ratio Date Time Attr CRC Meth Ver
-------------------------------------------------------------------------------
title_01
0 0 0% 01-12-09 12:15 drw-r--r-- 00000000 m0 2.0
title_01/audio_00_en_AC3_2ch.mpg
349093888 349093888 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
title_01/audio_01_nl_AC3_2ch.mpg
349093888 349093888 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
[snip]
***** 3 : Standard DVD in RAR
# ./undvd v -R testdvdr.iso -v -c- -p- -y -cfg- -- test-dvdr.rar
Pathname/Comment
Size Packed Ratio Date Time Attr CRC Meth Ver
-------------------------------------------------------------------------------
title_01
0 0 0% 01-12-09 12:15 drw-r--r-- 00000000 m0 2.0
title_01/audio_00_en_AC3_6ch.mpg
3420518400 3420518400 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
title_01/audio_01_fr_AC3_6ch.mpg
3420518400 3420518400 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
title_01/audio_02_es_AC3_6ch.mpg
3420518400 3420518400 100% 01-12-09 12:15 -rw-r--r-- 00000000 m0 2.0
****** 4 : Extracting title from DVD (debug on)
# ./undvd x -sk2000000 -d -v -c- -p- -y -cfg- -- dvdr.iso
title_01/audio_00_en_AC3_2ch.mpg
Seek: 2000000
archive: dvdr.iso
extract: title_01/audio_00_en_AC3_2ch.mpg
Attempting to extract 'title_01/audio_00_en_AC3_2ch.mpg' from 'dvdr.iso' (in '')
from position 2000000...
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4
5 6 7 8
title 01 audio stream 00
Seek block set to 976 modulus 1152.
Block 0 HOP_CHANNEL
Block 0 HIGHLIGHT
Block 0 VTS_CHANGE
Block 0 CELL_CHANGE: 0
finally seeking towards block 976
Block 0 HOP_CHANNEL
Block 0 CELL_CHANGE: 183600
Block 0 SPU_CLUT_CHANGE
Block 0 SPU_STREAM_CHANGE
Block 0 AUDIO_STREAM_CHANGE
Block 0 NAV_PACKET
Finally at seek position!
Block 63 NAV_PACKET
Block 273 NAV_PACKET
Block 461 NAV_PACKET
[snip]
-rw-r--r-- 1 lundman lundman 388M Sep 18 17:21 title_01_audio_00_en_AC3_2ch.mpg
But yes, it doesn't do anything with DVD Menus, just streams.
--
Jorgen Lundman | <lundman at lundman.net>
Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work)
Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell)
Japan | +81 (0)3 -3375-1767 (home)
More information about the DVDnav-discuss
mailing list