ffmpeg transcode with cedrus


Recommended Posts

I have opi2 + (debian server)

marian@orangepiplus:~/FFmpeg$ cat /etc/*release
# PLEASE DO NOT EDIT THIS FILE
BOARD=orangepiplus
BOARD_NAME="Orange Pi+"
VERSION=5.24
LINUXFAMILY=sun8i
BRANCH=dev
ARCH=arm
IMAGE_TYPE=stable
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

I have gone through a lot of instructions, but without success.

I always end up on:

marian@orangepiplus:~$ sudo ffmpeg -i vlc.ts -pix_fmt nv12 -qp 20 -c:v cedrus264 -f null /dev/null


...    Stream #0:6[0x140f]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:7[0x14eb](slo): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
[cedrus264 @ 0xf2ca40] VE Open error.
Output #0, null, to '/dev/null':
    Stream #0:0: Video: h264, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 25 fps
    Metadata:
      encoder         : Lavc56.0.101 cedrus264
    Stream #0:1(slo): Audio: pcm_s16le, 0 channels
    Metadata:
      encoder         : Lavc56.0.101 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (cedrus264))
  Stream #0:1 -> #0:1 (mp2 (native) -> pcm_s16le (native))
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

...VE open error.

what am I doing wrong?

I went after this (  https://github.com/avafinger/ffmpeg_cedrus264_H3_Armbian_5.23 ) , even with custom compilation.

Somewhere is talk about "modprobe sunxi_cedar_mod", but I did not know what to do about the module.

Or, the module is not needed and support is directly in ffmpeg_cedrus?

???

or is the module only in desktop?

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

Just the few cents I can give to you:

  • differences CedarX/Cedrus: CedarX is the proprietary multimedia framework from Alwinner, which can only be used as a blackbox (http://linux-sunxi.org/CedarX). Support in linux for this is poor. Cedrus is the attempt to make an opensource implementation through reverse engineering of all this stuff. Its thanks to it that we have vdpau driver on linux for some alwinner devices (https://github.com/linux-sunxi/libvdpau-sunxi).
  • libcedrus for video encoding is currently very limited. If you plan to achieve something more than just fiddle and fun, just go for the x264 library for thanscoding h264. Properly set will give good performances.

Hope this helps

Link to post
Share on other sites
21 minutes ago, AntonioPisano said:

Just the few cents I can give to you:

  • differences CedarX/Cedrus: CedarX is the proprietary multimedia framework from Alwinner, which can only be used as a blackbox (http://linux-sunxi.org/CedarX). Support in linux for this is poor. Cedrus is the attempt to make an opensource implementation through reverse engineering of all this stuff. Its thanks to it that we have vdpau driver on linux for some alwinner devices (https://github.com/linux-sunxi/libvdpau-sunxi).
  • libcedrus for video encoding is currently very limited. If you plan to achieve something more than just fiddle and fun, just go for the x264 library for thanscoding h264. Properly set will give good performances.

Hope this helps

I wanted to test HW encoding, and I found only the Cedrus HW Encoder.

It is possible to transcode(stream to stream) video(h264) using x264 libray? Probably not.

 

Link to post
Share on other sites

I have advanced, but the results are not good.

A desktop is needed (/dev/cedar_dev). If you are doing ssh, an export display is needed "export DISPLAY=:0".

I have a problem uploading the video itself, after a short time (10s) ends with an error "Stream ends prematurely..."

marian@orangepiplus:~$ ffmpeg -hwaccel vdpau -i "http://192.168.1.125:4242/bysid/4905" -c:v rawvideo -an -f rawvideo raw.yuv
.
.
.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[h264 @ 0x7f6afe00] co located POCs unavailable
[h264 @ 0x7f672bd0] co located POCs unavailable
[http @ 0x7f60b920] Stream ends prematurely at 11811392, should be 18446744073709551615=11 drop=0 speed=0.555x    
http://192.168.1.125:4242/bysid/4905: Input/output error.60 bitrate=622080.0kbits/s dup=11 drop=0 speed=0.557x    
[h264 @ 0x7fd11560] error while decoding MB 42 10, bytestream -10
[h264 @ 0x7fd11560] concealing 6967 DC, 6967 AC, 6967 MV errors in P frame
http://192.168.1.125:4242/bysid/4905: Input/output error
    Last message repeated 3 times
http://192.168.1.125:4242/bysid/4905: Input/output error.84 bitrate=622080.0kbits/s dup=11 drop=0 speed=0.539x    
    Last message repeated 1 times
frame=  275 fps= 14 q=-0.0 Lsize=  835312kB time=00:00:11.00 bitrate=622080.0kbits/s dup=14 drop=0 speed=0.543x    
video:835312kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

On this .yuv file processed it is possible to apply a cedrus encoder...ok.

It is not possible for the decoder / encoder to work at the same time! (???).

 

Something similar is also written elsewhere, it's a shame I did not find it earlier.

 

 

Link to post
Share on other sites

Some comments:

  • If I understand correctly, you just want to dump a raw video from some source. In this case no transcoding should be required.
  • vdpau will help with decoding, not encoding. Encoding support is still very poor on sunxi devices AFAIK. If, as said before, you go for xh264 encoder, hardware encoding won't be required though.
  • as said before, for some practical tip of any kind, you should tell us the requirements of your experiment/application
Link to post
Share on other sites
Guest
This topic is now closed to further replies.