[MPlayer-users] audiofile restarting during seek or -ss

Jan Mashat jan.mashat at factory.co.hu
Tue Oct 5 11:56:09 CEST 2010


Hi,

I'm trying to play back an MPEG2 video along with a PCM audiofile, but  
the video file is missing time-sync info:
VLC gives a "demux doesn't like DEMUX_GET_TIME" error when I include  
the audio as --input-slave (and plays the video without audio).

mPlayer seems to play both video and audio fine, however when I seek  
(or use -ss) the video position changes correctly but the audio starts  
from the beginning, and the following message appears:
[mpeg2video @ 0xa04dc0]warning: first frame is no keyframe
[VD_FFMPEG] DRI failure.

I've tried dozens of mplayer options and parameter combinations  
without success: -autosync, -correct-pts, -audio-demuxer, -demuxer, - 
idx, -forceidx, -mc, -ni, -nobps, -psprobe, -format, -afm, -vc, -fvm, - 
af resample, lavcresample, format

Below is the video and audio info, and mplayer output with msglevel 6...


##### mplayer -identify video

$ ../mplayer orig.m2v -identify -frames 0
MPlayer SVN-r30478-4.2.1 (C) 2000-2010 MPlayer Team

Playing orig.m2v.
MPEG-ES file format detected.
ID_VIDEO_ID=0
VIDEO:  MPEG2  1920x1080  (aspect 3)  25.000 fps  50000.0 kbps (6250.0  
kbyte/s)
ID_FILENAME=orig.m2v
ID_DEMUXER=mpeges
ID_VIDEO_FORMAT=0x10000002
ID_VIDEO_BITRATE=50000000
ID_VIDEO_WIDTH=1920
ID_VIDEO_HEIGHT=1080
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_LENGTH=19.93
ID_SEEKABLE=1
ID_CHAPTERS=0
= 
= 
========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
= 
= 
========================================================================
ID_VIDEO_CODEC=ffmpeg2
Audio: no sound
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF


##### mplayer -identify audio

$ ../mplayer orig.wav -identify -frames 0
MPlayer SVN-r30478-4.2.1 (C) 2000-2010 MPlayer Team

Playing orig.wav.
ID_AUDIO_ID=0
Audio only file format detected.
ID_FILENAME=orig.wav
ID_DEMUXER=audio
ID_AUDIO_FORMAT=1
ID_AUDIO_BITRATE=1536000
ID_AUDIO_RATE=0
ID_AUDIO_NCH=2
ID_LENGTH=20.00
ID_SEEKABLE=1
ID_CHAPTERS=0
= 
= 
========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000- 
 >192000)
ID_AUDIO_BITRATE=1536000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
= 
= 
========================================================================
AO: [coreaudio] 48000Hz 2ch s16le (2 bytes per sample)
ID_AUDIO_CODEC=pcm
Video: no video
Starting playback...


Exiting... (End of file)
ID_EXIT=EOF


##### mplayer msglevel 6

$ ../mplayer orig.m2v -audiofile orig.wav -ss 5 -msglevel all=6
MPlayer SVN-r30478-4.2.1 (C) 2000-2010 MPlayer Team
AltiVec found
CPU: PowerPC
get_path('codecs.conf') -> '/Users/masatjan/.mplayer/codecs.conf'
Reading /Users/masatjan/.mplayer/codecs.conf: Can't open '/Users/ 
masatjan/.mplayer/codecs.conf': No such file or directory
Reading /Users/adrian/dev/mplayer/mplayer/usrs/local/etc/mplayer/ 
codecs.conf: Can't open '/Users/adrian/dev/mplayer/mplayer/usrs/local/ 
etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration: --prefix=/Users/adrian/dev/mplayer/mplayer/usrs/local -- 
extra-libs=-Wl,-search_paths_first --disable-x11 --disable-gl -- 
disable-libvorbis --disable-theora --disable-mencoder --disable-apple- 
remote --disable-jack --disable-sdl --enable-macosx-bundle --disable- 
ass-internal --disable-libavutil_a --disable-libavcodec_a --disable- 
libavformat_a --disable-libpostproc_a --disable-libswscale_a -- 
target=ppc-Darwin
CommandLine: 'orig.m2v' '-audiofile' 'orig.wav' '-ss' '5' '-msglevel'  
'all=6'
init_freetype
Using Unoptimized OnScreenDisplay
get_path('fonts') -> '/Users/masatjan/.mplayer/fonts'
Using Darwin accurate timing
get_path('input.conf') -> '/Users/masatjan/.mplayer/input.conf'
Can't open input config file /Users/masatjan/.mplayer/input.conf: No  
such file or directory
Can't open input config file /Users/adrian/dev/mplayer/mplayer/usrs/ 
local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('orig.m2v.conf') -> '/Users/masatjan/.mplayer/orig.m2v.conf'

Playing orig.m2v.
get_path('sub/') -> '/Users/masatjan/.mplayer/sub/'
[file] File size is 124558404 bytes
STREAM: [file] orig.m2v
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
[file] File size is 3841068 bytes
STREAM: [file] orig.wav
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: raw MPEG video
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename orig.m2v ext: .m2v
Trying demuxer 2 based on filename extension
sync_mpeg_ps: seems to be ES/PES stream...
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG packet stats: p100: 51  p101: 51 p1B6: 0 p12x: 800 sli: 151 a:  
150 b: 150 c: 0 idr: 50 sps: 0 pps: 50 PES: 0  MP3: 4, synced: 0
stream_seek: WARNING! Can't seek to 0x0 !
MPEG-ES file format detected.
==> Found video stream: 0
LAVF_check: WAV format
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename orig.wav ext: .wav
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 48000
avg byte/sec: 192000
Block align: 4
bits/sample: 16
cbSize: 0
= 
= 
========================================================================
demux_audio: audio data 0x400 - 0x3A9C00
Audio only file format detected.
Searching for sequence header... OK!
VIDEO:  MPEG2  1920x1080  (aspect 3)  25.000 fps  50000.0 kbps (6250.0  
kbyte/s)
[V] filefmt:65536  fourcc:0x10000002  size:1920x1080  fps:25.000   
ftime:=0.0400
get_path('sub/') -> '/Users/masatjan/.mplayer/sub/'
= 
= 
========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 1920 x 1080 (preferred colorspace: Mpeg PES)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
= 
= 
========================================================================
= 
= 
========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000- 
 >192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
= 
= 
========================================================================
Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Trying every known audio driver...
AO: [coreaudio] init([48000Hz][2ch][s16le][0])
AO: [coreaudio] source: 48000.0Hz 16bit [lpcm][12][4][1][4][2] int LE  
S packed
AO: [coreaudio] using    47 chunks of 4096 bytes (buffer len 192512  
bytes)
AO: [coreaudio] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: Darwin/Mac OS X native audio output
AO: Author: Timothy J. Wood & Dan Christiansen & Chris Roccati
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/ 
s16le...
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[dummy] Was reinitialized: 48000Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 65536
[ffmpeg] aspect_ratio: 1.777778
VDec: vo config request - 1920 x 1080 (preferred colorspace: Planar  
422P)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
VDec: using Planar 422P as output csp (no 3)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (1920x1080->1920x1080,flags=0,'MPlayer',0x50323234)
[swscaler @ 0xebf11c]using unscaled yuv422p -> yuyv422 special converter
REQ: flags=0x37  req=0x0
VO: [corevideo] 1920x1080 => 1920x1080 Packed YUY2
VO: Description: Mac OS X Core Video
VO: Author: Nicolas Plourde <nicolas.plourde at gmail.com>
[ASPECT] Warning: No suitable new res found!
*** [vo] Allocating mp_image_t, 1920x1080x16bpp YUV packed, 4147200  
bytes
*** [scale] Allocating (slices) mp_image_t, 1920x1088x16bpp YUV  
planar, 4177920 bytes
*** [scale] Allocating (slices) mp_image_t, 1920x1088x16bpp YUV  
planar, 4177920 bytes
[mpeg2video @ 0xa04dc0]warning: first frame is no keyframe
[VD_FFMPEG] DRI failure.
*** [scale] Exporting mp_image_t, 1920x1080x16bpp YUV planar, 4147200  
bytes
Unicode font: 255 glyphs.
Unicode font: 255 glyphs.
Increasing filtered audio buffer size from 65536 to 67584??,?% 1 0
[mpeg2video @ 0xa04dc0]warning: first frame is no keyframe
ds_fill_buffer: EOF reached (stream: video)  370 57% 13%  0.2% 34 0
ds_fill_buffer: EOF reached (stream: video)
EOF code: 1  14.8 A-V:  0.014 ct: -0.077 370/370 57% 13%  0.2% 34 0

Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: pcm
Uninit video: ffmpeg

Exiting... (End of file)


Audio/video seeking works correctly when I pair the audio file with a  
different video, so the video file is clearly the culprit.
Is there any way for mplayer to overcome this 'missing time-sync info'  
defect when seeking?

Jan


More information about the MPlayer-users mailing list