mpv-player / mpv

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

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

Open banshee1971 opened 2 years ago

banshee1971 commented 2 years ago

Important Information

Provide following Information:

Call : mpv udp://10.169.88.33@239.11.169.48:5000 --profile=low-latency --sub-create-cc-track=yes

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 commented 2 years ago

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

ShapeShifter499 commented 2 years ago

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

banshee1971 commented 2 years ago

Same behaviour for me too.

ShapeShifter499 commented 2 years ago

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

llyyr commented 2 years ago

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

banshee1971 commented 2 years ago

--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 

llyyr commented 2 years ago

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.

banshee1971 commented 2 years ago

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 commented 2 years ago

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)

pcercuei commented 1 year ago

Still a problem, and a very annoying one.