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

Re: VLC testing

Fri Dec 20, 2019 8:15 pm

dom wrote:
Fri Dec 20, 2019 6:23 pm
J7NJr wrote:
Fri Dec 20, 2019 4:15 pm
can't figure out the forum's private messaging, so here is a one-time link to the cut:
https://send.firefox.com/download/cf3b0 ... rbAd3P2x7Q
Downloaded the file. From mediainfo this is the problem:

Code: Select all

Chroma subsampling                       : 4:4:4
We should have guessed that from the filename.
file:///home/pi/Videos/1920x1080%20HEVC-YUV444.mkv
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.

J7NJr
Posts: 4
Joined: Fri Dec 20, 2019 5:58 am

Re: VLC testing

Sat Dec 21, 2019 7:39 am

dom wrote:
Fri Dec 20, 2019 6:23 pm
It's a very unusual encoding option usually only used for professional broadcast encodes.
Aha, so I learned something today.

I converted the cut to yuv420 using ffmpeg:

Code: Select all

ffmpeg -i cut.mkv -c:v hevc -pix_fmt yuv420p10be -c:a copy out-be.mkv
vlc can play the video now, but it's flooding the console with

Code: Select all

vcsm_clean_invalid2 failed: errno=0
unhandled 2
Should I worry about this?

also the CPU usage is pretty much the same no matter the hardware acceleration preference is toggled or not, so I can only guess it's always using hardware acceleration given that software decoding wouldn't keep up with 1080p.

Gadgetguy
Posts: 136
Joined: Fri Aug 15, 2014 2:55 am

Re: VLC testing

Sun Dec 22, 2019 10:44 am

I downloaded vlc testing on December 11th as directed by changing the source repositories to testing which also brought updates to ffmpeg and chromium. This was for my 4b 4gb (acquired after the firmware updates that corrected overheating problems and which has been more or (occasionally) less a joy to use and actually exceeded my expectations considering some of the comments I had read on these forums and elsewhere).

After this update I was pleased to note that both vlc and the repository version of mpv would play videos that used the vp9 codec. Prior to these testing updates both vlc and mpv(but not chromium browser or kodi) rendered vp9 videos with artifacts that made them unwatchable. At the same time I updated raspbian firmware so as to enable arm64 using /boot/config.txt (which incidentally I have subsequently disabled since it seemed to make firefox consistently crash when playing youtube in browser.) and observed after the firmware update thus enabled vlc was also able to play vp8 videos which it didn’t previously.

Now for the problem which seems to have crept into my system only in the last day or two- at least I didn’t notice it before. I use the chromium extension Open in VLC media player to play youtube videos via vlc:

https://chrome.google.com/webstore/deta ... onphhimkaj

In recent days I notice vlc crashing abruptly with no warning when playing youtube videos online via vlc player. These crashes take place often well along in the video with very low cpu and memory use. When replaying the video again in vlc,the crash will occur at a different spot in the video. My pi is not over-clocked. My internet download speed is usually in excess of 90mbps as mesuared by Ookla It crashes with both cma=512M added to /boot/commandline.txt and without this addition. It crashes with vlc preferences set to either video out to mmal splitter or to video out set to x11(xcb). Incidentally I see no to differences in resource usage or capabilities using either of these video outputs but I prefer x11(xcb) because it enables a floating control bar in full screen activated by mouse movement. It crashes with both gpu allocated 160mb and 192mb.

The video I have just been testing it on (altough it occurs in other videos as well) is:

https://www.youtube.com/watch?v=kgHgLgR9WNc
1965 Bluegrass/Mountain Music TV Special Is A Must-See

(Which incidentally really is a must see. While I am a classical music aficionado my musical tastes are fairly catholic and this is some really joyful life affirming roots music preserved by a courtly southern lawyer. truly from bygone days.- see also in a somewhat similar vein on the same youtube channel:
:

https://www.youtube.com/watch?v=br1MHXietLc )


vlc log file after each crash looks like this:




-- logger module started --
main: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
mmal_codec: VCSM init succeeded: CMA
main error: buffer deadlock prevented
main error: buffer deadlock prevented
alsa error: cannot estimate delay: Broken pipe
main error: buffer deadlock prevented
alsa error: cannot estimate delay: Broken pipe
main error: buffer deadlock prevented
alsa error: cannot estimate delay: Broken pipe


and so on till it finally crashes.


It crashes whether I have vlc audio set to automatic or to alsa.


I update raspbian via synaptic quite regularly. I notice one recent upgrade was


libffms2-4 on December 14th

and
libsasl2-2 and libsasl2-modules-db on december 21st



Anyone have any suggestions as to what may be causing this frustrating error. It does not appear to happen on local videos.
Naturally if you do not wish to add the aforementioned chromium extension you can replicate the problem by pasting the url into vlc

Gadgetguy
Posts: 136
Joined: Fri Aug 15, 2014 2:55 am

Re: VLC testing

Sun Dec 22, 2019 11:19 am

Addenda to my previous post. I ggogled :

alsa error: cannot estimate delay: Broken pipe

which yielded a plethora of results.

Following a suggestion at:

https://github.com/alexa-pi/AlexaPi/issues/265


by kis4karma

I enabled pulse in vlc audio out . I had previously installed apulse a pulse emulator to get a recent debian firefox non esr working and it seems to work in vlc. I am going to test this a bit and see if it resolves the vlc crashes.

Gadgetguy
Posts: 136
Joined: Fri Aug 15, 2014 2:55 am

Re: VLC testing

Sun Dec 22, 2019 11:48 am

Addenda so far with limited testing of apulse installed and audio out pulse no more crashes with vlc playing youtube videos.
adenda to addendas vlc just crashed
vlc with pulse enabled just crashed. alas!

Gadgetguy
Posts: 136
Joined: Fri Aug 15, 2014 2:55 am

Re: VLC testing

Sun Dec 22, 2019 1:14 pm

just to add a little more context mpv repository version via smplayer plays the aforementioned video without a glitch.

relaxpi4
Posts: 59
Joined: Tue Sep 10, 2019 1:15 pm

Re: VLC testing

Wed Jan 29, 2020 8:56 am

Hi
with the new version can i play my 3840x1080 videos to fullscreen hdmi outputs?
So 1920x1080 (left part of the video) to hdmi1 and 1920x1080 (right part of the video) to hdmi2?
thanks

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

Re: VLC testing

Wed Jan 29, 2020 1:28 pm

relaxpi4 wrote:
Wed Jan 29, 2020 8:56 am
Hi
with the new version can i play my 3840x1080 videos to fullscreen hdmi outputs?
So 1920x1080 (left part of the video) to hdmi1 and 1920x1080 (right part of the video) to hdmi2?
thanks
I imagine you can do that from desktop in windowed mode (with window occupying almost whole of both screens).
Performance may not be great. I don't believe a single instance of VLC supports two displays in fullscreen mode.

relaxpi4
Posts: 59
Joined: Tue Sep 10, 2019 1:15 pm

Re: VLC testing

Wed Jan 29, 2020 1:35 pm

Yes, but framerate is very low, i see tearing, etc. Not usable.
Any plan for this feature in future versions?
I think many of us like to use dual output, if engineers already gived to us :)

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

Re: VLC testing

Wed Jan 29, 2020 4:55 pm

relaxpi4 wrote:
Wed Jan 29, 2020 1:35 pm
Yes, but framerate is very low, i see tearing, etc. Not usable.
Any plan for this feature in future versions?
I think many of us like to use dual output, if engineers already gived to us :)
I think you expect too much. In window mode you already get lost frames when you play a 1080p50 video (not in overlay mode!) on a 1080p screen. It will get worse on larger screens or double screens. But I'm not sure what is possible with the new H265 decoder.
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

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

Re: VLC testing

Wed Jan 29, 2020 5:01 pm

gkreidl wrote:
Wed Jan 29, 2020 4:55 pm
I think you expect too much. In window mode you already get lost frames when you play a 1080p50 video (not in overlay mode!) on a 1080p screen. It will get worse on larger screens or double screens. But I'm not sure what is possible with the new H265 decoder.
In an X window, the bottleneck is rendering the pixels, not the codec.
Running fullscreen, we can bypass X and render to a hardware YUV layer which is much better.

4K or 2x1080p is always likely to struggle in an X window, but is more feasible fullscreen.
But I don't believe VLC supports two displays in fullscreen mode.

Running two instances of VLC in fullscreen mode may be possible (currently they can't both decode hevc, but that is being worked on).
The playback won't be synchronised.

It won't be a priority to support this in VLC as it's a pretty niche use case.

It is possible with other software. I believe this can do it:
https://info-beamer.com/raspberry-pi-di ... 13218.html

relaxpi4
Posts: 59
Joined: Tue Sep 10, 2019 1:15 pm

Re: VLC testing

Wed Jan 29, 2020 5:05 pm

yeah, i currently try that too
search the perfect solution

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

Re: VLC testing

Thu Jan 30, 2020 11:39 am

Today I downloaded a video from German TV station "ARD". I was surprised to see that they now offer it in 1080p50 (non-interlaced) resolution. I tried to play it in VLC and only got a black screen (but heard the audio track). The message window shows lots of messages like
mmal_codec error: Failed to alloc CMA buf: fmt=Z420, size=3133440

If I open it in omxplayer(GUI) it runs without any problems. Even mplayer can play it but with a lot of lost frames.

Output of mediainfo:

Code: Select all

mediainfo 'Nord bei Nordwest - Ein Killer und ein Halber-71355616.mp4'
General
Complete name                            : Nord bei Nordwest - Ein Killer und ein Halber-71355616.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 4.15 GiB
Duration                                 : 1 h 28 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 6 687 kb/s
Writing application                      : Lavf58.20.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 2 frames
Format settings, GOP                     : M=1, N=2
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 28 min
Bit rate mode                            : Variable
Bit rate                                 : 6 500 kb/s
Maximum bit rate                         : 8 200 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 50.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.063
Stream size                              : 4.03 GiB (97%)
Writing library                          : x264 core 155
Encoding settings                        : cabac=1 / ref=2 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=6 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=36 / lookahead_threads=6 / sliced_threads=0 / slices=1 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / stitchable=1 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=50 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=6500 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=8200 / vbv_bufsize=13000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=3:1.00
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 1 h 28 min
Bit rate mode                            : Variable
Bit rate                                 : 192 kb/s
Maximum bit rate                         : 197 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 120 MiB (3%)
Default                                  : Yesyoutibe
Alternate group                          : 1
My GPU memory is set to 256GB.

The video an be downloaded (for testing) with youtube-dl:

Code: Select all

youtube-dl https://www.ardmediathek.de/ard/player/Y3JpZDovL2Rhc2Vyc3RlLmRlL2tyaW1pcy1pbS1lcnN0ZW4vYTI3Yjc0ZjMtZWMxMy00MTI0LWI5YjEtOTQ5NTU3NzVjYmE0
Geo-Blocking should be disabled within the EU (so better do it before Brexit takes effect).
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

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

Re: VLC testing

Thu Jan 30, 2020 12:00 pm

gkreidl wrote:
Thu Jan 30, 2020 11:39 am
mmal_codec error: Failed to alloc CMA buf: fmt=Z420, size=3133440
CMA is the kernel's contiguous memory allocator, not GPU. If you have vc4-fkms-v3d or vc4-kms-v3d loaded then it would have increased that heap automatically to 256MB. Otherwise add "cma=128M" to /boot/cmdline.txt (do not add any carriage returns).
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.

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

Re: VLC testing

Thu Jan 30, 2020 12:49 pm

6by9 wrote:
Thu Jan 30, 2020 12:00 pm
gkreidl wrote:
Thu Jan 30, 2020 11:39 am
mmal_codec error: Failed to alloc CMA buf: fmt=Z420, size=3133440
CMA is the kernel's contiguous memory allocator, not GPU. If you have vc4-fkms-v3d or vc4-kms-v3d loaded then it would have increased that heap automatically to 256MB. Otherwise add "cma=128M" to /boot/cmdline.txt (do not add any carriage returns).
I'm testing this on a RPi 4/4GB. vc4-fkms-v3d is enabled. cmdline.txt has
cma=512M
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

Alex.
Posts: 24
Joined: Sun Feb 25, 2018 9:49 pm

Re: VLC testing

Sat Feb 01, 2020 11:10 pm

Using latest VLC (3.0.8.0-gf350b6b5a7), Video Geometry Effects don't mix well with h264 MMAL accelerated decoding

Code: Select all

[00cabb58] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
qt5ct: using qt5ct plugin
qt5ct: D-Bus global menu: no
qt5ct: D-Bus system tray: no
[b221b7e8] mmal_codec decoder: VCSM init succeeded: CMA
[b2217810] mp4 demux: Fragment sequence discontinuity detected 1 != 0
[b221b7e8] main decoder error: buffer deadlock prevented
[a59b7048] transform filter error: Unsupported pixel size 0 (chroma MMAL)
[a5956720] chain filter error: Too high level of recursion (3)
[a59559c0] main filter error: Failed to create video converter
[a5956720] chain filter error: Too high level of recursion (3)
[a59559c0] main filter error: Failed to create video converter
[a5956720] chain filter error: Too high level of recursion (3)
[a59559c0] main filter error: Failed to create video converter
[a5956720] chain filter error: Too high level of recursion (3)
[a59559c0] main filter error: Failed to create video converter
[a59559c0] transform filter error: Unsupported pixel size 0 (chroma MMAL)
[a59566b0] chain filter error: Too high level of recursion (3)
[a59b7048] main filter error: Failed to create video converter
[a59566b0] chain filter error: Too high level of recursion (3)
[a59b7048] main filter error: Failed to create video converter
[a59566b0] chain filter error: Too high level of recursion (3)
[a59b7048] main filter error: Failed to create video converter
[a59566b0] chain filter error: Too high level of recursion (3)
[a59b7048] main filter error: Failed to create video converter
mmal: mmal_vc_port_info_set: failed to set port info (3:0): EINVAL
mmal: mmal_vc_port_set_format: mmal_vc_port_info_set failed 0xa1e2d610 (EINVAL)
[a59918a8] mmal_codec filter error: Failed to commit format for output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
[a59918a8] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL)
mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL
mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xa1e2d610) (EINVAL)
Also it seems that --avcodec-hw=none (or by turning it off from GUI) doesn't turn off acceleration

zub0r
Posts: 4
Joined: Fri Jan 31, 2020 10:20 am

Re: VLC testing

Mon Feb 03, 2020 11:59 am

Hi, I'm testing the patch on Rpi 4 within BalenaOS and 32 bit docker OS image based on debian (balenalib/raspberrypi3:buster-run).
When I play HVEC video, the mmal opens the hvec codec correctly, but fails to find the required devices /dev/rpivid-*.

Could you please point me to the right direction?
What is responsible for creating those devices? Do I need to install additional drivers or enable some overlays?
I found that before those devices were named /dev/argon-*, but neither is available in host devices.

Code: Select all

[00c37aa8] mmal_avcodec decoder debug: codec (hevc) started
[00c37aa8] mmal_avcodec decoder debug: using frame thread mode with 3 threads
[00c37aa8] main decoder debug: using video decoder module "mmal_avcodec"
...
[ebe00668] main input debug: Stream buffering done (500 ms in 7 ms)
[hevc @ 0xc547d0] can't open /dev/rpivid-hevcmem
[hevc @ 0xc547d0] Failed to open rpivid devices
[hevc @ 0xc547d0] Failed setup for format rpi: hwaccel initialisation returned error.

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

Re: VLC testing

Mon Feb 03, 2020 12:13 pm

zub0r wrote:
Mon Feb 03, 2020 11:59 am
Hi, I'm testing the patch on Rpi 4 within BalenaOS and 32 bit docker OS image based on debian (balenalib/raspberrypi3:buster-run).
When I play HVEC video, the mmal opens the hvec codec correctly, but fails to find the required devices /dev/rpivid-*.

Could you please point me to the right direction?
What is responsible for creating those devices? Do I need to install additional drivers or enable some overlays?
I found that before those devices were named /dev/argon-*, but neither is available in host devices.

Code: Select all

[00c37aa8] mmal_avcodec decoder debug: codec (hevc) started
[00c37aa8] mmal_avcodec decoder debug: using frame thread mode with 3 threads
[00c37aa8] main decoder debug: using video decoder module "mmal_avcodec"
...
[ebe00668] main input debug: Stream buffering done (500 ms in 7 ms)
[hevc @ 0xc547d0] can't open /dev/rpivid-hevcmem
[hevc @ 0xc547d0] Failed to open rpivid devices
[hevc @ 0xc547d0] Failed setup for format rpi: hwaccel initialisation returned error.
Driver: https://github.com/raspberrypi/linux/bl ... ivid-mem.c
Device tree: https://github.com/raspberrypi/linux/bl ... .dtsi#L413
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.

zub0r
Posts: 4
Joined: Fri Jan 31, 2020 10:20 am

Re: VLC testing

Mon Feb 03, 2020 3:55 pm

Thank you, so would that be something like dtoverlay=brcm,bcm2838? That's all?
I'm not experienced with this.

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

Re: VLC testing

Mon Feb 03, 2020 4:28 pm

zub0r wrote:
Mon Feb 03, 2020 3:55 pm
Thank you, so would that be something like dtoverlay=brcm,bcm2838? That's all?
I'm not experienced with this.
No. The relevant nodes are part of the base device tree definition for the Pi4. For some reason your kernel build doesn't have those defines in the device tree, or hasn't built the relevant module (does "modinfo rpivid-mem" give you the details of the module?)

Sorry, we support Raspbian and our standard kernel configs / device tree. If BalenaOS does something else then you need to ask them for support (or is it your hosted Debian build at fault?)
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.

zub0r
Posts: 4
Joined: Fri Jan 31, 2020 10:20 am

Re: VLC testing

Mon Feb 03, 2020 4:52 pm

6by9 wrote:
Mon Feb 03, 2020 4:28 pm
does "modinfo rpivid-mem" give you the details of the module?
No, looks like the module is not included in the host OS image:

Code: Select all

modinfo: ERROR: Module rpivid-mem not found.
I had an impression that balena OS images were derived from Raspbian, but looks like it is not the case any more - I'll write to their forum.
Thanks

Alex.
Posts: 24
Joined: Sun Feb 25, 2018 9:49 pm

Re: VLC testing

Mon Feb 03, 2020 6:09 pm

@6by9 Any clue about why rotation effects break mmal acceleration?

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

Re: VLC testing

Mon Feb 03, 2020 6:16 pm

Alex. wrote:
Mon Feb 03, 2020 6:09 pm
@6by9 Any clue about why rotation effects break mmal acceleration?
No idea off the top of my head.
I know that there are a number of different formatting paths through VLC because of the odd way that it can order plugins, but the expert on VLC is on holiday at present.
I don't know how the geometry effects are implemented, but they'll typically hammer performance anyway.
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.

zub0r
Posts: 4
Joined: Fri Jan 31, 2020 10:20 am

Re: VLC testing

Mon Feb 03, 2020 8:43 pm

Testing on RPi4 Raspbian with cma=512M I get

Code: Select all

[01707420] mmal_vout generic error: VCSM init fail
[01391870] mmal_xsplitter vout display error: Failed to open Xsplitter:mmal_vout module
[01707420] main filter error: Failed to create video converter
[01725200] chain filter error: Too high level of recursion (3)
for both 1080p and 4k HEVC videos. Any suggestions?

1080p HVEC video plays fine, but 4k freezes on first frame.
Might this software scaler be the bottleneck? (I use 1080p display)

Code: Select all

[b1e0b770] main scale debug: looking for video converter module matching "any": 17 candidates
[swscaler @ 0xb1e30650] Forcing full internal H chroma due to input having non subsampled chroma
[b1e0b770] swscale scale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality)
Video:

Code: Select all

General
Complete name                            : cut.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/mp41)
File size                                : 6.49 MiB
Duration                                 : 10 s 10 ms
Overall bit rate                         : 5 436 kb/s
Writing application                      : Lavf57.83.100

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : [email protected]@Main
Codec ID                                 : hev1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 10 s 10 ms
Bit rate                                 : 5 431 kb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.022
Stream size                              : 6.48 MiB (100%)
Writing library                          : x265 2.6:[Linux][GCC 7.2.0][64 bit] 8bit+10bit+12bit
Encoding settings                        : cpuid=1173503 / frame-threads=3 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=3840x2160 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=8 / scenecut=40 / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=2 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / no-b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / analysis-reuse-mode=0 / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=28.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1
Update:
Looks like the problem on raspbian is missing /dev/vcsm

Gadgetguy
Posts: 136
Joined: Fri Aug 15, 2014 2:55 am

Re: VLC testing

Thu Feb 06, 2020 2:38 am

gkreidl wrote:
Thu Jan 30, 2020 11:39 am
Today I downloaded a video from German TV station "ARD". I was surprised to see that they now offer it in 1080p50 (non-interlaced) resolution. I tried to play it in VLC and only got a black screen (but heard the audio track). The message window shows lots of messages like
mmal_codec error..............
Just revisited this thread. I am using vlc version 3.0.8-0+deb10u1+rpt7 with a gpu allocation of 160. I didn’t add cma=512. I downloaded your video here in Canada and encountered no geo restriction. The video played smoothly, no dropped frames (other than a few at the very beginning or if fast forwarded) even in windowed mode ,low cpu usage~6%,
PS. Digressing for a momentI back to the avidenux thread

https://www.raspberrypi.org/forums/view ... x#p1591343
I would really recomend you give avidemux a try. I am using version 2.7.4 and as far as I can tell it is frame accurate and does do smart rendering. I have lately been using it a fair bit on the pi for quick correcting of audio sync problems, cutting portions out of videos, and appending videos and it so fast!

Edit:

Edit: I should point out out although I don’think it is relevant to this video that I had done an rpi-update to the Jan 10, 2020 firmware so as to enable vp8 playback in vlc which at least at the time when I did the rpi-update didn’t play in vlc with the stable firmware.
Pi users might be interedted in knowing if they weren’t already aware that the Pi 4 got some vey favourasble mention from an influential source recently ie.:


ExplainingComputers: SBC Video Editing: Raspberry Pi 4 vs Odroid N2 & Jetson Nano

at:

https://www.youtube.com/watch?v=NRsXiRcaItk

Return to “Advanced users”