mpv icon indicating copy to clipboard operation
mpv copied to clipboard

Profile "low-latency" don't play the audio track

Open banshee1971 opened this issue 2 years ago • 9 comments

Important Information

Provide following Information:

  • mpv version : mpv-x86_64-20220710-git-0044c19
  • Windows Version : 10 20H2
  • If known which version of mpv introduced the problem. Suspect it happen after a security Windows update.
  • Possible screenshot or video of visual glitches

Call : mpv udp://[email protected]:5000 --profile=low-latency --sub-create-cc-track=yes

  • Only Video and EAI608 track appear

If i call without "--profile=low-latency". Audio track re-appear again !

VLC works just fine (but not "as fast" as MPV, in therm of delay".

banshee1971 avatar Jul 19 '22 14:07 banshee1971

See those message when start from CLI (+) Video --vid=1 (hevc) (+) Subs --sid=1 (*) (eia_608) [ffmpeg] NULL: PPS id out of range: 0 [ffmpeg] NULL: PPS id out of range: 0 [ffmpeg/video] hevc: PPS id out of range: 0 [ffmpeg/video] hevc: Error parsing NAL unit #3. Error while decoding frame! [ffmpeg] NULL: PPS id out of range: 0 [ffmpeg/video] hevc: PPS id out of range: 0 [ffmpeg/video] hevc: Error parsing NAL unit #3. Error while decoding frame! [ffmpeg] NULL: PPS id out of range: 0 [ffmpeg/video] hevc: PPS id out of range: 0 [ffmpeg/video] hevc: Error parsing NAL unit #3. Error while decoding frame! [ffmpeg] NULL: PPS id out of range: 0 [ffmpeg/video] hevc: PPS id out of range: 0 [ffmpeg/video] hevc: Error parsing NAL unit #3. Error while decoding frame! VO: [gpu] 1280x720 yuv420p V: 10:26:05 / 10:26:05 (100%) Cache: 0.1s/5KB

banshee1971 avatar Jul 19 '22 14:07 banshee1971

I'm seeing this same exact issue on a new install of Ubuntu 22.04. I was attempting to use a old laptop for a hacky temporary display with one of those cheap generic USB 2.0 HDMI capture cards that have been on the market.

I can get the capture card working at 60fps 1280x720 in obs and use the full screen option. But it seems clunky to use obs when I don't plan to stream anything.

mpv seems to playback the capture card input just fine with "--profile=low-latency" but it doesn't pull the audio I specify.

mpv av://v4l2:/dev/video2 --audio-file=av://pulse:alsa_input.usb-MACROSILICON_2109-02.analog-stereo --demuxer-lavf-o-add=input_format=mjpeg --untimed --profile=low-latency

This command fails to play audio until I omit "--profile=low-latency". But without low-latency the playback becomes slow and choppy.

System Ubuntu 22.04 Gnome 42.2 Wayland/Mutter

mpv 0.34.1

ShapeShifter499 avatar Jul 20 '22 12:07 ShapeShifter499

Same behaviour for me too.

banshee1971 avatar Jul 20 '22 22:07 banshee1971

The tag should be changed since this appears to affect both Windows and Linux builds

ShapeShifter499 avatar Jul 25 '22 09:07 ShapeShifter499

do mpv --show-profile=low-latency and figure out which option causes issues.

llyyr avatar Jul 25 '22 11:07 llyyr

--audio-buffer=0 --vd-lavc-threads=1 --cache-pause=no  *** audio start *** but also force the player to start caching (got 1.2 sec buffer at begening) --demuxer-lavf-o-add=fflags=+nobuffer --demuxer-lavf-probe-info=nostreams   *** audio start *** --demuxer-lavf-analyzeduration=0.1 --video-sync=audio  --interpolation=no  --video-latency-hacks=yes --stream-buffer-size=4k 

banshee1971 avatar Jul 26 '22 14:07 banshee1971

Looking at the manual, it doesn't seem to do anything besides avoiding an avformat_find_stream_info() call. It's probably fine to just set it back to default after applying profile=low-latency.

mpv --profile=low-latency --demuxer-lavf-probe-info=auto

Maybe you could try using a different audio/container format or protocol if you have control over the stream you're trying to watch.

llyyr avatar Jul 26 '22 14:07 llyyr

In our case, hard to acheive, as we are using a physical "broadcast" encoder (Haivison Makito X4), where we have not a hudge variety of Codec here. But this card is a low-latency streamer. Typical delay mesured with VLC was approx 230 ms between the input of the card, and the computerscreen of the user

banshee1971 avatar Jul 26 '22 17:07 banshee1971

Also noticed that if my stream only contain "black" video sources... MPV can't open it (i notice network activity... same bandwith as the stream ... but MPV can'T open it in low-latency profile). VLC no issue to open it (but the version i'm using doesn't contain any agressive low-latency profile)

banshee1971 avatar Jul 26 '22 18:07 banshee1971

Still a problem, and a very annoying one.

pcercuei avatar Jul 22 '23 20:07 pcercuei