mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
26.75k stars 2.84k forks source link

No audio with some videos #46

Closed vallx-ny closed 11 years ago

vallx-ny commented 11 years ago

[stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac) Failed to open VDPAU backend libvdpau_r600.so: cannot open shared object file: No such file or directory [vdpau] Error when calling vdp_device_create_x11: 1 X11 error: GLXBadFBConfig [gl] Could not create GLX context! Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] ad_lavc: initial decode failed Audio decoder init failed for lavc:aac Failed to initialize an audio decoder for codec 'aac'. Audio: no audio VO: [opengl] 1280x720 => 1280x720 420p10 (Paused) V: 00:00:02 / 00:23:47 (0%)

I get this error with some files, search a LOT, but can't find a resolution. I re-installed the audio codecs but didn't solve the problem.

With some videos the audio works very well

[stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac) Failed to open VDPAU backend libvdpau_r600.so: cannot open shared object file: No such file or directory [vdpau] Error when calling vdp_device_create_x11: 1 X11 error: GLXBadFBConfig [gl] Could not create GLX context! Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac] AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample) VO: [opengl] 1280x720 => 1280x720 420p10 AV: 00:00:08 / 00:23:47 (0%) A-V: -0.000
(Paused) AV: 00:00:10 / 00:23:47 (0%) A-V: 0.001

I'm sorry if the answer is somewhere, but I really couldn't find it.

ghost commented 11 years ago

This shouldn't happen. Can you post the output of mediainfo -f yourfile.mkv on a file that doesn't work, or post a sample file?

vallx-ny commented 11 years ago

Sure, here is:

vallardx@Alice ~/Videos $ mediainfo -f "/home/vallardx/Videos/Sakurasou_no_Pet_naKanojo-01[HDTV1280x720][10Bit]_(B7GYSI93).mkv" General Count : 279 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Unique ID : 214163492724176916438355340507057648145 Unique ID : 214163492724176916438355340507057648145 (0xA11E636BC5608C1FBDED883FC3127211) Count of video streams : 1 Count of audio streams : 1 Video_Format_List : AVC Video_Format_WithHint_List : AVC Codecs Video : AVC Video_Language_List : English Audio_Format_List : AAC Audio_Format_WithHint_List : AAC Audio codecs : AAC LC Audio_Language_List : English Complete name : /home/vallardx/Videos/Sakurasou_no_Pet_naKanojo-01[HDTV1280x720][10Bit]_(B7GYSI93).mkv" Folder name : /home/vallardx/Videos File name : Sakurasou_no_Pet_naKanojo-01[HDTV1280x720][10Bit]_(B7GYSI93) File extension : mkv Format : Matroska Format : Matroska Format/Url : http://packs.matroska.org/ Format/Extensions usually used : mkv mk3d mka mks Commercial name : Matroska Format version : Version 2 Codec : Matroska Codec : Matroska Codec/Url : http://packs.matroska.org/ Codec/Extensions usually used : mkv mk3d mka mks File size : 144445444 File size : 138 MiB File size : 138 MiB File size : 138 MiB File size : 138 MiB File size : 137.8 MiB Duration : 1452578 Duration : 24mn 12s Duration : 24mn 12s 578ms Duration : 24mn 12s Duration : 00:24:12.578 Overall bit rate : 795526 Overall bit rate : 796 Kbps Encoded date : UTC 2012-10-14 07:03:29 File last modification date : UTC 2013-03-15 11:14:17 File last modification date (local) : 2013-03-15 08:14:17 Writing application : mkvmerge v5.2.1 ('A Far Off Place') built on Jan 2 2012 23:21:10 Writing library : libebml v1.2.3 + libmatroska v1.3.0 Writing library : libebml v1.2.3 + libmatroska v1.3.0

Video Count : 248 Count of stream of this kind : 1 Kind of stream : Video Kind of stream : Video Stream identifier : 0 StreamOrder : 0 ID : 1 ID : 1 Unique ID : 1 Format : AVC Format/Info : Advanced Video Codec Format/Url : http://developers.videolan.org/x264.html Commercial name : AVC Format profile : High 10@L4.0 Format settings : CABAC / 6 Ref Frames Format settings, CABAC : Yes Format settings, CABAC : Yes Format settings, ReFrames : 6 Format settings, ReFrames : 6 frames Internet media type : video/H264 Muxing mode : Header stripping Codec ID : V_MPEG4/ISO/AVC Codec ID/Url : http://ffdshow-tryout.sourceforge.net/ Codec : V_MPEG4/ISO/AVC Codec : AVC Codec/Family : AVC Codec/Info : Advanced Video Codec Codec/Url : http://ffdshow-tryout.sourceforge.net/ Codec profile : High 10@L4.0 Codec settings : CABAC / 6 Ref Frames Codec settings, CABAC : Yes Codec_Settings_RefFrames : 6 Width : 1280 Width : 1 280 pixels Height : 720 Height : 720 pixels Pixel aspect ratio : 1.000 Display aspect ratio : 1.778 Display aspect ratio : 16:9 Frame rate mode : VFR Frame rate mode : Variable Original frame rate : 23.976 Original frame rate : 23.976 fps Resolution : 10 Resolution : 10 bits Colorimetry : 4:2:0 Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 10 Bit depth : 10 bits Scan type : Progressive Scan type : Progressive Interlacement : PPF Interlacement : Progressive Delay : 0 Delay : 00:00:00.000 Delay, origin : Container Delay, origin : Container Writing library : x264 - core 125 r2200 999b753 Writing library : x264 core 125 r2200 999b753 Writing library/Name : x264 Writing library/Version : core 125 r2200 999b753 Encoding settings : cabac=1 / ref=6 / deblock=1:1:1 / analyse=0x3:0x133 / me=umh / subme=10 / psy=1 / psy_rd=0.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=8 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=288 / keyint_min=28 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=22.0 / qcomp=0.80 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=2:0.60 Language : en Language : English Language : English Language : en Language : eng Language : en Default : Yes Default : Yes Forced : No Forced : No

Audio Count : 217 Count of stream of this kind : 1 Kind of stream : Audio Kind of stream : Audio Stream identifier : 0 StreamOrder : 1 ID : 2 ID : 2 Unique ID : 4256418464 Format : AAC Format/Info : Advanced Audio Codec Commercial name : AAC Format profile : LC Codec ID : A_AAC Codec : AAC LC Codec : AAC LC Codec/Family : AAC Duration : 1452578 Duration : 24mn 12s Duration : 24mn 12s 578ms Duration : 24mn 12s Duration : 00:24:12.578 Channel(s) : 2 Channel(s) : 2 channels Channel positions : Front: L R Channel positions : 2/0/0 Sampling rate : 48000 Sampling rate : 48.0 KHz Samples count : 69723744 Compression mode : Lossy Compression mode : Lossy Delay : 6256 Delay : 6s 256ms Delay : 6s 256ms Delay : 6s 256ms Delay : 00:00:06.256 Delay, origin : Container Delay, origin : Container Delay relative to video : 6256 Delay relative to video : 6s 256ms Delay relative to video : 6s 256ms Delay relative to video : 6s 256ms Delay relative to video : 00:00:06.256 Video0 delay : 6256 Video0 delay : 6s 256ms Video0 delay : 6s 256ms Video0 delay : 6s 256ms Video0 delay : 00:00:06.256 Default : Yes Default : Yes Forced : No Forced : No

ghost commented 11 years ago

Can you cut a sample and upload it somewhere? E.g. dd if=input.mkv.mkv of=output.mkv count=10000 creates a 10 MB file named output.mkv, that contains the first 10 MB of input.mkv.

vallx-ny commented 11 years ago

Sure, here it is: http://www.mediafire.com/download.php?zgqcl5hu7i750wx

ghost commented 11 years ago

Thanks, that's very helpful.

Somehow there's no audio at the start of the file, which breaks decoder initialization. I'll try to fix it.

ghost commented 11 years ago

Should be fixed now.

vallx-ny commented 11 years ago

I updated and tested, but still not working. I must say that this error only happens with 10bit encoded(the most recent ones, but doesn't work with any other player(besides vlc). There are files from the same source, that works.

Detected file format: Matroska [stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac)

Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] Selected audio codec: AAC (Advanced Audio Coding) [lavc:aac] AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample) VO: [opengl] 1280x720 => 1280x720 420p10 (Paused) AV: 00:00:06 / 00:23:49 (0%) A-V: 0.000

And the same error with another video

Detected file format: Matroska [stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac)

Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] ad_lavc: initial decode failed Audio decoder init failed for lavc:aac Failed to initialize an audio decoder for codec 'aac'. Audio: no audio VO: [opengl] 1280x720 => 1280x720 420p10

Maybe is the format of the encode(or like you said the splash image breaking everything), I don't know very well. I'll try with other file without that cover from another source.

Thanks for your attention and sorry for anything.

ghost commented 11 years ago

I updated and tested, but still not working.

The same file? The sample you posted works for me now. If there are any other files that are not working, can you cut a sample and upload it?

Thanks for your attention and sorry for anything.

You don't have to be sorry, reports about broken playback are very welcome.

vallx-ny commented 11 years ago

Thanks for all the support. Even the sample file that I posted for you doesn't works, I still get the error

Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] ad_lavc: initial decode failed Audio decoder init failed for lavc:aac Failed to initialize an audio decoder for codec 'aac'. Audio: no audio VO: [opengl] 1280x720 => 1280x720 420p10

Even after the update: http://i.imgur.com/Poufc8Q.png

Same error: http://i.imgur.com/vIZ1aJT.png

Maybe I did something wrong?

ghost commented 11 years ago

Since we're testing exactly the same file with (supposedly) using the same mpv version, I see two possibilities:

  1. You're not using the mpv binary you freshly build or something similar. (Stuff like this happens often!)
  2. Something is different about the default settings. Can you try with mpv -no-config -ao null output.mkv? Since this sets the null audio output, you won't hear anything, but it also includes a possible difference between our systems. You shouldn't see the decoder initialization errors.
ghost commented 11 years ago

Ping?

vallx-ny commented 11 years ago

Oh I'm sorry, I had some internet problems and couldn't respond.

So, for some reason it still does't work. So I tried mplayer2, and it works with leaves me conclusion that I did something wrong with the audio configuration. I tried the command that you asked me but I still get the same error.

~ $ mpv -no-config -ao null Detected file format: Matroska [stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac) Failed to open VDPAU backend libvdpau_r600.so: cannot open shared object file: No such file or directory [vdpau] Error when calling vdp_device_create_x11: 1 X11 error: GLXBadFBConfig [gl] Could not create GLX context! Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] ad_lavc: initial decode failed Audio decoder init failed for lavc:aac Failed to initialize an audio decoder for codec 'aac'. Audio: no audio

I can't really see what I'm doing wrong.

ghost commented 11 years ago

Sorry for having you test so much, but you can post the full output of mpv -no-config -ao null -vo null -v output.mkv?

vallx-ny commented 11 years ago

No worries, you're already helping me so much.

~/Videos $ mpv -no-config -ao null -vo null -v output.mkv mpv git-ba43d98 (C) 2000-2013 mpv/MPlayer/mplayer2 projects built on Tue Mar 19 18:08:42 BRT 2013 Compiled against libavutil version 52.18.100 Compiled against libavcodec version 54.92.100 Compiled against libavformat version 54.63.104 Compiled against libswscale version 2.2.100 Configuration: --extra-cflags=-I/home/user/Downloads/mpv-master/mpv-build/mpv-build/build_libs/include --extra-ldflags=-L/home/user/Downloads/mpv-master/mpv-build/mpv-build/build_libs/lib Command line: '-no-config' '-ao' 'null' '-vo' 'null' '-v' 'output.mkv' get_path('fonts') -> '/home/userl/.mpv/fonts' get_path('fonts') -> '/home/user/.mpv/fonts' get_path('subfont.ttf') -> '/home/user/.mpv/subfont.ttf' get_path('fonts.conf') -> '/home/user/.mpv/fonts.conf' Falling back on default (hardcoded) input config get_path('output.mkv.conf') -> '/home/user/.mpv/output.mkv.conf' Playing output.mkv. [file] File size is 5120000 bytes STREAM: [file] output.mkv STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) Trying demuxer: edl Trying demuxer: cue Trying demuxer: mkv [mkv] Found the head... [mkv] + a segment... [mkv] /---- [ parsing seek head ] --------- [mkv] |+ segment information... [mkv] | + timecode scale: 1000000 [mkv] | + duration: 1435.603s [mkv] | + segment uid aa 9f db 3d 13 fe 96 b2 be f5 55 61 6f 7a dc 59 [mkv] |+ segment tracks... [mkv] | + a track... [mkv] | + Track number: 1 [mkv] | + Track type: Video [mkv] | + Video track [mkv] | + Display width: 1280 [mkv] | + Display height: 720 [mkv] | + Pixel width: 1280 [mkv] | + Pixel height: 720 [mkv] | + Codec ID: V_MPEG4/ISO/AVC [mkv] | + CodecPrivate, length 41 [mkv] | + Default duration: 41.708ms ( = 23.976 fps) [mkv] | + a track... [mkv] | + Track number: 2 [mkv] | + Track type: Audio [mkv] | + Audio track [mkv] | + Sampling frequency: 48000.000000 [mkv] | + Channels: 2 [mkv] | + Codec ID: A_AAC [mkv] | + CodecPrivate, length 2 [mkv] | + Language: und [mkv] | + Default duration: 21.333ms ( = 46.875 fps) [mkv] SeekHead position beyond end of file - incomplete file? [mkv] ---- [ parsing seek head ] --------- [mkv] |+ found cluster, headers are parsed completely :) ==> Found video stream: 0 [mkv] Aspect: 1.777778 [mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0 ==> Found audio stream: 0 [mkv] Track ID 2: audio (A_AAC), -aid 0, -alang und [mkv] Will play video track 1. Detected file format: Matroska get_path('subfont.ttf') -> '/home/user/.mpv/subfont.ttf' get_path('fonts.conf') -> '/home/user/.mpv/fonts.conf' Load subtitles in . get_path('sub/') -> '/home/user/.mpv/sub/' [stream] Video (+) --vid=0 (h264) [stream] Audio (+) --aid=0 (*) (aac) [V] filefmt:18 fourcc:0x31637661 size:1280x720 fps:23.976 ftime:=0.0417 Codec list: lavc:h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 Opening video decoder lavc:h264 Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [lavc:h264] Codec list: lavc:aac - AAC (Advanced Audio Coding) Opening audio decoder lavc:aac dec_audio: Allocating 8192 + 65536 = 73728 bytes for output buffer. INFO: libavcodec "aac" init OK! ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ds_fill_buffer: EOF reached (stream: audio)
ad_lavc: initial decode failed Audio decoder init failed. Audio decoder init failed for lavc:aac Failed to initialize an audio decoder for codec 'aac'. Audio: no audio Starting playback... [ffmpeg] aspect_ratio: 1.777778 VIDEO: 1280x720 23.976 fps 0.0 kbps ( 0.0 kB/s) VDec: vo config request - 1280 x 720 (420p10) Trying filter chain: [vo] ??? VDec: using 420p10 as output csp VO Config (1280x720->1280x720,flags=0,0x409) VO: [null] 1280x720 => 1280x720 420p10 VO: Description: Null video output VO: Author: Aaron Holtzman aholtzma@ess.engr.uvic.ca Video filter chain: [vo] 1280x720 420p10 0 Colorspace details not fully supported by selected vo. (Paused) V: 00:00:02 / 00:23:55 (0%)

ghost commented 11 years ago

mpv git-ba43d98

That's a git revision from before the fix.

ds_fill_buffer: EOF reached (stream: audio)

Yep, exactly the problem I fixed.

Your configuration is ok, but the mpv version doesn't include the fix.

vallx-ny commented 11 years ago

I was pretty sure that I had updated it... (new with git-hub and etc)

I'm so sorry for taking so much of your time with such a silly mistake by my part. I updated it and is working perfectly now. Thanks for all the help. and sorry for my innatention.

ghost commented 11 years ago

It's ok, I'm glad you reported a bug and you had the patience to provide enough information so that I could fix it.