[MPlayer-users] scale and FATAL: Cannot initialize video driver.

Heine Laursen maillist at gozar.dynu.com
Sun Mar 6 23:44:17 CET 2005


Hi. It's me again.

I'm just playing around with mencoder, and stumpled on this that I can't 
understand. If I run the command:
mencoder -v -mc 0 -noskip -vf scale=0:0:0:0:0:0:pal,harddup -of mpeg 
-mpegopts format=dvd -ovc lavc -oac lavc -lavcopts 
vcodec=mpeg2video:aspect=16/9:vbitrate=5528:vrc_maxrate=5528:vrc_buf_size=1835:keyint=25:acodec=mp2:abitrate=128 
-o 1.mpeg some_avifile.avi

I get:
FATAL: Cannot initialize video driver
It don't make any difference if I use scale=720:576

If I replace scale with expand I then get, a buffer underflow message, 
but mencoder continues.

Why does expand work while scale exit's with an error?

debuging info.

command:
mencoder -v -mc 0 -noskip -vf scale=0:0:0:0:0:0:pal,harddup -of mpeg 
-mpegopts format=dvd -ovc lavc -oac lavc -lavcopts 
vcodec=mpeg2video:aspect=16/9:vbitrate=5528:vrc_maxrate=5528:vrc_buf_size=1835:keyint=25:acodec=mp2:abitrate=128 
-o 1.mpeg some_avifile.avi

---Output---
MEncoder dev-CVS-050305-14:36-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, 
Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

File not found: 'frameno.avi'
Failed to open frameno.avi
init_freetype
get_path('font/font.desc') -> '/home/hl/.mplayer/font/font.desc'
font: can't open file: /home/hl/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
[file] File size is 733888512 bytes
STREAM: [file] some_avifile.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x2bbe4000
AVI file format detected.
list_end=0x2292
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 71168   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  704 x 304
==========================
list_end=0x10F4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: xvid (64697678)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 71168
Suggested BufferSize: 87358
Quality 10000
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 704
   biHeight 304
   biPlanes 1
   biBitCount 12
   biCompression 1145656920='XVID'
   biSizeImage 1284096
===========================
Regenerating keyframe table for MPEG4 video
list_end=0x2186
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 48000/1152 = 41.667
Start: 0   Len: 118613
Suggested BufferSize: 960
Quality -1
Sample size: 0
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 15613
Block align: 1152
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x0
mp3.nBlockSize=375
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
list_end=0x2292
AVI: dmlh found (size=248) (total_frames=71168)
list_end=0x22D2
hdr=Software  size=43
Software  : VirtualDubMod 1.5.4.1 (build 2178/release)
list_end=0x2B8FE2FC
Found movie at 0x280C - 0x2B8FE2FC
Reading INDEX block, 189781 chunks for 71168 frames (fpos=0x2b8fe304)
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x18C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=684891243 (71168) audio size=44394864 (118613)
VIDEO:  [XVID]  704x304  12bpp  25.000 fps  1924.7 kbps (235.0 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:704x304  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
PACKET SIZE: 2048 bytes
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [harddup]
Opening video filter: [scale w=0 h=0 interlaced=0 chr-drop=0 param=0 
param2=0 presize=pal]
SwScale params: 720 x 576 (-1=no scaling)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
FRAME_SIZE: 1152, BUFFER_SIZE: 4608, TAG: 0x50
Writing AVI header...
Limiting audio preload to 0.4s
Increasing audio density to 4

mpegfile_write_chunk, Audio codec=50, len=384, frame size=0
AUDIO FRAME SIZE: 384, DELTA_PTS: 2211840 (0.024)

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384
[ffmpeg] aspect_ratio: 2.315789
VDec: vo config request - 704 x 304 (preferred csp: Planar YV12)
Trying filter chain: scale harddup expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.32:1 - prescaling to correct movie aspect.
VO Config (704x304->704x304,flags=0,'MPlayer',0x32315659)
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: reducing / aligning filtersize 5 -> 2
SwScaler: reducing / aligning filtersize 5 -> 2

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 704x304 -> 720x576
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
FATAL: Cannot initialize video driver.
*** [scale] Exporting mp_image_t, 704x304x12bpp YUV planar, 321024 bytes

Exiting...
---End of output---

command:
mencoder -v -mc 0 -noskip -vf expand=720:576,harddup -of mpeg -mpegopts 
format=dvd -ovc lavc -oac lavc -lavcopts 
vcodec=mpeg2video:aspect=16/9:vbitrate=5528:vrc_maxrate=5528:vrc_buf_size=1835:keyint=25:acodec=mp2:abitrate=128 
-o 1.mpeg some_avifile.avi

---Output---
MEncoder dev-CVS-050305-14:36-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, 
Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

File not found: 'frameno.avi'
Failed to open frameno.avi
init_freetype
get_path('font/font.desc') -> '/home/hl/.mplayer/font/font.desc'
font: can't open file: /home/hl/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
[file] File size is 733888512 bytes
STREAM: [file] some_avifile.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x2bbe4000
AVI file format detected.
list_end=0x2292
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 71168   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  704 x 304
==========================
list_end=0x10F4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: xvid (64697678)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 71168
Suggested BufferSize: 87358
Quality 10000
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 704
   biHeight 304
   biPlanes 1
   biBitCount 12
   biCompression 1145656920='XVID'
   biSizeImage 1284096
===========================
Regenerating keyframe table for MPEG4 video
list_end=0x2186
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 1
Rate: 48000/1152 = 41.667
Start: 0   Len: 118613
Suggested BufferSize: 960
Quality -1
Sample size: 0
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 15613
Block align: 1152
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x0
mp3.nBlockSize=375
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
list_end=0x2292
AVI: dmlh found (size=248) (total_frames=71168)
list_end=0x22D2
hdr=Software  size=43
Software  : VirtualDubMod 1.5.4.1 (build 2178/release)
list_end=0x2B8FE2FC
Found movie at 0x280C - 0x2B8FE2FC
Reading INDEX block, 189781 chunks for 71168 frames (fpos=0x2b8fe304)
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x18C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=684891243 (71168) audio size=44394864 (118613)
VIDEO:  [XVID]  704x304  12bpp  25.000 fps  1924.7 kbps (235.0 kbyte/s)
[V] filefmt:3  fourcc:0x44495658  size:704x304  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
^MMPEG 1.0, Layer III, 48000 Hz 128 kbit Joint-Stereo, BPF: 384
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
PACKET SIZE: 2048 bytes
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [harddup]
Opening video filter: [expand w=720 h=576]
Expand: 720 x 576, -1 ; -1  (-1=autodetect) osd: 0
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
FRAME_SIZE: 1152, BUFFER_SIZE: 4608, TAG: 0x50
Writing AVI header...
Limiting audio preload to 0.4s
Increasing audio density to 4

mpegfile_write_chunk, Audio codec=50, len=384, frame size=0
AUDIO FRAME SIZE: 384, DELTA_PTS: 2211840 (0.024)

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384
[ffmpeg] aspect_ratio: 2.315789
VDec: vo config request - 704 x 304 (preferred csp: Planar YV12)
Trying filter chain: expand harddup expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.32:1 - prescaling to correct movie aspect.
VO Config (704x304->704x304,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
REQ: flags=0x401  req=0x0
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
*** [harddup] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [expand] Direct Rendering mp_image_t, 720x304x12bpp YUV planar, 
328320 bytes
*** [expand] Exporting mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [lavc] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
get_path('subfont.ttf') -> '/home/hl/.mplayer/subfont.ttf'
Unicode font: 255 glyphs.
[mpeg2video @ 0x85e7dc0]rc buffer underflow  <--------- buffer underflow
parse_mpeg12_video, len=6573

FPS: 25.000, FRAMETIME: 0.040

LAST: 0, TR: 0, DIFF: 0, MAX: 0, d1: 0
Video frame type: I, TR: 0
parse_mpeg12_video, return 6573
mpegfile_write_chunk, Video codec=3267706d, len=6573, mpeg12 returned 6573

n=0, type=I, temp_ref=0
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] 
A/Vms 0/13 D/B/S 0/0/0 ^M
mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
XXX initial  v_pts=0.000  a_pos=2304 (0.148)
*** [harddup] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [expand] Direct Rendering mp_image_t, 720x304x12bpp YUV planar, 
328320 bytes
parse_mpeg12_video, len=342

LAST: 0, TR: 1, DIFF: 1, MAX: 0, d1: 1
Video frame type: P, TR: 1
parse_mpeg12_video, return 342
mpegfile_write_chunk, Video codec=3267706d, len=342, mpeg12 returned 1368

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
Pos:   0.1s      2f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] 
A/Vms 0/14 D/B/S 0/0/0 ^M
mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
parse_mpeg12_video, len=1707

LAST: 1, TR: 2, DIFF: 1, MAX: 1, d1: 1
Video frame type: P, TR: 2
parse_mpeg12_video, return 1707
mpegfile_write_chunk, Video codec=3267706d, len=1707, mpeg12 returned 6828

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
n+1=2, type=P, temp_ref=2
n=2, type=P, temp_ref=2
Pos:   0.1s      3f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] 
A/Vms 0/13 D/B/S 0/0/0 ^M
mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
n+1=2, type=P, temp_ref=2
n=2, type=P, temp_ref=2
parse_mpeg12_video, len=1908

LAST: 2, TR: 3, DIFF: 1, MAX: 2, d1: 1
Video frame type: P, TR: 3
parse_mpeg12_video, return 1908
mpegfile_write_chunk, Video codec=3267706d, len=1908, mpeg12 returned 7632

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
n+1=2, type=P, temp_ref=2
n=2, type=P, temp_ref=2
n+1=3, type=P, temp_ref=3
n=3, type=P, temp_ref=3
Pos:   0.2s      4f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] 
A/Vms 0/13 D/B/S 0/0/0 ^M
mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
n+1=2, type=P, temp_ref=2
n=2, type=P, temp_ref=2
n+1=3, type=P, temp_ref=3
n=3, type=P, temp_ref=3

mpegfile_write_chunk, Audio codec=50, len=384, frame size=384

n=0, type=I, temp_ref=0
n+1=1, type=P, temp_ref=1
n=1, type=P, temp_ref=1
n+1=2, type=P, temp_ref=2
n=2, type=P, temp_ref=2
n+1=3, type=P, temp_ref=3
n=3, type=P, temp_ref=3
parse_mpeg12_video, len=1907

The rest is cut out
---End of output---

-- 
Sincerley
Heine Laursen




More information about the MPlayer-users mailing list