[MPlayer-dev-eng] [PATCH] raw dv file identified as encrypted VOB
Steven M. Schultz
sms at 2BSD.COM
Fri Aug 6 05:10:57 CEST 2004
Hi!
I have a RAW DV file that, due to the particular bit pattern at the
top of the file, is being mis-identified as a "Encrypted VOB file".
The DV file is recognized as a valid RAW DV file by libdv (as well
as ffmpeg's ffplay) but the MPEG-PS check sets the file_format to 2
which prevents the 'rawdv' check from being made:
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=7943 size=-126322576
LMLM4 Stream Format not found
DEMUXER: freeing demuxer at 0x868e700
system stream synced at 0x21BC6A (0)!
{ERROR5,c=217}
{ERROR5,c=213}
Encrypted VOB file! Read DOCS/HTML/en/dvd.html.
{PTS_err:1}
==> Found audio stream: 23
{ERROR5,c=223}
Encrypted VOB file! Read DOCS/HTML/en/dvd.html.
==> Found audio stream: 20
Encrypted VOB file! Read DOCS/HTML/en/dvd.html.
==> Found audio stream: 4
{ERROR5,c=233}
{PTS_err:1}
Encrypted VOB file! Read DOCS/HTML/en/dvd.html.
'file' says it's a DIF (DV) file:
sms% file Sequence1.dv
Sequence1.dv: DIF (DV) movie file (NTSC)
sms% od -x Sequence1.dv | head -n 5
0000000 071f 3f00 78f8 7878 ffff ffff ffff ffff
0000020 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000120 073f 8000 ff00 4013 0000 f000 ff01 0014
0000140 0000 f000 ff02 4013 0000 f000 ff03 4013
0000160 0000 f000 ff04 0014 0000 f000 ff05 4013
0000200 0000 ff00 ffff ffff ffff ffff ffff ffff
0000220 ffff ffff ffff ffff ffff ffff ffff ffff
0000240 073f 8001 ff06 4013 0000 f000 ff07 0014
sms% playdv Sequence1.dv
format 4:3
Audio is 48.0 kHz, 16 bits quantization, 2 channels, emphasis off
The attached patch moves the HAVE_LIBDV095 block in front of the
MPEG_PS check. If libdv can successfully parse the header then I
would think it is almost impossible for the file to be a MPEG-PS file,
Cheers,
Steven Schultz
-------------- next part --------------
--- libmpdemux/demuxer.c.dist 2004-07-21 19:47:40.612369000 -0700
+++ libmpdemux/demuxer.c 2004-08-05 19:59:30.417095516 -0700
@@ -941,6 +941,22 @@
demuxer = NULL;
}
}
+#ifdef HAVE_LIBDV095
+//=============== Try to open raw DV file, as produced by dvgrab --format raw =================
+if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_RAWDV)
+{
+ demuxer=new_demuxer(stream,DEMUXER_TYPE_RAWDV,audio_id,video_id,dvdsub_id);
+ if(rawdv_check_file(demuxer))
+ {
+ mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"RAWDV");
+ file_format=DEMUXER_TYPE_RAWDV;
+ }
+ else {
+ free_demuxer(demuxer);
+ demuxer=NULL;
+ }
+}
+#endif
//=============== Try to open as MPEG-PS file: =================
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_MPEG_PS){
int pes=1;
@@ -1050,22 +1066,6 @@
}
}
}
-#ifdef HAVE_LIBDV095
-//=============== Try to open raw DV file, as produced by dvgrab --format raw =================
-if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_RAWDV)
-{
- demuxer=new_demuxer(stream,DEMUXER_TYPE_RAWDV,audio_id,video_id,dvdsub_id);
- if(rawdv_check_file(demuxer))
- {
- mp_msg(MSGT_DEMUXER,MSGL_INFO,MSGTR_Detected_XXX_FileFormat,"RAWDV");
- file_format=DEMUXER_TYPE_RAWDV;
- }
- else {
- free_demuxer(demuxer);
- demuxer=NULL;
- }
-}
-#endif
//=============== Try to open as audio file: =================
if(file_format==DEMUXER_TYPE_UNKNOWN || file_format==DEMUXER_TYPE_AUDIO){
demuxer=new_demuxer(stream,DEMUXER_TYPE_AUDIO,audio_id,video_id,dvdsub_id);
More information about the MPlayer-dev-eng
mailing list