Closed jenneron closed 1 year ago
Can you post logs from the working ffplay
command (preferably with verbose output like Moonlight's v4l2m2m log lines)
Is ffplay -v debug -vcodec h264_v4l2m2m Big_Buck_Bunny_720_10s_30MB.mp4
fine?
Also -v verbose
here too
Interesting, so 720p seems to work. Can you try with a 1080p version of Big Buck Bunny?
Sorry for the delay.
I've tried https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_30MB.mp4, it seems to work, but it is laggy.
I also tried https://download4.dvdloc8.com/trailers/divxdigest/simpsons_movie_1080p_hddvd_trailer.zip (1920×800) which is not laggy unlike Big Buck Bunny
Tested it on master (including the patch above). It works
I also tested it on exynos 5420 with a few patches on top of mainline kernel. It uses another v4l2m2m video decoder and works here as well. https://wiki.postmarketos.org/wiki/Samsung_Chromebook_2_11.6%22_(google-peach-pit)
Thank you for fixing this
@jenneron Can you tell me what kernel version you were on? I'm trying to get v4l2m2m working on trogdor running 5.19.1
. I notice I only have /dev/video0. When running ffmpeg as you did I get...
h264_v4l2m2m @ 0x7d840090e0] probing device /dev/video0
[h264_v4l2m2m @ 0x7d840090e0] driver 'v4l2 loopback' on card 'Virtual Camera' in splane mode
[h264_v4l2m2m @ 0x7d840090e0] v4l2 capture format not supported
[h264_v4l2m2m @ 0x7d840090e0] Could not find a valid device
[h264_v4l2m2m @ 0x7d840090e0] can't configure decoder
Failed to open file 'Big_Buck_Bunny_1080_10s_5MB.webm' or configure filtergraph
[AVIOContext @ 0x7d84009780] Statistics: 368149 bytes read, 0 seeks
Maybe my kernel isn't new enough?
@Geofferey that kernel is quide old. Video decoder works for me on postmarketOS. you can see kernel version at https://pkgs.postmarketos.org/package/master/postmarketos/aarch64/linux-postmarketos-qcom-sc7180
Description
Hardware accelerated video decode doesn't work on Qualcomm SoCs with Venus video decoder which uses the same API as raspberry pi (v4l2m2m)
I'm using it from https://flathub.org/apps/com.moonlight_stream.Moonlight on debian sid with gnome wayland
I also tried to run it with
flatpak run --env=H264_DECODER_HINT=h264_v4l2m2m --env=DRM_FORCE_DIRECT=1 com.moonlight_stream.Moonlight
as suggested on https://github.com/moonlight-stream/moonlight-docs/wiki/Installing-Moonlight-Qt-on-Raspberry-Pi-4, but it probably wasn't supposed to help in this caseHardware
The device I'm trying to run it on: https://wiki.postmarketos.org/wiki/Acer_Chromebook_Spin_513_(google-lazor)
I tested this video decoder using
ffplay -vcodec h264_v4l2m2m file.mp4
which works fine and reportsdriver 'qcom-venus' on card 'Qualcomm Venus video decoder' in mplane mode
, but it doesn't work in moonlightLogs
related part
``` 00:00:03 - SDL Info (0): Opened DRM render node: /dev/dri/renderD128 00:00:03 - SDL Info (0): Direct rendering via DRM is disabled 00:00:03 - SDL Info (0): Using DRM renderer 00:00:03 - FFmpeg: [h264_mp4toannexb @ 0xffff40273bf0] The input looks like it is Annex B already 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] Format nv12 chosen by get_format(). 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] probing device /dev/video3 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] driver 'qcom-venus' on card 'Qualcomm Venus video decoder' in mplane mode 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] Using device /dev/video3 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] driver 'qcom-venus' on card 'Qualcomm Venus video decoder' in mplane mode 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] requesting formats: output=H264/none capture=NV12/yuv420p 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] output: H264 16 buffers initialized: 1920x1080, sizeimage 01568768, bytesperline 00000000 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] VIDIOC_G_FMT ioctl 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] capture buffer[0] initialization (Invalid argument) 00:00:03 - FFmpeg: [h264_v4l2m2m @ 0xffff40e4f030] can't request capture buffers 00:00:03 - SDL Warn (0): Test decode failed (avcodec_send_packet): Cannot allocate memory ```full-log.txt