V4l2m2m not working any longer with latest kodi/ffmpeg.

Post Reply
MastaG
Posts: 284
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 2 times
Contact:

V4l2m2m not working any longer with latest kodi/ffmpeg.

Unread post by MastaG » Fri Sep 27, 2019 5:47 am

Hi there,

A quick question for @AreaScout or @memeka.

I've built the kodi from todays Leia branch with the usual patch for enabling h264_v4l2 as the default codec.
I've built it against todays ffmpeg master branch.

But video decoding seems broken.

Kodi says:

Code: Select all

2019-09-26 17:47:12.046 T:2406473360  NOTICE: Creating video codec with codec id: 272019-09-26 17:47:12.046 T:2406473360  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: V4L2 mem2mem H.264 decoder wrapper
2019-09-26 17:47:14.114 T:2406473360   ERROR: CVideoPlayerVideo::OpenStream - could not open video codec
2019-09-26 17:47:14.114 T:2406473360 WARNING: OpenStream - Unsupported stream 0. Stream disabled.
The kernel says:

Code: Select all

[   95.346055] vidioc_try_fmt:407: Unsupported format for destination.
[   97.380266] s5p_mfc_wait_for_done_ctx:71: Interrupt (ctx->int_type:2, command:3) timed out
[   97.388116] vidioc_g_fmt:375: Format could not be read
[   97.393109] s5p_mfc_queue_setup:943: State seems invalid. State = 101, vq->type = 9
[   97.400693] reqbufs_capture:570: Failed allocating buffers for CAPTURE queue
This is something I haven't seen before.
Any ideas?

I'm on memeka's 5.0.3 kernel btw.
Kodi and ffmpe used to work a couple of months ago.

User avatar
memeka
Posts: 4339
Joined: Mon May 20, 2013 10:22 am
languages_spoken: english
ODROIDs: XU rev2 + eMMC + UART
U3 + eMMC + IO Shield + UART
Has thanked: 1 time
Been thanked: 25 times
Contact:

Re: V4l2m2m not working any longer with latest kodi/ffmpeg.

Unread post by memeka » Fri Sep 27, 2019 10:37 am

Looks like an issue with ffmpeg.
try using an older (stable) version.
will add it on my list to do next month :(

MastaG
Posts: 284
Joined: Mon Aug 26, 2013 6:05 pm
languages_spoken: english
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: V4l2m2m not working any longer with latest kodi/ffmpeg.

Unread post by MastaG » Fri Sep 27, 2019 5:30 pm

Nice to see you around memeka!

You're right.. There's been a lot of modifications to the v4l2m2m codec since the last month.
If I go back to rev: https://github.com/FFmpeg/FFmpeg/commit ... 95fc0e5b4e (just before most of the modifications).
It seems to work, although since I'm testing remotely I cannot verify the output on the screen, but kodi says:

Code: Select all

2019-09-27 08:23:33.967 T:2945142800  NOTICE: VideoPlayer::OpenFile: plugin://plugin.video.youtube/play/?video_id=UW2QoShtHgE
2019-09-27 08:23:34.102 T:2792083088  NOTICE: Creating InputStream
2019-09-27 08:23:34.217 T:2792083088  NOTICE: Creating Demuxer
2019-09-27 08:23:34.290 T:2792083088  NOTICE: Opening stream: 0 source: 256
2019-09-27 08:23:34.290 T:2792083088  NOTICE: Creating video codec with codec id: 27
2019-09-27 08:23:34.291 T:2792083088  NOTICE: CDVDVideoCodecFFmpeg::Open() Using codec: V4L2 mem2mem H.264 decoder wrapper
2019-09-27 08:23:34.308 T:2792083088  NOTICE: Creating video thread
2019-09-27 08:23:34.308 T:2750402192  NOTICE: running thread: video_thread
2019-09-27 08:23:34.400 T:2792083088  NOTICE: Opening stream: 1 source: 256
2019-09-27 08:23:34.401 T:2792083088  NOTICE: Finding audio codec for: 86018
2019-09-27 08:23:34.402 T:2792083088  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2019-09-27 08:23:34.402 T:2792083088  NOTICE: Creating audio thread
2019-09-27 08:23:34.403 T:2741460624  NOTICE: running thread: CVideoPlayerAudio::Process()
2019-09-27 08:23:34.413 T:2741460624  NOTICE: Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through)
2019-09-27 08:23:34.427 T:2916081296  NOTICE: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms
2019-09-27 08:23:34.457 T:2945142800  NOTICE: GLES: Selecting single pass rendering
2019-09-27 08:23:34.457 T:2945142800  NOTICE: GLES: Selecting YUV 2 RGB shader
2019-09-27 08:23:34.511 T:2945142800  NOTICE: GLES: Selecting single pass rendering
Though I'm still getting a single line in the kernel log:

Code: Select all

[52677.536880] vidioc_try_fmt:407: Unsupported format for destination.
But perhaps this is meant to be, since I've never actually bothered to look at it before.

I'll try to compile some more recent revisions to find out where it actually broke.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: Google [Bot], tonyross and 1 guest