0

original question for reference

using vlc -I qt a.mp4 '#http{mux=ffmpeg{mux=mp4},dst=:8080/stream}' --sout-all --sout-keep the video is playing locally fine with both audio and video but I got some error messages:

[00007f01f0004960] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[00007f01f0004960] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f01f0004960] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f01f0004960] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[00007f01f0004960] gl gl: Initialized libplacebo v4.192.1 (API v192)
[00007f022584cdd0] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  520.61.05  Thu Sep 29 05:28:13 UTC 2022 for hardware decoding
[hevc @ 0x7f0225860680] Failed setup for format vdpau: hwaccel initialisation returned error.
[00007f022584cdd0] avcodec decoder error: existing hardware acceleration cannot be reused
[00007f01f0004960] gl gl: Initialized libplacebo v4.192.1 (API v192)
[00007f01f0004960] gl gl: Initialized libplacebo v4.192.1 (API v192)

The file is not looking like it is being streamed as nmap 192.168.1.x -p 8080 also confirms:

PORT     STATE  SERVICE
8080/tcp closed http-proxy

Using Ubuntu 22.04 and GTX970. Have installed CUDA already.

On the client side if I enter http://192.168.1.x:8080/stream I get "multiple media cannot be played" error.


edit following Tonny recommandation I installed drivers update sudo ubuntu-drivers autoinstall

But still get:

[00007f5ef8004960] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: va_openDriver() returns -1
[00007f5ef8004960] glconv_vaapi_x11 gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f5ef8004960] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
libva info: VA-API version 1.14.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[00007f5ef8004960] glconv_vaapi_drm gl error: vaInitialize: unknown libva error
[00007f5ef8004960] gl gl: Initialized libplacebo v4.192.1 (API v192)
[00007f5f24ce6000] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  515.65.01  Wed Jul 20 13:42:26 UTC 2022 for hardware decoding

edit2: after switching from automatic to VDPAU video decoder in VLC Input Codec settings -> Hardware-accelerated decoding all the error messages are gone but still the original problem remains


edit 3: Once the file stop playing I get the following error:

Your input can't be opened:
VLC is unable to open the MRL 'file:///home/my/path/%23http%7Bmux%3Dffmpeg%7Bmux%3Dmp4%7D%2Cdst%3D%3A8080/stream%7D'.

1 Answers1

0

Ok first of all thanks to everyone for the help. Each milestone got me closer to the goal!

I figured out that the main problem was coming from the video itself, it had to be made streamable first of all for http streaming (Creating MP4 videos ready for HTTP streaming)!

ffmpeg -i a.mp4 -c:v libx264 -crf 23 -c:a aac -movflags faststart b.mp4

Then the command that got it working was:

vlc -I qt b.mp4 :sout="#http{mux=ffmpeg{mux=flv},dst=:8080}" :sout-all :sout-keep

in the client:

http://192.168.1.x:8080

Still have a little problem where the video is black in the first 3 seconds while I'm already getting the audio, need to figure out the caching part!