Transcoding Codec Error Rpi
Added by Manuel 3 about 6 years ago
Hi,
I've just setup tvh 4.2.4-dmo1~bpo9+1~rpt1 on raspbian stretch,
I can setup streaming but I get the following error when I use the Hardware-accelerated transcoding:
2018-11-25 20:47:26.349 subscription: 0149: "HTTP" subscribing on channel "", weight: 100, adapter: "SAT>IP DVB-S Tuner #2 (10.0.55.203)", network: "DVB-S Network", mux: "12544.75H", provider: "", service: "", profile="3G", hostname="10.0.58.1", client="VLC/3.0.3 LibVLC/3.0.3"
2018-11-25 20:47:26.674 transcode: 0003: 2:TELETEXT > Filtered
2018-11-25 20:47:26.674 transcode: 0003: 3:MPEG2VIDEO 720x576 > H264 480x384 (h264_omx)
2018-11-25 20:47:26.674 transcode: 0003: 4:MPEG2AUDIO ==> VORBIS (libvorbis)
2018-11-25 20:47:27.084 transcode: 0003: Using preset veryfast
2018-11-25 20:47:27.084 libav: Undefined constant or missing '(' in 'high'
2018-11-25 20:47:27.084 libav: Unable to parse option value "high"
2018-11-25 20:47:27.085 libav: Error setting option profile to value high.
2018-11-25 20:47:27.085 transcode: 0003: Unable to open h264_omx encoder
2018-11-25 20:47:27.085 transcode: 0003: Detected framedrop in audio
I've already got streaming working on another pi running LibreElec and the TVH Service Plugin,
but unfortunately my headless setup keeps bugging.
Thanks for any help!
Replies (29)
RE: Trnscoding Codec Error Rpi - Added by Mark Clarkstone about 6 years ago
Hardware transcoding isn't available for the Pi yet AFAIA. Although I've seen "Unable to parse option value "high"" before, please open an issue for it.
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
As I've said:
I have transcoding running flawlessly on a RPI 3 with LibreElec and a TVH Plugin from here: https://www.kodinerds.net/index.php/Thread/58252-LibreELEC-Tvheadend-mit-GPU-Transcoding/
But I'd like to have it running on bare raspbian...
RE: Trnscoding Codec Error Rpi - Added by Mark Clarkstone about 6 years ago
Manuel 3 wrote:
As I've said:
I have transcoding running flawlessly on a RPI 3 with LibreElec and a TVH Plugin from here: https://www.kodinerds.net/index.php/Thread/58252-LibreELEC-Tvheadend-mit-GPU-Transcoding/But I'd like to have it running on bare raspbian...
Thanks for the link, I'll look into this and get back to you, please bump this thread if I don't reply in a few days!
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
Thank you!
Here some more Info about the working TvH with Transcoding on LE:
HTS Tvheadend 4.2.6-7 ~ LibreELEC Tvh-addon v8.2.113
log when transcode starts:2018-11-26 10:34:59.252 mpegts: 12692H in DVB-S Network - tuning on Montage Technology DS3000 #0 : DVB-S #0
2018-11-26 10:34:59.335 subscription: 004C: "HTTP" subscribing on channel "", weight: 100, adapter: "Montage Technology DS3000 #0 : DVB-S #0", network: "DVB-S Network", mux: "12692H", provider: "", service: "", profile="3G", hostname="10.0.58.6", username="", client="VLC/3.0.4 LibVLC/3.0.4"
2018-11-26 10:34:59.769 transcode: Could not find requestd lang [gem] in stream, using first one
2018-11-26 10:34:59.770 transcode: 0001: 1:MPEG2VIDEO 720x576 > H264 720x576 (h264_omx)
2018-11-26 10:34:59.770 transcode: 0001: 2:MPEG2AUDIO > Passthrough
2018-11-26 10:34:59.770 transcode: 0001: 3:MPEG2AUDIO > Passthrough
2018-11-26 10:34:59.770 transcode: 0001: 4:AC3 > Passthrough
2018-11-26 10:34:59.828 transcode: 0001: 1:MPEG2VIDEO 720x576 > H264 720x576 (h264_omx)
2018-11-26 10:34:59.828 transcode: 0001: 2:MPEG2AUDIO > Passthrough
2018-11-26 10:34:59.828 transcode: 0001: 3:MPEG2AUDIO > Passthrough
2018-11-26 10:34:59.828 transcode: 0001: 4:AC3 > Passthrough
2018-11-26 10:35:00.861 transcode: 0001: Using preset ultrafast
2018-11-26 10:35:00.874 libav: Using OMX.broadcom.video_encode
2018-11-26 10:35:06.695 subscription: 004C: "HTTP" unsubscribing from "", hostname="10.0.58.6", username="", client="VLC/3.0.4 LibVLC/3.0.4"
I can also give you remote Access to this Rpi LibreElec via VNC and access to TVH if needed.
RE: Trnscoding Codec Error Rpi - Added by Mark Clarkstone about 6 years ago
Could you give me the build lines in About? it's under "toggle details".
Thanks.
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
Sure.
TvH 4.2.6 (working but on LibreElec):
Configure arguments:
--host=armv7ve-libreelec-linux-gnueabi --build=x86_64-linux-gnu --prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --localstatedir=/var --disable-static --enable-shared --prefix=/usr --arch=arm --cpu=cortex-a7 --cc=/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-gcc --disable-ffmpeg_static --disable-libfdkaac_static --disable-libopus_static --disable-libtheora --disable-libtheora_static --disable-libvorbis_static --disable-libvpx_static --disable-libx264_static --disable-libx265_static --enable-libav --enable-libfdkaac --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-libvpx --disable-libx265 --enable-avahi --enable-bundle --disable-dbus_1 --enable-dvbcsa --enable-dvben50221 --enable-hdhomerun_client --enable-hdhomerun_static --enable-epoll --enable-inotify --enable-pngquant --disable-libmfx_static --disable-nvenc --disable-uriparser --enable-tvhcsa --enable-trace --nowerror --disable-bintray_cache --python=/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/bin/python
Compiler:
Using C compiler: ccache /home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/bin/armv7ve-libreelec-linux-gnueabi-gcc
Using C flags: -march=armv7ve -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 -fomit-frame-pointer -Wall -pipe -Os -flto -ffat-lto-objects -I/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/ffmpegx-3.4/.INSTALL_PKG/usr/local/include -I/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/include/iconv -L/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/armv7ve-libreelec-linux-gnueabi/sysroot/usr/lib/iconv
Using LD flags: -march=armv7ve -mtune=cortex-a7 -Wl,--as-needed -fuse-ld=gold -fuse-linker-plugin -flto -L/home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/ffmpegx-3.4/.INSTALL_PKG/usr/local/lib -ldvbcsa -ldvben50221 -ldvbapi -lucsi
Build for arch: arm
Binaries:
Using PYTHON: /home/chewitt/LibreELEC.82-addons/build.LibreELEC-RPi2.arm-8.2-devel/toolchain/bin/python
Using GZIP: gzip
Using BZIP2: bzip2
Options:
pie yes
ccdebug no
cwc yes
capmt yes
constcw yes
linuxdvb yes
satip_server yes
satip_client yes
hdhomerun_client yes
hdhomerun_static yes
iptv yes
tsfile yes
dvbscan yes
timeshift yes
trace yes
imagecache yes
avahi yes
zlib yes
libav yes
ffmpeg_static no
libx264 yes
libx264_static no
libx265 no
libx265_static no
libvpx no
libvpx_static no
libtheora no
libtheora_static no
libvorbis yes
libvorbis_static no
libfdkaac yes
libfdkaac_static no
nvenc no
qsv no
libmfx_static no
inotify yes
epoll yes
uriparser no
ccache yes
tvhcsa yes
bundle yes
pngquant yes
dvbcsa yes
dvben50221 yes
kqueue no
dbus_1 no
android no
tsdebug no
gtimer_check no
slow_memoryinfo no
libsystemd_daemon no
bintray_cache no
execinfo yes
W_unused_result yes
getloadavg yes
atomic32 yes
atomic64 yes
atomic_time_t yes
bitops64 yes
lockowner yes
qsort_r yes
stime yes
gmtoff yes
recvmmsg yes
sendmmsg yes
libiconv yes
libdvben50221 yes
ifnames yes
py_gzip yes
bin_pkg_config yes
bin_xgettext yes
bin_msgmerge yes
bin_gzip yes
bin_bzip2 yes
ssl yes
linuxdvbapi yes
upnp yes
inotify_h yes
inotify_init1 yes
linuxdvb_ca yes
epoll_create1 yes
mpegts yes
mpegts_dvb yes
Packages:
openssl 1.0.2o
zlib 1.2.8
avahi-client 0.6.32
libavfilter 6.107.100
libswresample 2.9.100
libavresample 3.7.0
libswscale 4.8.100
libavformat 57.83.100
libavcodec 57.107.100
libavutil 55.78.100
Installation paths:
Prefix: /usr
Binaries: /usr/bin
Libraries: /usr/lib
Data files: ${prefix}/share
Man pages: ${datadir}/man@
the same for the debian stretch version: https://pastebin.com/EwVTVdTd
greetings
RE: Trnscoding Codec Error Rpi - Added by Mark Clarkstone about 6 years ago
I've sent an e-mail to CvH to ask for info on how Libreelec is able to do this so I can look into getting it on Raspbian, I hope I have the right address!
RE: Trnscoding Codec Error Rpi - Added by C vH about 6 years ago
You need at least the 4.3 builds from http://build.mycvh.de/ .
Unfortunately I had no idea that RPi transcoding works for Tvh at LE .
It was build with linking against a ffmpeg binary instead using tvh build in one (a holy mess with cross compiling). I only knew that the ffmpeg binary itself was supporting the rpi transcoding.
just have a look at the options used (there are x86_64/generic and rpi options)
https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/addon-depends/ffmpegx/package.mk#L41
for Tvh I use this options
https://github.com/CvH/LibreELEC.tv/blob/9.0/tvh-4.3/packages/addons/service/tvheadend42/package.mk#L21-L82
maybe some setting is missing somewhere for you ?
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
Thanks for your help guys!!
I'm currently trying to compile tvh with the presented options,
will report my status back
btw: I have a pi transcoding DVBS Content since 2015: https://tvheadend.org/boards/4/topics/16680?r=16778#message-16778
So it should be quite clear that the RPI3 is more than capable to do this
RE: Trnscoding Codec Error Rpi - Added by C vH about 6 years ago
I know that it is working with ffmpeg but I thought it is borked with Tvh for the RPi.
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
Thanks for your help,
compiling with the options from @CvH worked and transcodes fine!
(I used tvheadend-release-4.2)
./configure --disable-ffmpeg_static \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--sysconfdir=/etc \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--localstatedir=/var \
--disable-static \
--enable-shared \
--prefix=/usr \
--arch=arm \
--cpu=cortex-a7 \
--disable-libfdkaac_static \
--disable-libopus_static \
--disable-libtheora \
--disable-libtheora_static \
--disable-libvorbis_static \
--disable-libvpx_static \
--disable-libx264_static \
--disable-libx265_static \
--enable-libav \
--enable-libfdkaac \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--disable-libvpx \
--disable-libx265 \
--enable-mmal \
--enable-omx \
--enable-avahi \
--enable-bundle \
--disable-dbus_1 \
--enable-dvbcsa \
--enable-dvben50221 \
--enable-epoll \
--enable-inotify \
--enable-pngquant \
--disable-nvenc \
--disable-uriparser \
--enable-tvhcsa \
--enable-trace \
--nowerror \
--disable-bintray_cache
Thank you guys!!
RE: Trnscoding Codec Error Rpi - Added by Mark Clarkstone about 6 years ago
Interestingly it does work, but only with 4.2 O.o. Anyway, I've updated #4572!
RE: Trnscoding Codec Error Rpi - Added by C vH about 6 years ago
I have also a lot reports that HW transcoding is broken for 4.3 at LE with recent (1-2months) changes (x86_64).
Not sure that this is the actually problem but maybe (no time yet to search the problem)
[ ERROR] transcode: 0003: Unable to find libx264 encoder
[ INFO] transcode: 0003: 1:H264 > Passthrough
[ INFO] transcode: 0003: 2:MPEG2AUDIO > AAC (aac)
[WARNING] libav: Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[WARNING] libav: Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
RE: Trnscoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
Unfortunately I still have hiccups every few seconds on the raspbian build...
I'm using 4.2.7-34~g036b9cbab now but I cannot see where they come from, tvh doesn't log any errors.
gpu_mem is set to 256
Is there something tuned differently in libreelec?
RE: Transcoding Codec Error Rpi - Added by C vH about 6 years ago
we have an highly optimised build for RPi, but that shouldn't be the problem
maybe too old drivers/versions ?
RE: Transcoding Codec Error Rpi - Added by Manuel 3 about 6 years ago
I'm using a Sat>Ip receiver as a box so there shouldn't be any driver issues?
Only difference I see is the ffmpeg version, but LE reports something about version 8.?
Anyways I blame it on a propably fauly Power Supply, but it is remote, I get back there in a few days
RE: Transcoding Codec Error Rpi - Added by C vH about 6 years ago
depending, LE9 ships soon with ffmpeg 4.1, currently 4.0 for Tvh
RE: Transcoding Codec Error Rpi - Added by Martin Walter almost 6 years ago
I think this is a duplicate of #5308 and already fixed by @perexg in recent 4.2.7 and master branches. Maybe just build and try again...
RE: Transcoding Codec Error Rpi - Added by Manuel 3 almost 6 years ago
I still have hiccups on transcoded streams on a fresh raspbian and following the instructions from #4572
There is no error output and it seems as if the Pi cannot keep up with transcoding, CPU is at ~50% with a single DVB SD stream.
I also switched power supply, but still...
It's working fine on LE though :/
RE: Transcoding Codec Error Rpi - Added by Manuel 3 almost 6 years ago
C vH wrote:
use LE
hehe, yeah that would be the easiest solution ;)
I'd really like to run this on vanilla raspbian to test if HD is also possible, and I really don't need kodi.bin running on this one
i debugged the transcoding now for a bit and the only line which keeps popping up is:
mpegts: too much queued table input data (over 2MB), discarding new
(goes up to 50MB over time, the webui is frozen at that point)
RE: Transcoding Codec Error Rpi - Added by C vH almost 6 years ago
and I really don't need kodi.bin running on this one
just to add (if someone else read it) you can add an
systemctl stop kodi
to the autoexec.sh to work "headless" - it works and is used a lot even we don't promote it
RE: Transcoding Codec Error Rpi - Added by Martin Walter almost 6 years ago
@C vH
Kudos for what you've achieved. These static dependencies are driving me crazy building for all the various Synology platforms with outdated kernel and driver versions as well. Are you actually integrating all those static ffmpeg patches in the dynamic versions you are linking or are you just "ignoring" them? Any advice appreciated.
RE: Transcoding Codec Error Rpi - Added by C vH almost 6 years ago
We are building Tvh against https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/addon-depends/ffmpegx/package.mk
nothing else is added.
Hint, don't use the Tvh included ffmpeg etc versions - thats a gigantic pain in the ass at cross compiling, we did this before and it worked horrible.
Build ffmpeg "nativly" btw crosscompile it and link Tvh against it. That works well and makes no difference at the end.
RE: Transcoding Codec Error Rpi - Added by Martin Walter almost 6 years ago
Cheers, mate. We stopped building ffmpeg statically more than a year ago as well. Gigantic PITA being the reason. :-)
Synology is still supporting ARM5, ARM7, ARM8, powerpc (qoriq), x86 and 64 platforms, partially with massively outdated kernels. I'll look at your link. Maybe some of your configuration carries over. Thanks again!