dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

VLC testing

Thu Nov 21, 2019 2:37 pm

We have an updated version of VLC which improves performance for video decode, including HEVC 4K video playback on Pi4.
It is currently in the untested raspberry pi repo, and should be considered beta.

If you would like to try it, edit /etc/apt/sources.list.d/raspi.list and add 'untested' to the line 'deb' line so that it looks like this:

Code: Select all

deb http://archive.raspberrypi.org/debian/ buster main ui untested
If you don't have "ui" in there, that's okay.

Then update and upgrade as usual:

Code: Select all

sudo apt update
sudo apt dist-upgrade
Known issues / features:

If the decoder runs out of memory for any reason it reports an error and vlc, after receiving that error, stops using the decoder - this manifests as a black or frozen pici whilst audio continues. If you stop (not pause) the video then the decoder will be killed and we can try again.

Closing VLC by Alt-F4 or directly closing the window whilst video is playing doesn't always shut life down correctly and you end up with a still active (deadlocked) VLC with no window. Stopping the video first or exiting with Ctrl-Q seems to die properly reliably.

If you want 4k on a Pi4 then I'd recommend 512M CMA (Add cma=512M to /boot/cmdline.txt).
If you are on a 1G Pi4 then 384M is probably your best bet but that can run out of memory under X for hardware 4K videos. You will probably get away with it without X.

GPU mem is best left at default (unset) on Pi4.
4k playback in a window is choppy. Switching to fullscreen should play much better (F key).
Launching from command line in fullscreen mode should also be fine (that can be run outside of X too).

For Pi 3, 128M GPU memory is recommended (set gpu_mem=128 in config.txt) for non-HEVC playback.
256M GPU if you want to play any HEVC. This is software decode with GPU acceleration. Most 1080p videos should play.

If you want a more omxplayer like interface to the command line vlc, then:

Code: Select all

vlc -I ncurses <filename>
allows things like seeking with cursor keys. See VLC ncurses interface

[edit]
Pi2/Pi3 with fkms won't work with hevc files. The acceleration uses the QPUs (part of 3D hardware) which the ARM is in control of in fkms mode.
Disable fkms if you need hevc decode.

Lipown
Posts: 86
Joined: Sun Oct 13, 2019 8:32 am

Re: VLC testing

Thu Nov 21, 2019 3:03 pm

Does it now supports both HDMI on Rpi4?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25423
Joined: Sat Jul 30, 2011 7:41 pm

Re: VLC testing

Thu Nov 21, 2019 3:30 pm

Lipown wrote:
Thu Nov 21, 2019 3:03 pm
Does it now supports both HDMI on Rpi4?
Do you mean playback on both HDMI displays at the same time?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Thu Nov 21, 2019 4:30 pm

Lipown wrote:
Thu Nov 21, 2019 3:03 pm
Does it now supports both HDMI on Rpi4?
On the command-line --mmal-display=hdmi-1 or hdmi-2
In preferences/video/fullscreen video device should give hdmi-1/hdmi-2 as options

Lipown
Posts: 86
Joined: Sun Oct 13, 2019 8:32 am

Re: VLC testing

Thu Nov 21, 2019 4:51 pm

Edit: I needed to install beta to make it work however I not see controls neither the right click menu in fullscreen now. Any solution please?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Thu Nov 21, 2019 5:29 pm

Lipown wrote:
Thu Nov 21, 2019 4:51 pm
Edit: I needed to install beta to make it work however I not see controls neither the right click menu in fullscreen now. Any solution please?
GUI controls aren't available in full screen mode. Either use keyboard shortcuts (e.g. arrow keys for volume/seek), or toggle back to windowed ('F' key)

Lipown
Posts: 86
Joined: Sun Oct 13, 2019 8:32 am

Re: VLC testing

Thu Nov 21, 2019 6:12 pm

No problem, thank you guys! The fullscreen on second hdmi solved many of my problems.

dickon
Posts: 821
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: VLC testing

Thu Nov 21, 2019 10:39 pm

Hmm. Can't get it to work.

With

Code: Select all

dtoverlay=vc4-fkms-v3d
I get

Code: Select all

[018e5810] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[018e9520] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[018e9520] main interface error: no suitable interface module
[01868c50] main libvlc error: interface "dbus,none" initialization failed
[018ffca8] main interface error: no suitable interface module
[01868c50] main libvlc error: interface "globalhotkeys,none" initialization failed
[01868c50] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
error: XDG_RUNTIME_DIR not set in the environment.
[018ffca8] skins2 interface error: cannot initialize OSFactory
[018ffca8] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.8 Vetinari
Command Line Interface initialized. Type `help' for help.
> [f4608ea8] mkv demux error: cannot load some cues/chapters/tags etc. (broken seekhead or file)
[f4608ea8] mkv demux error: cannot load some cues/chapters/tags etc. (broken seekhead or file)
[f2ebb680] mmal_avcodec decoder: Looking for HEVC decoder 'hevc'
[018e5810] main audio output error: too low audio sample frequency (0)
[f2e0b8c8] main decoder error: failed to create audio output
[f2e0bef0] mlp packetizer: MLP channels: 8 samplerate: 48000
[018e5810] main audio output error: module not functional
[f2e0b8c8] main decoder error: failed to create audio output
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf4613880] Failed to allocate output frame
[hevc @ 0xf4613880] hardware accelerator failed to decode picture
[f2ebb680] mmal_avcodec decoder error: avcodec_send_packet critical error
[f2ebb680] main decoder error: buffer deadlock prevented
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf46e3700] Failed to allocate output frame
[hevc @ 0xf46e3700] hardware accelerator failed to decode picture
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf2e00e30] Failed to allocate output frame
[hevc @ 0xf2e00e30] hardware accelerator failed to decode picture
and audio, but no video. Not even a flicker of the screen, which seems unusual. Without that, I get:

Code: Select all

[011f5808] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[0120fd48] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0120fd48] main interface error: no suitable interface module
[01178c50] main libvlc error: interface "dbus,none" initialization failed
[011f67d0] main interface error: no suitable interface module
[01178c50] main libvlc error: interface "globalhotkeys,none" initialization failed
[01178c50] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
error: XDG_RUNTIME_DIR not set in the environment.
[011f67d0] skins2 interface error: cannot initialize OSFactory
[011f67d0] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.8 Vetinari
Command Line Interface initialized. Type `help' for help.
> [011f5808] main audio output error: too low audio sample frequency (0)
[a790afe8] main decoder error: failed to create audio output
[011f5808] main audio output error: Can't convert non linear input
[a69033d8] main audio filter error: cannot add user audio filter "scaletempo" (skipped)
[011f5808] main audio output error: Can't convert non linear input
[011f5808] main audio output error: cannot setup filtering pipeline
[a790afe8] main decoder error: failed to create audio output
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[011e79e0] gles2 generic error: parent window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[011e79e0] xcb generic error: window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[012101e8] mmal_xsplitter vout display: No valid output found for vout (VAO0/VAO0)
[012101e8] gl vout display error: parent window not available
[012101e8] gles2 vout display error: parent window not available
[012101e8] xcb vout display error: window not available
[012101e8] fb vout display error: cannot get terminal mode (Inappropriate ioctl for device)
[012589e8] gles2 generic error: parent window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[01257a60] xcb generic error: window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[012101e8] mmal_xsplitter vout display: No valid output found for vout (I0AL/I0AL)
Segmentation fault
[email protected]:~$ 
which is even less useful.

Ideas?

This is on 4.19.84-v7l+ and 4.19.84-v8+, no X (no X installed), sshed in on console, and with a seriously nasty permissions bodge -- chmod -R a+rwX /dev -- to get a normal user enough permissions to talk to at least bits of the hardware.

One oddity:

Code: Select all

[email protected]:/lib/modules/4.19.84-v8+# cat /proc/cmdline 
coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M video=HDMI-A-1:[email protected],margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:03:0F:D3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs elevator=deadline rootwait rw nfsroot=172.29.23.1:/var/local/nfsroot/telly-buster ip=dhcp consoleblank=0 net.ifnames=0 cma=512M
[email protected]:/lib/modules/4.19.84-v8+# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs elevator=deadline rootwait rw nfsroot=172.29.23.1:/var/local/nfsroot/telly-buster ip=dhcp consoleblank=0 net.ifnames=0 cma=512M
[email protected]:/lib/modules/4.19.84-v8+# 
I don't know where those two extra, spurious cma= parameters are coming from.

Ta.

Lipown
Posts: 86
Joined: Sun Oct 13, 2019 8:32 am

Re: VLC testing

Fri Nov 22, 2019 7:54 am

dickon wrote:
Thu Nov 21, 2019 10:39 pm
Hmm. Can't get it to work.

With

Code: Select all

dtoverlay=vc4-fkms-v3d
I get

Code: Select all

[018e5810] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[018e9520] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[018e9520] main interface error: no suitable interface module
[01868c50] main libvlc error: interface "dbus,none" initialization failed
[018ffca8] main interface error: no suitable interface module
[01868c50] main libvlc error: interface "globalhotkeys,none" initialization failed
[01868c50] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
error: XDG_RUNTIME_DIR not set in the environment.
[018ffca8] skins2 interface error: cannot initialize OSFactory
[018ffca8] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.8 Vetinari
Command Line Interface initialized. Type `help' for help.
> [f4608ea8] mkv demux error: cannot load some cues/chapters/tags etc. (broken seekhead or file)
[f4608ea8] mkv demux error: cannot load some cues/chapters/tags etc. (broken seekhead or file)
[f2ebb680] mmal_avcodec decoder: Looking for HEVC decoder 'hevc'
[018e5810] main audio output error: too low audio sample frequency (0)
[f2e0b8c8] main decoder error: failed to create audio output
[f2e0bef0] mlp packetizer: MLP channels: 8 samplerate: 48000
[018e5810] main audio output error: module not functional
[f2e0b8c8] main decoder error: failed to create audio output
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf4613880] Failed to allocate output frame
[hevc @ 0xf4613880] hardware accelerator failed to decode picture
[f2ebb680] mmal_avcodec decoder error: avcodec_send_packet critical error
[f2ebb680] main decoder error: buffer deadlock prevented
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf46e3700] Failed to allocate output frame
[hevc @ 0xf46e3700] hardware accelerator failed to decode picture
[f2ebb680] mmal_avcodec decoder error: CMA buf pool alloc buf failed
rpi_get_display_buffer: Failed to get buffer from pool
[hevc @ 0xf2e00e30] Failed to allocate output frame
[hevc @ 0xf2e00e30] hardware accelerator failed to decode picture
and audio, but no video. Not even a flicker of the screen, which seems unusual. Without that, I get:

Code: Select all

[011f5808] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[0120fd48] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[0120fd48] main interface error: no suitable interface module
[01178c50] main libvlc error: interface "dbus,none" initialization failed
[011f67d0] main interface error: no suitable interface module
[01178c50] main libvlc error: interface "globalhotkeys,none" initialization failed
[01178c50] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
error: XDG_RUNTIME_DIR not set in the environment.
[011f67d0] skins2 interface error: cannot initialize OSFactory
[011f67d0] [cli] lua interface: Listening on host "*console".
VLC media player 3.0.8 Vetinari
Command Line Interface initialized. Type `help' for help.
> [011f5808] main audio output error: too low audio sample frequency (0)
[a790afe8] main decoder error: failed to create audio output
[011f5808] main audio output error: Can't convert non linear input
[a69033d8] main audio filter error: cannot add user audio filter "scaletempo" (skipped)
[011f5808] main audio output error: Can't convert non linear input
[011f5808] main audio output error: cannot setup filtering pipeline
[a790afe8] main decoder error: failed to create audio output
error: XDG_RUNTIME_DIR not set in the environment.
error: XDG_RUNTIME_DIR not set in the environment.
[011e79e0] gles2 generic error: parent window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[011e79e0] xcb generic error: window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[012101e8] mmal_xsplitter vout display: No valid output found for vout (VAO0/VAO0)
[012101e8] gl vout display error: parent window not available
[012101e8] gles2 vout display error: parent window not available
[012101e8] xcb vout display error: window not available
[012101e8] fb vout display error: cannot get terminal mode (Inappropriate ioctl for device)
[012589e8] gles2 generic error: parent window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:opengles2 module
[01257a60] xcb generic error: window not available
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:xcb_x11 module
[012101e8] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[012101e8] mmal_xsplitter vout display: No valid output found for vout (I0AL/I0AL)
Segmentation fault
[email protected]:~$ 
which is even less useful.

Ideas?

This is on 4.19.84-v7l+ and 4.19.84-v8+, no X (no X installed), sshed in on console, and with a seriously nasty permissions bodge -- chmod -R a+rwX /dev -- to get a normal user enough permissions to talk to at least bits of the hardware.

One oddity:

Code: Select all

[email protected]:/lib/modules/4.19.84-v8+# cat /proc/cmdline 
coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M video=HDMI-A-1:[email protected],margin_left=48,margin_right=48,margin_top=48,margin_bottom=48 smsc95xx.macaddr=DC:A6:32:03:0F:D3 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs elevator=deadline rootwait rw nfsroot=172.29.23.1:/var/local/nfsroot/telly-buster ip=dhcp consoleblank=0 net.ifnames=0 cma=512M
[email protected]:/lib/modules/4.19.84-v8+# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=tty1 root=/dev/nfs elevator=deadline rootwait rw nfsroot=172.29.23.1:/var/local/nfsroot/telly-buster ip=dhcp consoleblank=0 net.ifnames=0 cma=512M
[email protected]:/lib/modules/4.19.84-v8+# 
I don't know where those two extra, spurious cma= parameters are coming from.

Ta.
Happened same to me. So i got to the options, video tab and check the enable video box :)

dickon
Posts: 821
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: VLC testing

Fri Nov 22, 2019 10:59 am

Difficult when you have no UI...

Trying 'f' (for 'fullscreen') errors with

Code: Select all

Error in `fullscreen' lua/modules/common.lua:16: VLC lua error in file lua/libs/video.c line 57 (function vlclua_fullscreen)
which also isn't helpful. Changing video track has no effect.

And, TBH, I wouldn't expect it to. I suspect the first 'cma=64M' parameter is being used, which is making the memory allocation fail. Unfortunately, I don't know where that's being set -- certainly not in my cmdline.txt -- and I don't know which module or what parameter that corresponds to to overrule it in /etc/modules

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Fri Nov 22, 2019 12:15 pm

dickon wrote:
Fri Nov 22, 2019 10:59 am
And, TBH, I wouldn't expect it to. I suspect the first 'cma=64M' parameter is being used, which is making the memory allocation fail. Unfortunately, I don't know where that's being set -- certainly not in my cmdline.txt -- and I don't know which module or what parameter that corresponds to to overrule it in /etc/modules
No - the last entry on cmdline will be used. The earlier cma entries come from device tree (the fkms one adds the 256M and I think the board one the 64M), but they are deliberately ordered so the cmdline.txt one appears last and has priority.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Fri Nov 22, 2019 2:55 pm

dickon wrote:
Thu Nov 21, 2019 10:39 pm
Hmm. Can't get it to work.

Ideas?

This is on 4.19.84-v7l+ and 4.19.84-v8+, no X (no X installed), sshed in on console, and with a seriously nasty permissions bodge -- chmod -R a+rwX /dev -- to get a normal user enough permissions to talk to at least bits of the hardware.
I've just checked and vlc does work on raspbian lite.
There is a strange behaviour where h264 works directly, but mpeg2 fails with a seg fault after trying to use non-existing hw decoders (e.g. VPDAU).
It looks like setting DISPLAY=:0 avoids this (as does running from GUI). e.g.

Code: Select all

DISPLAY=:0 vlc <filename>
We'll try building with --disable-vdpau (and others) on a future build.

andrum99
Posts: 1067
Joined: Fri Jul 20, 2012 2:41 pm

Re: VLC testing

Fri Nov 22, 2019 4:14 pm

Hi @dom. Can you confirm that the HEVC decoder on Pi 4B is software? I believe it is running part on the GPU side, part on the ARMs - is that right?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Fri Nov 22, 2019 4:20 pm

andrum99 wrote:
Fri Nov 22, 2019 4:14 pm
Hi @dom. Can you confirm that the HEVC decoder on Pi 4B is software? I believe it is running part on the GPU side, part on the ARMs - is that right?
No, it is fully hardware on Pi4. Pi2/3 uses a mixture of software and GPU acceleration.

andrum99
Posts: 1067
Joined: Fri Jul 20, 2012 2:41 pm

Re: VLC testing

Fri Nov 22, 2019 10:52 pm

dom wrote:
Fri Nov 22, 2019 4:20 pm
andrum99 wrote:
Fri Nov 22, 2019 4:14 pm
Hi @dom. Can you confirm that the HEVC decoder on Pi 4B is software? I believe it is running part on the GPU side, part on the ARMs - is that right?
No, it is fully hardware on Pi4. Pi2/3 uses a mixture of software and GPU acceleration.
Ah, that's interesting. So was the "argon" I saw referenced (now called rpivid) the implementation on Pi 2/3? Presumably the Pi 2/3 solution uses the VPU for the acceleration?

RossDv8
Posts: 244
Joined: Thu Jan 21, 2016 12:35 pm

Re: VLC testing

Sat Nov 23, 2019 12:00 am

I just installed it after adding the source and doing the update/dist-upgrade.
Tried https://www.youtube.com/watch?v=d6a3uRVE7gE on a 100mbps network that delivers 85-95mbps, but used Pi 4 WiFi on 5GHz, so only getting around 60mbps.

After choosing 2160 in YouTube settings, the video either in a window or full screen turned blocky, then alternated moving a few frames in great res, and freezing. My guess is YouTube Streaming and buffering. as it plays great at 1080p
So I downloaded the file in 3840x2160 2160p (508MB for about 4 minutes of video).

VLC won;t play that either, possibly because it is in webm format. It alternats between dark screen, single frames of really sharp images, and brief moments of moving 'blocks'.

I'm heading out for a while, but will see if I can find another way to get a 4k video in another format. Or if I can find a long enough network cable and try streaming it at 90mbps..
Remember, nobody is listening to you
until you fart ...

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8091
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: VLC testing

Sat Nov 23, 2019 9:24 am

andrum99 wrote:
Fri Nov 22, 2019 10:52 pm
Ah, that's interesting. So was the "argon" I saw referenced (now called rpivid) the implementation on Pi 2/3? Presumably the Pi 2/3 solution uses the VPU for the acceleration?
Argon/rpivid is the Pi4 hardware acceleration.
The Pi2/3 solution uses a mixture of NEON, VPU, and QPU code to decode the video. VPU and QPU operations are dispatched via the mailbox interface for the firmware to execute.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

andrum99
Posts: 1067
Joined: Fri Jul 20, 2012 2:41 pm

Re: VLC testing

Sat Nov 23, 2019 3:38 pm

6by9 wrote:
Sat Nov 23, 2019 9:24 am
andrum99 wrote:
Fri Nov 22, 2019 10:52 pm
Ah, that's interesting. So was the "argon" I saw referenced (now called rpivid) the implementation on Pi 2/3? Presumably the Pi 2/3 solution uses the VPU for the acceleration?
Argon/rpivid is the Pi4 hardware acceleration.
The Pi2/3 solution uses a mixture of NEON, VPU, and QPU code to decode the video. VPU and QPU operations are dispatched via the mailbox interface for the firmware to execute.
Thanks - these are all interesting details. I saw someone mention that argon/rpivid was developed by Raspberry Pi - is that right? Would that be using RISC-V stuff?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Sun Nov 24, 2019 6:29 pm

andrum99 wrote:
Sat Nov 23, 2019 3:38 pm
Thanks - these are all interesting details. I saw someone mention that argon/rpivid was developed by Raspberry Pi - is that right? Would that be using RISC-V stuff?
The hevc codec is hardware controlled by the main arm cores. No RISC-V.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Sun Nov 24, 2019 6:37 pm

RossDv8 wrote:
Sat Nov 23, 2019 12:00 am
I just installed it after adding the source and doing the update/dist-upgrade.
Tried https://www.youtube.com/watch?v=d6a3uRVE7gE on a 100mbps network that delivers 85-95mbps, but used Pi 4 WiFi on 5GHz, so only getting around 60mbps.
This thread is about VLC - playing youtube videos through chromium won't use VLC.
Using youtube-dl on that URL produces a VP9 file - so won't benefit from the hevc hardware decode.

If you just want a sample 4k hevc file for testing, then:
http://downloads.4ksamples.com/videos/s ... .2160p.mkv

RossDv8
Posts: 244
Joined: Thu Jan 21, 2016 12:35 pm

Re: VLC testing

Mon Nov 25, 2019 3:13 am

This thread is about VLC - playing youtube videos through chromium won't use VLC.
Interesting. I don't understand the reply? Playing youyube videos through chromium definitely IS using VLC. I've posted a screen shot of it doing just that below.

I open chromium using the youtube-dl server. chromium opens VLC and plays the video in VLC. so the 'chromium won;t use VLC part of the reply is wrong.

Does VLC just avoid using the Pi 4 hardware when playing in chromium

Excuse the furry image, I could not remember size limits for images. This is Chromium, open at a youtube page, the video paused, and redirected via chromium to VLC, where it is playing.
So, chromium as I understand it is using youtube-dl to extract and stream the file from youtube to VLC in a similarway you can play a video stream in VLC by cutting and pasting it, but vastly reduces the buffering.

Which is why I thought playing a video using VLC would be part of 'VLC testing. The first post said 'including 4k playback'. it didn;t say excluding other resolutions.

It seems you are saying that while VLC uses hardware to watch an mp4 that is on a drive, it cannot use hardware to watch a video online.

Which means if I copy the url of a video and paste it into VLC (using CTRL-n) to stream it - VLC cannot play it using the Pi hardware.
That is a pity.
But I guess it is just a limitation of VLC and the Pi hardware. :D
screen.png
screen.png (113.96 KiB) Viewed 5351 times
I should add though, that since the most recent updates to my Pi 4, and I don;t know if there were updates to VLC, because I automate them, the youtube '4k Demo' video in the image above https://www.youtube.com/watch?v=sUd4PTIzm6s, playing inChromium using VLC, is 'spectacular' on a 55 inch UHD TV, even allowing for VLC not being able to use hardware decoding, and it plays just as well at full screen.
That is with the Youtube 'Settings' adjusted to use 2160p.

Where previously it was blocky and jerky, at the moment it is incredibly sharp and smooooth.
4k01.png
4k01.png (210.29 KiB) Viewed 5348 times
Remember, nobody is listening to you
until you fart ...

gkreidl
Posts: 6222
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: VLC testing

Mon Nov 25, 2019 10:27 am

@RossDv8: the youtube-dl-server by default uses the "-f best" option of youtube-dl. This means "Give me the best resolution for which video and audio are sent in one stream" For youtube this results in a 720p resolution (for all higher resolutions youtube sends separate video and audio streams, which omxplayer cannot handle).
The Youtube video extractor built into VLC seems to do the same: if you paste the URL into VLC, play it and open the codec information you will see that it is using the 720p resolution and a H264 codec version.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25423
Joined: Sat Jul 30, 2011 7:41 pm

Re: VLC testing

Mon Nov 25, 2019 10:39 am

RossDv8 wrote:
Mon Nov 25, 2019 3:13 am
This thread is about VLC - playing youtube videos through chromium won't use VLC.
Interesting. I don't understand the reply? Playing youyube videos through chromium definitely IS using VLC. I've posted a screen shot of it doing just that below.

I open chromium using the youtube-dl server. chromium opens VLC and plays the video in VLC. so the 'chromium won;t use VLC part of the reply is wrong.

Does VLC just avoid using the Pi 4 hardware when playing in chromium
So, two things being conflated here. In normal usage, Chromium/Chrome plays videos inside the Chromium window iself. This does not use VLC. In your case, it appears that Chromium is running up VLC as a separate application to play the video, rather than playing in its own window. Something like copy the video URL in YouTube, then `Open network stream` option in VLC Media menu gives the same result.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

noee
Posts: 11
Joined: Thu Nov 21, 2019 5:30 pm

Re: VLC testing

Mon Nov 25, 2019 3:29 pm

Testing with 8bit and 10b hevc both 1080p and 2160p. Basically, I've set up 10 or so files in a playlist that just loops forever. So far, only one "crash" and I'm not sure it was legit because, while mouse/keyb did not response, audio continued (video "froze") and bcmstat was showing numbers, I could ssh to kill/reboot as needed.

I saw temps peak around 55C with bcmstat. Quite amazing, IMO, someone or many someones deserve a big pat on the back, or a buche de Noel with some raspberries on top. ;)

This pi4 is cooled with a 3.3V fan and ambient is around 21-22C. Using a TCL 55" 6-series as the monitor.

Code: Select all

.
.
.
arm_freq=2000
#gpu_freq=600
v3d_freq=700
over_voltage=4
hdmi_enable_4kp60=1
What other permutations would be helpful for testing, if any?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5410
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: VLC testing

Mon Nov 25, 2019 4:32 pm

noee wrote:
Mon Nov 25, 2019 3:29 pm
What other permutations would be helpful for testing, if any?
There is a pretty large testing space for this:

software decode vs hardware decode (e.g. h264)
gpu accelerated hevc (pi2/3) vs hardware accelerated hevc (pi4)
8 bit vs 10 bit
different audio/video codecs
different subtitle formats
network vs local file playback
live tv vs recordings
dvd images with menus
fkms vs firmware kms
launching vlc from command line vs launching from gui
running with X started or from console
running vlc windowed vs running full screen

It's possible some combinations currently don't work (e.g. crash) or don't work well (e.g. fail to keep up with high cpu).
At the moment we're interested in any sample files that don't play which we can look into.

Return to “Advanced users”