mpv-player / mpv

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

Strange audio playing behavior #7167

Closed snylonue closed 4 years ago

snylonue commented 4 years ago

It may not be an issue

mpv version and platform

mpv 0.30.0-153-gba370e9599 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on Sun Nov 17 08:17:28 +08 2019
ffmpeg library versions:
   libavutil       56.35.101
   libavcodec      58.62.100
   libavformat     58.35.100
   libswscale      5.6.100
   libavfilter     7.66.100
   libswresample   3.6.100
ffmpeg version: git-2019-11-17-eeab1832

Reproduction steps

open an audio file with no output device

Expected behavior

the audio plays as usual with no voice

Actual behavior

mpv exits

Log file

[cplayer] Command line options: 'D:\Files\Audio\04. color (Instrumental).flac' '-v' '--no-config'
[cplayer] mpv 0.30.0-153-gba370e9599 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
[cplayer]  built on Sun Nov 17 08:17:28 +08 2019
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.35.101
[cplayer]    libavcodec      58.62.100
[cplayer]    libavformat     58.35.100
[cplayer]    libswscale      5.6.100
[cplayer]    libavfilter     7.66.100
[cplayer]    libswresample   3.6.100
[cplayer] ffmpeg version: git-2019-11-17-eeab1832
[cplayer]
[cplayer] Configuration: /home/shinchiro/build/build64/packages/mpv-prefix/src/mpv/waf configure --enable-static-build --enable-pdf-build --disable-manpage-build --enable-libmpv-shared --enable-lua --enable-javascript --enable-libarchive --enable-libass --enable-libbluray --enable-dvdnav --enable-uchardet --enable-rubberband --enable-lcms2 --enable-openal --enable-spirv-cross --enable-vulkan --enable-vapoursynth --prefix=/home/shinchiro/build/build64/install/mingw
[cplayer] List of enabled features: asm atomics build-date cplayer cuda-hwaccel d3d-hwaccel d3d11 d3d9-hwaccel debug-build direct3d dos-paths drmprime dvdnav egl-angle egl-angle-win32 egl-helpers ffmpeg ffnvcodec gl gl-dxinterop gl-dxinterop-d3d9 gl-win32 glob glob-win32 gnuc gpl iconv javascript jpeg lcms2 libarchive libass libass-osd libav-any libavcodec libavdevice libavutil libbluray libm libmpv-shared libplacebo lua luajit mingw noexecstack openal optimize plain-gl posix-or-mingw rubberband shaderc shaderc-static spirv-cross spirv-cross-static static-build stdatomic uchardet vapoursynth vulkan wasapi win32-desktop win32-internal-pthreads win32-pipes zlib
[cplayer] Setting option 'v' = '' (flags = 8)
[cplayer] Setting option 'config' = 'no' (flags = 8)
[cplayer] Waiting for scripts...
[cplayer] Done loading scripts.
[cplayer] Running hook: ytdl_hook/on_load
[ytdl_hook] ytdl:// hook
[ytdl_hook] not a ytdl:// url
[ifo_dvdnav] Opening D:\Files\Audio\04. color (Instrumental).flac
[osd/libass] Shaper: FriBidi 1.0.7 (SIMPLE) HarfBuzz-ng 2.6.4 (COMPLEX)
[osd/libass] Setting up fonts...
[bdmv/bluray] Opening D:\Files\Audio\04. color (Instrumental).flac
[file] Opening D:\Files\Audio\04. color (Instrumental).flac
[demux] Trying demuxers for level=normal.
[lavf] Found 'flac' at score=100 size=2048.
[lavf] avformat_find_stream_info() finished after 335932 bytes.
[demux] Detected file format: flac (libavformat)
[cplayer] Opening done: D:\Files\Audio\04. color (Instrumental).flac
[osd/libass] Using font provider directwrite
[osd/libass] Done.
[find_files] Loading external files in D:\Files\Audio\
[cplayer] Running hook: ytdl_hook/on_preloaded
[lavf] select track 0
[lavf] select track 1
[cplayer]  (+) Video --vid=1 [P] (mjpeg 1423x1412)
[cplayer]  (+) Audio --aid=1 (flac 2ch 44100Hz)
[display-tags] File tags:
[display-tags]  Artist: CHiCO with HoneyWorks
[display-tags]  Album: 世界は恋に落ちている
[display-tags]  Album_Artist: CHiCO with HoneyWorks
[display-tags]  Comment: 2014.08.06
[display-tags]  Date: 2014
[display-tags]  Genre: アニメ
[display-tags]  Title: color (Instrumental)
[display-tags]  Track: 04
[vo/gpu] Probing for best GPU context.
[vo/gpu/d3d11] Initializing GPU context 'd3d11'
[vo/gpu/d3d11] Using Direct3D 11 feature level 12_1
[vo/gpu/d3d11] Device Name: NVIDIA GeForce GTX 1050
[vo/gpu/d3d11] Device ID: 10de:1c8d (rev a1)
[vo/gpu/d3d11] Subsystem ID: 103c:8217
[vo/gpu/d3d11] LUID: 00000000255fc1ae
[vo/gpu/d3d11] Initializing SPIR-V compiler 'shaderc'
[vo/gpu/d3d11] Using Direct3D 11.1 runtime
[vo/gpu/d3d11] Maximum Texture2D size: 16384x16384
[vo/gpu/d3d11] D3DCompiler version: 10.0.18362.1
[vo/gpu/d3d11] Using DXGI 1.2+
[vo/gpu/d3d11] Queried output: \\.\DISPLAY1, 1920x1080 @ 6 bits, colorspace: RGB_FULL_G22_NONE_P709 (0)
[vo/gpu/d3d11] Selected swapchain format R8G8B8A8_UNORM (28), attempting to utilize it.
[vo/gpu/d3d11] Selected swapchain color space RGB_FULL_G22_NONE_P709 (0), attempting to utilize it.
[vo/gpu/d3d11] Swapchain capabilities for color space RGB_FULL_G22_NONE_P709 (0): normal: yes, overlay: no
[vo/gpu/d3d11] Swapchain successfully configured to color space RGB_FULL_G22_NONE_P709 (0)!
[vo/gpu/d3d11] Using flip-model presentation
[vo/gpu] Testing FBO format rgba16hf
[vo/gpu] Using FBO format rgba16hf.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu/win32] DPI detected from the new API: 120
[vo/gpu/win32] display-fps: 60.007852
[vo/gpu/win32] color-profile: C:\WINDOWS\system32\spool\drivers\color\CalibratedDisplayProfile-1.icc
[vo/gpu] Assuming 60.007852 FPS for display sync.
[vd] Container reported FPS: 0.000000
[vd] Codec list:
[vd]     mjpeg - MJPEG (Motion JPEG)
[vd]     mjpeg_cuvid (mjpeg) - Nvidia CUVID MJPEG decoder
[vd]     mjpeg_qsv (mjpeg) - MJPEG video (Intel Quick Sync Video acceleration)
[vd] Opening decoder mjpeg
[vd] No hardware decoding requested.
[vd] Using software decoding.
[vd] Detected 4 logical cores.
[vd] Requesting 5 threads for decoding.
[vd] Selected codec: mjpeg (MJPEG (Motion JPEG))
[vf] User filter list:
[vf]   (empty)
[ad] Codec list:
[ad]     flac - FLAC (Free Lossless Audio Codec)
[ad] Opening decoder flac
[ad] Requesting 1 threads for decoding.
[ad] Selected codec: flac (FLAC (Free Lossless Audio Codec))
[af] User filter list:
[af]   (empty)
[cplayer] Displaying attached picture. Use --no-audio-display to prevent this.
[cplayer] Starting playback...
[vd] DR failed - disabling.
[vf] [in] 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[vf] [userdeint] 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[vf] [userdeint] (disabled)
[vf] [autorotate] 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[vf] [autorotate] (disabled)
[vf] [convert] 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[vf] [convert] (disabled)
[vf] [out] 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[af] [in] 44100Hz stereo 2ch s16
[af] [userspeed] 44100Hz stereo 2ch s16
[af] [userspeed] (disabled)
[af] [convert] 44100Hz stereo 2ch s16
[ao] Trying audio driver 'wasapi'
[ao/wasapi] requested format: 44100 Hz, stereo channels, s16
[ao/wasapi] There are no playback devices available
[ao] Trying audio driver 'openal'
[ao/openal] requested format: 44100 Hz, stereo channels, s16
AL lib: (WW) Failed to open playback device: Device init failed: 0x80070490
AL lib: (WW) Error generated on device 0000000000000000, code 0xa004
[ao/openal] could not open device
[ao] Failed to initialize audio driver 'openal'
[cplayer] Could not open/initialize audio device -> no sound.
[lavf] deselect track 0
[cplayer] Audio: no audio
[vf] filter input EOF
[vf] filter output EOF
[cplayer] VO: [gpu] 1423x1412 => 1423x1412 yuv444p
[cplayer] VO: Description: Shader-based GPU Renderer
[vo/gpu] reconfig to 1423x1412 [0:1] yuv444p bt.601/auto/auto/full/auto CL=mpeg1/jpeg
[vo/gpu/win32] reset window bounds: 248:-166:1423:1412
[vo/gpu/win32] adjusted window bounds: 439:24:1041:1033
[vo/gpu/win32] resize window: 1041:1033
[vo/gpu] Resize: 1423x1412
[vo/gpu] Window size: 1423x1412 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1423x1412 (0:1)
[vo/gpu] Video display: (0, 0) 1423x1412 -> (0, 0) 1423x1412
[vo/gpu] Video scale: 1.000000/1.000000
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu] Texture for plane 0: 1423x1412
[vo/gpu] Texture for plane 1: 1423x1412
[vo/gpu] Texture for plane 2: 1423x1412
[vo/gpu] Testing FBO format rgba16hf
[vo/gpu] Using FBO format rgba16hf.
[vo/gpu] No advanced processing required. Enabling dumb mode.
[vo/gpu] Resize: 1041x1033
[vo/gpu] Window size: 1041x1033 (Borders: l=0 t=0 r=0 b=0)
[vo/gpu] Video source: 1423x1412 (0:1)
[vo/gpu] Video display: (0, 0) 1423x1412 -> (0, 0) 1041x1033
[vo/gpu] Video scale: 0.731553/0.731586
[vo/gpu] OSD borders: l=0 t=0 r=0 b=0
[vo/gpu] Video borders: l=0 t=0 r=0 b=0
[vo/gpu] Reported display depth: 8
[vo/gpu/d3d11] shaderc compile status 'success' (0 errors, 0 warnings)
[vo/gpu/d3d11] Compiled a vertex shader in 413180us
[vo/gpu/d3d11] shaderc: 363764us, SPIRV-Cross: 46150us, D3DCompile: 3266us
[vo/gpu/d3d11] shaderc compile status 'success' (0 errors, 0 warnings)
[vo/gpu/d3d11] Compiled a fragment shader in 14851us
[vo/gpu/d3d11] shaderc: 7833us, SPIRV-Cross: 1137us, D3DCompile: 5881us
[osd/libass] fontselect: (sans-serif, 400, 0) -> ArialMT, 0, ArialMT
[cplayer] first video frame after restart shown
[cplayer] playback restart complete @ -9223372036854775808.000000
[statusline] V: 00:00:00 / 00:03:58 (0%)
[cplayer] EOF code: 1
[cplayer] finished playback, audio output initialization failed (reason 4)
[cplayer]
[cplayer]
[cplayer] Exiting... (Interrupted by error)
[vo/gpu/win32] uninit
CounterPillow commented 4 years ago

Please post a full log generated with --log-file, the one you posted doesn't show mpv exiting.

ghost commented 4 years ago

How would audio play if there's no output device?

CounterPillow commented 4 years ago

@wm4 I don't think he's expecting audio to play. He wants the video track to be shown, i.e. the cover art picture, for the duration of the audio track.

ghost commented 4 years ago

Without audio, coverart is going to be interpreted as an image, and --image-display-duration will determine how long to show it (at least on git master). No way around it.

snylonue commented 4 years ago

So mpv will exit when there's no output device? Pasue might be a better choice