[BUG] seek problem with external ac3 stream
Hello, I encountered the following problem with r26205 and a lot of earlier versions (though, I haven't perform regression test jet): When I use external ac3 audio stream (-audiofile option), I cannot seek in the movie properly: video is sought itself, but audio stream starts playing from the beginning after the seek operation. Moreover, video playback becomes becomes somewhat broken after seek: it seems that fps became lower. Interesting than just pausing (without seeking) works fine. Video itself is ok and can be played without any problems, as well as audio itself, but together they produce a problem. Such behaviour is valid for any video in any container, but external audio must be in AC3 format to reproduce a problem. There is nothing special or uncommon in mplayer's output, but it is provided at the and of e-mail just in case. Also I can upload a sample stream, but this bug is reproducible with any AC3 stream I have, so I can't see necessity of upload. *************************************************************************************************** $ ./mplayer -v -stop-xscreensaver -vo gl:lscale=1:cscale=1:yuv=3:osdcolor=0x0fefff /home/andrew/media/video/anime2/video/resident_evil/resident_evil_3_extinction_rus.mkv -audiofile /home/andrew/media/video/anime2/video/resident_evil/Resident\ Evil\ Extinction.ac3 MPlayer dev-SVN-r26205-4.3.0 (C) 2000-2008 MPlayer Team CPU: AMD Athlon(tm) XP 3200+ (Family: 6, Model: 10, Stepping: 0) CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE Creating config file: /home/andrew/.mplayer/config get_path('codecs.conf') -> '/home/andrew/.mplayer/codecs.conf' Reading /home/andrew/.mplayer/codecs.conf: Can't open '/home/andrew/.mplayer/codecs.conf': No such file or directory Reading /usr/local/etc/mplayer/codecs.conf: 117 audio & 241 video codecs Configuration: --language=en --enable-menu --enable-xmms --enable-largefiles --enable-fbdev --disable-tv --disable-dvbhead --disable-lirc --enable-xvmc CommandLine: '-v' '-stop-xscreensaver' '-vo' 'gl:lscale=1:cscale=1:yuv=3:osdcolor=0x0fefff' '/home/andrew/media/video/anime2/video/resident_evil/resident_evil_3_extinction_rus.mkv' '-audiofile' '/home/andrew/media/video/anime2/video/resident_evil/Resident Evil Extinction.ac3' init_freetype get_path('font/font.desc') -> '/home/andrew/.mplayer/font/font.desc' font: can't open file: /home/andrew/.mplayer/font/font.desc font: can't open file: /usr/local/share/mplayer/font/font.desc Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay get_path('fonts') -> '/home/andrew/.mplayer/fonts' Using nanosleep() timing get_path('input.conf') -> '/home/andrew/.mplayer/input.conf' Parsing input config file /home/andrew/.mplayer/input.conf Input config file /home/andrew/.mplayer/input.conf parsed: 70 binds get_path('resident_evil_3_extinction_rus.mkv.conf') -> '/home/andrew/.mplayer/resident_evil_3_extinction_rus.mkv.conf' Playing /home/andrew/media/video/anime2/video/resident_evil/resident_evil_3_extinction_rus.mkv. get_path('sub/') -> '/home/andrew/.mplayer/sub/' [file] File size is 4561973814 bytes STREAM: [file] /home/andrew/media/video/anime2/video/resident_evil/resident_evil_3_extinction_rus.mkv STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) [file] File size is 451653120 bytes STREAM: [file] /home/andrew/media/video/anime2/video/resident_evil/Resident Evil Extinction.ac3 STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) LAVF_check: Matroska file format Checking for YUV4MPEG2 ASF_check: not ASF guid! Checking for NuppelVideo Checking for REAL Checking for SMJPEG [mkv] Found the head... [mkv] + a segment... [mkv] /---- [ parsing seek head ] --------- [mkv] /---- [ parsing seek head ] --------- [mkv] \---- [ parsing seek head ] --------- [mkv] /---- [ parsing cues ] ----------- [mkv] \---- [ parsing cues ] ----------- [mkv] \---- [ parsing seek head ] --------- [mkv] |+ segment information... [mkv] | + timecode scale: 1000000 [mkv] | + duration: 5645.983s [mkv] |+ segment tracks... [mkv] | + a track... [mkv] | + Track number: 1 [mkv] | + Track type: Video [mkv] | + Default flag: 1 [mkv] | + Codec ID: V_MPEG4/ISO/AVC [mkv] | + CodecPrivate, length 68 [mkv] | + Default duration: 41.708ms ( = 23.976 fps) [mkv] | + Language: eng [mkv] | + Video track [mkv] | + Pixel width: 1280 [mkv] | + Pixel height: 544 [mkv] | + Display width: 40 [mkv] | + Display height: 17 [mkv] | + a track... [mkv] | + Track number: 2 [mkv] | + Track type: Audio [mkv] | + Default flag: 1 [mkv] | + Codec ID: A_AC3 [mkv] | + Default duration: 32.000ms ( = 31.250 fps) [mkv] | + Language: und [mkv] | + Audio track [mkv] | + Sampling frequency: 48000.000000 [mkv] | + Channels: 6 [mkv] |+ found cluster, headers are parsed completely :) ==> Found video stream: 1 [mkv] Aspect: 2.352941 [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0 ==> Found audio stream: 2 [mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und [mkv] Will play video track 1. Matroska file format detected. VIDEO: [avc1] 1280x544 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s) LAVF_check: raw ac3 Checking for YUV4MPEG2 ASF_check: not ASF guid! Checking for NuppelVideo Checking for REAL Checking for SMJPEG Searching demuxer type for filename /home/andrew/media/video/anime2/video/resident_evil/Resident Evil Extinction.ac3 ext: .ac3 Trying demuxer 35 based on filename extension LAVF_check: raw ac3 libavformat file format detected. ==> Found audio stream: 0 [lavf] Audio stream found, -aid 0 ======= WAVE Format ======= Format Tag: 8192 (0x2000) Channels: 6 Samplerate: 48000 avg byte/sec: 80000 Block align: 1 bits/sample: 0 cbSize: 0 ========================================================================== LAVF: 1 audio and 0 video streams found LAVF: build 3410176 [V] filefmt:65536 fourcc:0x31637661 size:1280x544 fps:23.98 ftime:=0.0417 get_path('sub/') -> '/home/andrew/.mplayer/sub/' [gl] using extended formats. Use -vo gl:nomanyfmts if playback fails. [gl] Using 0 as slice height (0 means image height). X11 opening display: :0.0 vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF) vo: X11 running at 1440x900 with depth 24 and 32 bpp (":0.0" => local display) [x11] Detected wm supports layers. [x11] Using workaround for Metacity bugs. [x11] Detected wm supports NetWM. [x11] Detected wm supports ABOVE state. [x11] Detected wm supports BELOW state. [x11] Detected wm supports FULLSCREEN state. [x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms Disabling DPMS DPMSDisable stat: 1 ========================================================================== Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family INFO: libavcodec init OK! Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264) ========================================================================== ========================================================================== Opening audio decoder: [liba52] AC3 decoding with liba52 dec_audio: Allocating 3840 bytes for input buffer. dec_audio: Allocating 6144 + 65536 = 71680 bytes for output buffer. Using SSE optimized IMDCT transform AC3: 5.1 (3f+2r+lfe) 48000 Hz 640.0 kbit/s A52 flags before a52_frame: 0x2A A52 flags after a52_frame: 0xA Using MMX optimized resampler AUDIO: 48000 Hz, 2 ch, s16le, 640.0 kbit/41.67% (ratio: 80000->192000) Selected audio codec: [a52] afm: liba52 (AC3-liba52) ========================================================================== 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 ao2: 48000 Hz 2 chans s16le audio_setup: using '/dev/dsp' dsp device audio_setup: using '/dev/mixer' mixer device audio_setup: using 'pcm' mixer device [AO OSS] audio_setup: Can't open audio device /dev/dsp: Device or resource busy alsa-init: requested format: 48000 Hz, 2 channels, 9 alsa-init: using ALSA 1.0.10 alsa-init: setup for 1/2 channel(s) alsa-init: using device default alsa-init: pcm opened in blocking mode alsa-init: chunksize set to 1024 alsa-init: fragcount=16 alsa-init: got buffersize=65536 alsa-init: got period size 1024 alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample) AO: Description: ALSA-0.9.x-1.x audio output AO: Author: Alex Beregszaszi, Zsolt Barat <joy@streamminister.de> AO: Comment: under developement 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: 0.000000 VDec: vo config request - 1280 x 544 (preferred colorspace: Planar YV12) Trying filter chain: vo VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 2.35:1 - prescaling to correct movie aspect. VO Config (1280x544->1280x544,flags=0,'MPlayer',0x32315659) VO: [gl] 1280x544 => 1280x544 Planar YV12 VO: Description: X11 (OpenGL) VO: Author: Arpad Gereoffy <arpi@esp-team.scene.hu> OpenGL extensions string: GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIX_fbconfig GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control GLX_EXT_texture_from_pixmap GLX_ARB_multisample GLX_NV_float_buf [gl] Creating 2048x1024 texture... [gl] generated fragment program: !!ARBfp1.0 OPTION ARB_precision_hint_fastest;TEMP coord, coord2, cdelta, parmx, parmy, a, b, yuv;MAD coord.xy, fragment.texcoord[0], {2048.000000, 1024.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000488, 0, 0.000488, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.000977, 0, 0.000977};ADD coord, fragment.texcoord[0].xyxy, cdelta.xyxw;ADD coord2, fragment.texcoord[0].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[0], 2D;TEX a.g, coord.zwzw, texture[0], 2D;TEX b.r, coord2.xyxy, texture[0], 2D;TEX b.g, coord2.zwzw, texture[0], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;LRP a.a, parmy.b, b.rrrr, b.gggg;LRP yuv.r, parmx.b, a.bbbb, a.aaaa;MAD coord.xy, fragment.texcoord[1], {1024.000000, 512.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000977, 0, 0.000977, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.001953, 0, 0.001953};ADD coord, fragment.texcoord[1].xyxy, cdelta.xyxw;ADD coord2, fragment.texcoord[1].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[1], 2D;TEX a.g, coord.zwzw, texture[1], 2D;TEX b.r, coord2.xyxy, texture[1], 2D;TEX b.g, coord2.zwzw, texture[1], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;LRP a.a, parmy.b, b.rrrr, b.gggg;LRP yuv.g, parmx.b, a.bbbb, a.aaaa;MAD coord.xy, fragment.texcoord[2], {1024.000000, 512.000000}, {0.5, 0.5};TEX parmx, coord.x, texture[3], 1D;MUL cdelta.xz, parmx.rrgg, {-0.000977, 0, 0.000977, 0};TEX parmy, coord.y, texture[3], 1D;MUL cdelta.yw, parmy.rrgg, {0, -0.001953, 0, 0.001953};ADD coord, fragment.texcoord[2].xyxy, cdelta.xyxw;ADD coord2, fragment.texcoord[2].xyxy, cdelta.zyzw;TEX a.r, coord.xyxy, texture[2], 2D;TEX a.g, coord.zwzw, texture[2], 2D;TEX b.r, coord2.xyxy, texture[2], 2D;TEX b.g, coord2.zwzw, texture[2], 2D;LRP a.b, parmy.b, a.rrrr, a.gggg;LRP a.a, parmy.b, b.rrrr, b.gggg;LRP yuv.b, parmx.b, a.bbbb, a.aaaa;PARAM ycoef = {1.1640, 1.1640, 1.1640};PARAM ucoef = {0.0000, -0.3910, 2.0180};PARAM vcoef = {1.5960, -0.8130, 0.0000};PARAM offsets = {-0.8742, 0.5313, -1.0860};PARAM gamma = {1.0000, 1.0000, 1.0000};TEMP res;MAD res.rgb, yuv.rrrr, ycoef, offsets;MAD res.rgb, yuv.gggg, ucoef, res;MAD_SAT res.rgb, yuv.bbbb, vcoef, res;POW result.color.r, res.r, gamma.r;POW result.color.g, res.g, gamma.g;POW result.color.b, res.b, gamma.b;END [gl] Program statistics: [gl] instructions: 48/4096 [gl] native instructions: 52/4096 [gl] temporaries: 9/32 [gl] native temporaries: 10/32 [gl] parameters: 12/1024 [gl] native parameters: 12/1024 [gl] attribs: 3/16 [gl] native attribs: 3/16 [gl] ALU instructions: 30/4096 [gl] TEX instructions: 18/4096 [gl] TEX indirections: 7/4096 [gl] native ALU instructions: 34/4096 [gl] native TEX instructions: 18/4096 [gl] native TEX indirections: 7/4096 [gl] Resize: 1280x544 *** [vo] Exporting mp_image_t, 1280x544x12bpp YUV planar, 1044480 bytes get_path('subfont.ttf') -> '/home/andrew/.mplayer/subfont.ttf' New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf). subtitle font: load_sub_face failed. get_path('subfont.ttf') -> '/home/andrew/.mplayer/subfont.ttf' New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf). subtitle font: load_sub_face failed. [gl] Resize: 1280x544 get_path('subfont.ttf') -> '/home/andrew/.mplayer/subfont.ttf' 2 0 New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf). subtitle font: load_sub_face failed. get_path('subfont.ttf') -> '/home/andrew/.mplayer/subfont.ttf' New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf). subtitle font: load_sub_face failed. Uninit audio filters...329.598 ct: -0.213 437/437 20% 2% 0.8% 0 0 [libaf] Removing filter dummy Uninit audio: liba52 Uninit video: ffmpeg Successfully enabled DPMS alsa-uninit: pcm closed vo: uninit ... Exiting... (Quit) ***************************************************************************************************
I encountered the following problem with r26205 and a lot of earlier versions (though, I haven't perform regression test jet):
When I use external ac3 audio stream (-audiofile option), I cannot seek in the movie properly: video is sought itself, but audio stream starts playing from the beginning after the seek operation. Moreover, video playback becomes becomes somewhat broken after seek: it seems that fps became lower. Interesting than just pausing (without seeking) works fine.
Video itself is ok and can be played without any problems, as well as audio itself, but together they produce a problem. Such behaviour is valid for any video in any container, but external audio must be in AC3 format to reproduce a problem.
Moreover, with ogg or mp3 external audio streams I often get choppy playback and "Your system is to slow messages", despite my CPU load is low, it seems to be some sync problems. Anyway, is -audiofile supposed to work at all? Can someone comment/confirm this bug? Sincerely yours, Andrew
On Sat, 15 Mar 2008 12:33:30 +0300, Andrew Savchenko wrote:
When I use external ac3 audio stream (-audiofile option), I cannot seek in the movie properly: video is sought itself, but audio stream starts playing from the beginning after the seek
this used to happen with all audiofile formats a long time ago. i wonder if -correct-pts now on by default broke something.
Moreover, with ogg or mp3 external audio streams I often get choppy playback and "Your system is to slow messages", despite my CPU load is low, it seems to be some sync problems.
i dont get such problem with audiofile mp3. will try vorbis later.
Anyway, is -audiofile supposed to work at all? Can someone comment/confirm this bug?
Sincerely yours, Andrew
Hi, On Monday 17 March 2008, Compn wrote:
On Sat, 15 Mar 2008 12:33:30 +0300, Andrew Savchenko wrote:
When I use external ac3 audio stream (-audiofile option), I cannot seek in the movie properly: video is sought itself, but audio stream starts playing from the beginning after the seek
this used to happen with all audiofile formats a long time ago. i wonder if -correct-pts now on by default broke something.
Moreover, with ogg or mp3 external audio streams I often get choppy playback and "Your system is to slow messages", despite my CPU load is low, it seems to be some sync problems.
i dont get such problem with audiofile mp3. will try vorbis later.
And the same problem is still here... -- Best regards, Andrew
participants (3)
-
Andrew Savchenko -
Andrew Savchenko -
Compn