FFMPEG released with MFC acceleration

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

FFMPEG released with MFC acceleration

Unread post by memeka » Wed Oct 04, 2017 8:39 pm

Download latest FFMPEG code with MFC hardware acceleration: https://oph.mdrjr.net/memeka/ffmpeg/
only for ubuntu 16.04 official images

h264 software decoder is set as default, manually specify h264_v4l2m2m for MFC decoder
h264_v4l2m2m MFC encoder is set as default, manually specify libx264 for software encoder

MFC decoder does not perform very well, this is why it's not set as default. after dmabuf support is added, maybe it will be faster.
example usage with mpv player: mpv -vd h264_v4l2m2m ~/video/sintel_trailer-720p.mp4
for kodi, you can integrate *_v4l2m2m codecs (when they're not the default) like this: https://github.com/koenkooi/LibreELEC.t ... 618af96903

you can read how to do encoding here: viewtopic.php?t=24366

EDIT: ffmpeg 3.4 was officially released with v4l2 support! Starting with this release, MFC works in ffmpeg!
Last edited by memeka on Thu Oct 19, 2017 10:51 am, edited 1 time in total.

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by mad_ady » Thu Oct 05, 2017 1:27 am

That's great! I'll give it a try. Maybe some of my format problems have been solved...

aardbei
Posts: 4
Joined: Thu Aug 29, 2013 6:38 pm
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by aardbei » Mon Oct 09, 2017 6:06 pm

Hi Memeka,

First thank you verry much for your work. Much appreciated!!

Question. I installed my XU4 with your provided image and try to get Emby/Kodi running
also with your provided packages. First i tried Emby. I installed emby-server-beta successful so
the next step would be ffmpeg from your packages.

When i install your provided .deb packages it is complaining about a lot of missing dependencies like
libvpx3,libwebp5 and libx265-79.

Is it possible to provide those .debs too? or should i simply grab them from the net and link them
to the corresponding versions?

dpkg --force-all -i libavcodec57_3.3.4-2_armhf.deb
dpkg: regarding libavcodec57_3.3.4-2_armhf.deb containing libavcodec57:armhf:
libavcodec-extra57:armhf conflicts with libavcodec57
libavcodec57:armhf (version 7:3.3.4-2) is to be installed.

dpkg: warning: ignoring conflict, may proceed anyway!
(Reading database ... 97321 files and directories currently installed.)
Preparing to unpack libavcodec57_3.3.4-2_armhf.deb ...
Unpacking libavcodec57:armhf (7:3.3.4-2) over (7:3.3.4-2) ...
dpkg: libavcodec57:armhf: dependency problems, but configuring anyway as you requested:
libavcodec57:armhf depends on libvpx3 (>= 1.5.0); however:
Package libvpx3 is not installed.
libavcodec57:armhf depends on libwebp5 (>= 0.4.3); however:
Version of libwebp5:armhf on system is 0.4.1-1.2+b2.
libavcodec57:armhf depends on libx265-79 (>= 1.9); however:
Package libx265-79 is not installed.

/usr/bin/ffmpeg
/usr/bin/ffmpeg: symbol lookup error: /usr/lib/arm-linux-gnueabihf/libavcodec.so.57: undefined symbol: x265_api_get_79

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Mon Oct 09, 2017 7:17 pm

these debs are for ubuntu 16.04 official images, as I have stated in the OP.
(also, for emby, you need my emby build, not the official emby build).

aardbei
Posts: 4
Joined: Thu Aug 29, 2013 6:38 pm
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by aardbei » Mon Oct 09, 2017 7:36 pm

Sorry, i did not read that.

I'll install 16.04 this evening and see if i can get it up and running.

aardbei
Posts: 4
Joined: Thu Aug 29, 2013 6:38 pm
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by aardbei » Tue Oct 10, 2017 2:36 am

Hi Memeka,

Sorry to ask but where can i find your emby debs? I do see a MediaBrowser.Mono.3.2.8.0.tar.gz
If i should use that tar.gz how do i start it?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Oct 10, 2017 3:14 am

That’s the file
You need to unpack it with tar -xzvf
Then find the .exe file in the archive and start it with mono MediaBrowser.Server.Mono.exe

aardbei
Posts: 4
Joined: Thu Aug 29, 2013 6:38 pm
languages_spoken: english
ODROIDs: U2
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by aardbei » Tue Oct 10, 2017 5:10 am

you rock!! i'm very impressed!

i still needed to link libsqlite.3.so.0 from my libs to libsqlite3.so but after that
it is really really good.

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Oct 10, 2017 6:29 am

Good to see it worked :)

elatllat
Posts: 1427
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by elatllat » Wed Oct 11, 2017 1:28 am

Any chance we can get that merged upstream like this?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Wed Oct 11, 2017 4:59 am

elatllat wrote:Any chance we can get that merged upstream like this?
you mean like this ?

elatllat
Posts: 1427
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by elatllat » Wed Oct 11, 2017 5:09 am

Qualcomm is using the same VPU API as Exynos, or wrong link, or you mean better commit example?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Wed Oct 11, 2017 6:56 am

elatllat wrote:Qualcomm is using the same VPU API as Exynos, or wrong link, or you mean better commit example?
Qualcomm is using V4L2, that's the same API everywhere. The author tests using qualcomm, i tested it on exynos (there are a few commits later due to some bugs i reported), and there's another guy testing on other platform :)

elatllat
Posts: 1427
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 10 times
Been thanked: 27 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by elatllat » Wed Oct 11, 2017 7:03 am

Nice. So maybe edit the OP to point to official then?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Wed Oct 11, 2017 7:28 am

elatllat wrote:Nice. So maybe edit the OP to point to official then?
there are no debs for ffmpeg mainline.
plus, i have added a couple of patches of my own, specific for MFC (that will probably will never make it to mainline).

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Thu Oct 19, 2017 10:51 am

ffmpeg 3.4 was officially released with v4l2 support! Starting with this release, MFC works in ffmpeg!

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by mad_ady » Thu Oct 19, 2017 2:46 pm

I take it you refer to the accelerated decoding, right?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Thu Oct 19, 2017 3:18 pm

mad_ady wrote:I take it you refer to the accelerated decoding, right?
it's both decoding and encoding.
with some caveats:

* dmabuf support is missing => decoding + outputting to screen is slower than software
* encoder does not support bitrate => encoding is not really useful :)

I have my own ffmpeg 3.3.3 branch here: https://github.com/mihailescu2m/FFmpeg/ ... _m2m-3.3.3 which has the same implementation backported, and with encoder bitrate support

User avatar
mad_ady
Posts: 6360
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 144 times
Been thanked: 105 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by mad_ady » Thu Oct 19, 2017 3:42 pm

Ok, thanks. I need bitrate support.

minca
Posts: 34
Joined: Fri Oct 06, 2017 5:23 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by minca » Tue Jan 16, 2018 2:53 am

Hi guys,

after upgrading the kernel the up-to-date version of ffmpeg us terribly slow.

the only solution that i found so far was to install older version:

sudo apt-get install ffmpeg=7:2.8.11-0ubuntu0.16.04.1

any help ?

thx

User avatar
odroid
Site Admin
Posts: 31760
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 83 times
Been thanked: 241 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by odroid » Tue Jan 16, 2018 9:40 am

Try this latest image and update the kernel to 4.14.12 or higher.
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20171212

minca
Posts: 34
Joined: Fri Oct 06, 2017 5:23 am
languages_spoken: english
ODROIDs: xu4
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by minca » Wed Jan 17, 2018 1:45 am

got:
Ubuntu 16.04.3 LTS (GNU/Linux 4.14.12-99 armv7l)

EDIT: oh now I see your point, thx
FFMPEG fully supports hardware acceleration now, both encode and decode

outhudd9
Posts: 37
Joined: Wed May 02, 2018 10:52 pm
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by outhudd9 » Tue Jun 26, 2018 9:24 pm

Does this allow HW accelerated video playback with mpv?

Or is this more useful for eg transcoding?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Jun 26, 2018 9:55 pm

Yes, mpv is hw accelerated

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 7:27 am

the MFC acceleration don't work with dvb source since mpeg4.
Where i could find someone who work ont it ?
If someone work on it, could we find a group to crowdfunding ( same as MPP rockchip ) ?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Jul 03, 2018 9:04 am

is it mpeg4 or mpeg2 that has issues?
what do you mean "don't work" ?

User avatar
odroid
Site Admin
Posts: 31760
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 83 times
Been thanked: 241 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by odroid » Tue Jul 03, 2018 9:37 am

@martos,
When I tested this MPEG4 simple-profile test file with ffplay, the playback was okay with mpeg4_v4l2m2m/MFC acceleration.
http://download.blender.org/peach/bigbu ... rround.avi
But this MSMPEG4V2(MP42) test file couldn't use the MFC acceleration. It played with software decoding.
http://download.blender.org/peach/bigbu ... stereo.avi

So, you might need to check the video format in your DVD source.

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 4:25 pm

I try mpeg4 from dvb
in the readme
https://wiki.odroid.com/odroid-xu4/os_i ... 4/20180531
Known issues and Tips
MPEG4/MPEG2 video decoding is very unstable

I have video mpeg4 flux from dvb source ,
if i try encoder (h264_v4l2m2m):

Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_v4l2m2m))
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Press [q] to stop, [?] for help
[h264 @ 0x1f08920] co located POCs unavailable
[h264 @ 0x1f82500] co located POCs unavailable
[h264 @ 0x1f31b60] co located POCs unavailable
[h264 @ 0x1fc3150] reference picture missing during reorder
Last message repeated 1 times
[h264 @ 0x1fc3150] Missing reference picture, default is 65328
Last message repeated 1 times
[h264 @ 0x1f497a0] mmco: unref short failure
[h264_v4l2m2m @ 0x206b740] Could not find a valid device
[h264_v4l2m2m @ 0x206b740] can't configure encoder
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

If i try decoder ( h264_v4l2m2m or mpeg4_v4l2m2m )
[h264_v4l2m2m @ 0x21b8840] Could not find a valid device
[h264_v4l2m2m @ 0x21b8840] can't configure decoder
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Permission denied


If i put software decoder h264 and encoder h254 :

Metadata:
encoder : Lavf58.17.101
Stream #0:0: Video: h264 (libx264), yuv420p, 512x384 [SAR 4:3 DAR 16:9], q=-1--1, 21 fps, 90k tbn, 21 tbc
Metadata:
encoder : Lavc58.20.104 libx264
Side data:
cpb: bitrate max/min/avg: 400000/0/0 buffer size: 60000000 vbv_delay: -1
Stream #0:1(fra): Audio: aac (LC), 22050 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.20.104 aac
frame= 35 fps=0.0 q=0.0 size=N/A time=00:00:00.78 bitrate=N/A dup=34 drop=0 sp
and work's

User avatar
odroid
Site Admin
Posts: 31760
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 83 times
Been thanked: 241 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by odroid » Tue Jul 03, 2018 4:29 pm

We released a new ffmpeg package for Ubuntu 18.04 this morning. Did you update it with "apt upgrade"?
viewtopic.php?f=146&t=24366&p=227356#p227356

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 4:41 pm

I make the update, ffmpeg choose automatickly h264_v4l2m2m

[h264_v4l2m2m @ 0x599920] Could not find a valid device
[h264_v4l2m2m @ 0x599920] can't configure decoder
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Error while opening decoder for input stream #0:0 : Permission denied

It could be a detect error of the device ? i use user www-data , it's not the good user ? group ?

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 5:03 pm

DVB Transport Stream aka .ts file extension is supported for long time in FFmpeg it is just a pure encapsulated MPEG2 and for HD MPEG4 stream further more it can contain EPG data, ECM and EMM subscription/control words data and subtitle data

You should just try if software decoder is able to decode it, if not FFmpeg could be broken (unlikely but possible) or the file is damaged or you have recorded an encrypted data stream

Here is a file to test which should work http://www.w6rz.net/bbb24p_00.zip

RG

User avatar
OverSun
Posts: 1484
Joined: Mon Apr 29, 2013 5:12 pm
languages_spoken: english
Has thanked: 0
Been thanked: 15 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by OverSun » Tue Jul 03, 2018 5:14 pm

For me it's pretty obvious that your user www-data has no access to /dev/video<something> device which represent mfc.
check permissions on /dev/video<N> devices

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 5:30 pm

( remenber software decoding works )
i change the right of the /dev/videoX , it's better BUT
now new error :

[h264_v4l2m2m @ 0xbb7cb0] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
Last message repeated 1 times
[h264_v4l2m2m @ 0xbb7cb0] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0xbb7cb0] driver 's5p-mfc' on card 's5p-mfc-dec'
[h264_v4l2m2m @ 0xbb7cb0] Using device /dev/video10
[h264_v4l2m2m @ 0xbb7cb0] driver 's5p-mfc' on card 's5p-mfc-dec'
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (libx264))
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Input/output error
Last message repeated 64 times
frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A Error while decoding stream #0:0: Input/output error
Last message repeated 68 times
frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A Error while decoding stream #0:0: Input/output error
Last message repeated 20 times
Too many packets buffered for output stream 0:1.
[aac @ 0x59bb10] Qavg: 374.768
[aac @ 0x59bb10] 2 frames left in the queue on closing
Conversion failed!

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 5:42 pm

So i try to force mpeg4_v4l2m2m decoder :

No error , but i have only the sound :

Metadata:
encoder : Lavf58.17.101
Stream #0:0(fra): Audio: aac (LC), 22050 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.20.104 aac

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 6:18 pm

Ok i have tested it now on XU4 and i can confirm that it doesn't work

Code: Select all

Input #0, mpegts, from 'Videos/bbb24p_00.ts':
  Duration: 00:00:49.21, start: 11.516278, bitrate: 74105 kb/s
  Program 1
    Stream #0:0[0x31]: Video: mpeg2video ([2][0][0][0] / 0x0002), nv21(progressive), 1920x1080, 24 fps, 24 tbr, 90k tbn, 48 tbc
    Stream #0:1[0x32]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 384 kb/s
[mpeg2_v4l2m2m @ 0x564930] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
    Last message repeated 1 times
[mpeg2_v4l2m2m @ 0x564930] driver 's5p-mfc' on card 's5p-mfc-enc'
[mpeg2_v4l2m2m @ 0x564930] driver 's5p-mfc' on card 's5p-mfc-dec'
[mpeg2_v4l2m2m @ 0x564930] Using device /dev/video10
[mpeg2_v4l2m2m @ 0x564930] driver 's5p-mfc' on card 's5p-mfc-dec'
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (mpeg2_v4l2m2m) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (ac3 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Input/output error
    Last message repeated 60 times
Error while decoding stream #0:0: Input/output error2.77 bitrate=N/A speed=N/A
    Last message repeated 37 times
Too many packets buffered for output stream 0:1.

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Jul 03, 2018 6:25 pm

from what i remember, there is bug in exynos mpeg2 with setting the linesize... which of course is not ffmpeg since it's a driver/hardware issue.
i've seen it in oversun's kodi implementation, and it needs to be added to ffmpeg.
in the meantime, use software mpeg2 dec.
mpeg4 should be fine.

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 6:38 pm

i try another decoder h264_v4l2m2m to encoder h264_v4l2m2m :

[h264_v4l2m2m @ 0x5518a0] driver 'exynos-gsc' on card 'exynos-gsc gscaler'
Last message repeated 1 times
[h264_v4l2m2m @ 0x5518a0] driver 's5p-mfc' on card 's5p-mfc-enc'
[h264_v4l2m2m @ 0x5518a0] driver 's5p-mfc' on card 's5p-mfc-dec'
[h264_v4l2m2m @ 0x5518a0] Using device /dev/video10
[h264_v4l2m2m @ 0x5518a0] driver 's5p-mfc' on card 's5p-mfc-dec'
Stream mapping:
Stream #0:0 -> #0:0 (h264 (h264_v4l2m2m) -> h264 (h264_v4l2m2m))
Stream #0:1 -> #0:1 (eac3 (native) -> aac (native))
Press [q] to stop, [?] for help
Error while decoding stream #0:0: Input/output error
Last message repeated 57 times
frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A Error while decoding stream #0:0: Input/output error
Last message repeated 68 times
frame= 0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A Error while decoding stream #0:0: Input/output error
Last message repeated 28 times
Too many packets buffered for output stream 0:1.
[aac @ 0x4eb510] Qavg: 468.711
[aac @ 0x4eb510] 2 frames left in the queue on closing
Conversion failed!

Could i have a debug parameter to see where the conversion fail ? can i give you more information ?
(if you want i can give acces to the ssh of the board ...)

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 6:42 pm

Could be a result in incorrect timestamps ?

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 7:35 pm

memeka wrote:from what i remember, there is bug in exynos mpeg2 with setting the linesize... which of course is not ffmpeg since it's a driver/hardware issue.
i've seen it in oversun's kodi implementation, and it needs to be added to ffmpeg.
in the meantime, use software mpeg2 dec.
mpeg4 should be fine.
You are right, i downloaded a very old DVB record file (2008) from my very old Dreambox (Linux version 2.6.12.6), it DOES play but line size is wrong as you said
Attachments
IMG_1425.JPG
IMG_1425.JPG (174.66 KiB) Viewed 6932 times

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 7:50 pm

i prepare a file to upload

ffmpeg -i http://192.168.1.50:8001/1:0:19:601:6:2 ... 0000:0:0:0: -c:v copy -c:a copy /root/test.avi
(last version ) -i (source enigma2 receiver dvb T2) -c: a and v (copy exactly ) test.avi
in the log i have :

[mpegts @ 0x4b67d0] Could not find codec parameters for stream 6 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'http://192.168.1.50:8001/1:0:19:601:6:2 ... 0000:0:0:0:':
Duration: N/A, start: 49583.686656, bitrate: N/A
Program 1537
Stream #0:0[0x78]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x82](fra): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:2[0x83](qaa): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
Stream #0:3[0x84](qad): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 96 kb/s
Stream #0:4[0x96](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
Stream #0:5[0x97](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
Stream #0:6[0xaa]: Unknown: none ([5][0][0][0] / 0x0005)
Program 1538
Program 1542
Program 1544
Program 1545
Output #0, avi, to '/root/test.avi':
Metadata:
ISFT : Lavf57.83.100
Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 50 tbn, 50 tbc
Stream #0:1(fra): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 408 fps= 46 q=-1.0 Lsize= 11783kB time=00:00:18.26 bitrate=5286.0kbits/s speed=2.08x

Where i can upload this file test.avi ?

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Jul 03, 2018 7:53 pm

this means linesize is not the issue there :)
that file is amazing, not even software decoder -> mfc encoder can handle it. It also complains about wrong frame sizes, seems that not all are 1080p.
the bitrate is quite high as well... 75 mbps ... not sure what's the limit of the mfc
i doubt it can do 1080p 24fps @ 75 mbps.

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 8:02 pm

Ok i have done some more tests, i played a more recent file recorded back in 2014, my DVB Broadcast provider changed somewhere in 2009 i think from 1080p to 1080i only TV stations broadcasting 720p was keep't 720p,
so all movies with interlaced 1080i are failing :(

mpeg4 interlaced does not work

EDIT: mpeg4 not mpeg2

RG

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 8:07 pm

escuse me i don't understand

I see :
1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 50 tbn, 50 tbc
and the file is
frame= 408 fps= 46 q=-1.0 Lsize= 11783kB time=00:00:18.26 bitrate=5286.0kbits/s speed=2.08x
so 5286 Kbits/s ?

it's a 1080p (1920×1080), I make mistake ?
Last edited by martos on Tue Jul 03, 2018 8:16 pm, edited 1 time in total.

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Tue Jul 03, 2018 8:13 pm

The file posted above:

Code: Select all

Input #0, mpegts, from 'Videos/bbb24p_00.ts':
  Duration: 00:00:49.21, start: 11.516278, bitrate: 74105 kb/s
is 74mbps bitrate.

@martos i could not test your file. upload it somewhere. cut a small bit of it (10mb) and use something like transfer.sh

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 8:30 pm

memeka wrote:The file posted above:

Code: Select all

Input #0, mpegts, from 'Videos/bbb24p_00.ts':
  Duration: 00:00:49.21, start: 11.516278, bitrate: 74105 kb/s
is 74mbps bitrate.

@martos i could not test your file. upload it somewhere. cut a small bit of it (10mb) and use something like transfer.sh
yes that was probably the wrong file to test with :D

but 1080i fails on h264_v4l2m2m decoder, i will try to upload a file too + some videos have the line size problem

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Tue Jul 03, 2018 8:47 pm

The file uploaded ( Big thank's for the very good upload site )

https://transfer.sh/dGSNQ/test.avi

Duration: 00:00:48.36, start: 0.000000, bitrate: 7795 kb/s
Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 25 tbr, 50 tbn, 50 tbc
Stream #0:1: Audio: eac3, 48000 Hz, stereo, fltp, 128 kb/s

User avatar
AreaScout
Posts: 1033
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Has thanked: 13 times
Been thanked: 42 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by AreaScout » Tue Jul 03, 2018 8:51 pm

works with ffmpeg -vcodec h264 -report -i 1080i.ts -f null - and fails with ffmpeg -report -i 1080i.ts -f null -

https://www.areascout.at/1080i.ts

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Wed Jul 04, 2018 4:33 pm

Could someone can post an h264 video (little) with wotks with v4l2m2m , if possible in 1080P ?
( because i see the drivers ask to jpeg api before fail, i want to see if it's the same with h264 )

User avatar
memeka
Posts: 4321
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: 13 times
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by memeka » Wed Jul 04, 2018 6:17 pm

martos wrote:Could someone can post an h264 video (little) with wotks with v4l2m2m , if possible in 1080P ?
( because i see the drivers ask to jpeg api before fail, i want to see if it's the same with h264 )
get here:

https://peach.blender.org/trailer-page/
https://durian.blender.org/download/

martos
Posts: 85
Joined: Fri Jun 29, 2018 12:42 am
languages_spoken: english
ODROIDs: MC1
Has thanked: 0
Been thanked: 0
Contact:

Re: FFMPEG released with MFC acceleration

Unread post by martos » Thu Jul 05, 2018 2:02 am

I don't see h264 files in this link ...
Someone have one ?

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest