[MPlayer-users] softsub in .avi file

Rickard Närström rickard.narstrom at gmail.com
Sun May 8 15:52:28 CEST 2005


I have find some .avi file with embeded soft subtitles, mplayer doesn't  
seem to understand those subtitles at all.

I know that .avi files doesn't support embedded subtitles - but there  
still are there and I have succuessfully played the file with subtitles in  
windows (Windows Media Player - with VobSub installed).

The program that is used to anderstand those subtitles in Windows is  
called VobSub - but the subtitles in the file are still not vobsub - there  
is stored in plane ASCII in the file - and I can rip them out using:

$ strings filename.avi

I also get a lot of junk outpt from the abov command - and the subtitles  
alvays tend to get out very late (when about 99% of the output is already  
printed)

The output from strings - look something like this:
[Script Info]
ScriptType: v4.00
Collisions: Normal
PlayResY: 1024
Timer: 100.0000
[V4 Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour,  
TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow,  
Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
Style:  
Style1,Tahoma,52,&Hffffff,&Hffffff,&H000008,&H000008,-1,0,1,2,0,2,30,30,30,0,0
[Events]
Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV,  
Effect, Text
Dialogue:  
Marked=0,0:00:02.75,0:00:11.74,Style1,Comment,0000,0000,0000,,{\i1}Some  
text{\i0}
Dialogue:  
Marked=0,0:00:15.83,0:00:20.55,Style1,Comment,0000,0000,0000,,{\i1}More  
text with a\nline break{\i0}
Dialogue:  
Marked=0,0:00:20.55,0:00:26.78,Style1,Comment,0000,0000,0000,,{\i1}Even  
more text{\i0}
Dialogue:  
Marked=0,0:00:35.39,0:00:38.50,Style1,Comment,0000,0000,0000,,Now not with  
a style different (I think)

(This is not an exakt copy - and absolutly not all output - but I think  
its enath for you to get the idéa)

ok and output from:
$ mplayer -v fileneme.avi

MPlayer 1.0pre6-3.4.3-20050110 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices  (Family: 8, Stepping: 0)
Detected cache-line size is 64 bytes
Cannot test OS support for SSE, disabling to be safe.

<snip>

Playing filename.avi.
[file] File size is 242419034 bytes
STREAM: [file] filename.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 8380416  pre:1677721  eof:0
AVI file format detected.
list_end=0xFFF4
======= AVI Header =======
us/frame: 41708  (fps=23,976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 29807   initial: 0
streams: 3
Suggested BufferSize: 0
Size:  576 x 432
==========================
list_end=0x114
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: xvid (64697678)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 10000000/417083 = 23,976
Start: 0   Len: 29807
Suggested BufferSize: 201114
Quality 10000
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 576
   biHeight 432
   biPlanes 1
   biBitCount 12
   biCompression 1145656920='XVID'
   biSizeImage 1492992
===========================
Regenerating keyframe table for MPEG4 video
====== AVI Super Index Header ========
   FCC (indx) dwSize (56) wLongsPerEntry(4)
   bIndexSubType (0) bIndexType (0)
   nEntriesInUse (2) dwChunkId (00dc)
   dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (00dc): [0] 0x0000000007f7a240 0x1e478 15499
ODML (00dc): [1] 0x000000000e71314a 0x1bf40 14308
list_end=0x1D4
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 16000/1 = 16000,000
Start: 0   Len: 19891513
Suggested BufferSize: 48484
Quality 4294967295
Sample size: 1
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 16000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=418
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
====== AVI Super Index Header ========
   FCC (indx) dwSize (56) wLongsPerEntry(4)
   bIndexSubType (0) bIndexType (0)
   nEntriesInUse (2) dwChunkId (01wb)
   dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (01wb): [0] 0x0000000007f986b8 0x1618 10351177
ODML (01wb): [1] 0x000000000e72f08a 0x14a8 9540336
list_end=0x258
====== STREAM Header =====
Type: txts   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 1000/1243201 = 0,001
Start: 0   Len: 1
Suggested BufferSize: 26473
Quality 0
Sample size: 0
==========================
====== AVI Super Index Header ========
   FCC (indx) dwSize (40) wLongsPerEntry(4)
   bIndexSubType (0) bIndexType (0)
   nEntriesInUse (1) dwChunkId (02tx)
   dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (02tx): [0] 0x000000000e730532 0x0028 1
list_end=0x364
AVI: dmlh found (size=248) (total_frames=29807)
list_end=0xE73055A
Found movie at 0x10000 - 0xE73055A
AVI: ODML: Building odml index (3 superindexchunks)
====== AVI Standard Index Header ========
   FCC (ix00) dwSize (124016) wLongsPerEntry(2)
   bIndexSubType (0) bIndexType (1)
   nEntriesInUse (15499) dwChunkId (00dc)
   qwBaseOffset (0x1000C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
   FCC (ix00) dwSize (114488) wLongsPerEntry(2)
   bIndexSubType (0) bIndexType (1)
   nEntriesInUse (14308) dwChunkId (00dc)
   qwBaseOffset (0x1000C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
   FCC (ix01) dwSize (5648) wLongsPerEntry(2)
   bIndexSubType (0) bIndexType (1)
   nEntriesInUse (703) dwChunkId (01wb)
   qwBaseOffset (0x1000C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
   FCC (ix01) dwSize (5280) wLongsPerEntry(2)
   bIndexSubType (0) bIndexType (1)
   nEntriesInUse (657) dwChunkId (01wb)
   qwBaseOffset (0x1000C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
   FCC (ix02) dwSize (32) wLongsPerEntry(2)
   bIndexSubType (0) bIndexType (1)
   nEntriesInUse (1) dwChunkId (02tx)
   qwBaseOffset (0x1000C) dwReserved3 (0)
===========================
AVI index offset: 0x0 (movi=0x10000 idx0=0x1000C idx1=0x120C8)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=221905194 (29807) audio size=19891513 (19891513)

<snip>

Exiting... (Quit)




More information about the MPlayer-users mailing list