Project

General

Profile

Transcoding of IPTV streams

Added by Markus Bichl over 6 years ago

Hello,

I try to setup a transcoding configuration with maximum one stream at a time. I want to transcode streams from a IPTV network to fit them my Upstream bandwidth of 5-10 MBit/s (depends on the LTE connection) for watching on my mobile phone.
I tried a lot configurations without success. I created a new user, with access to only a specific streaming profile (later all, as selecting the right profile worked). I tried to configure all 4 auto-generated streaming codecs. (setting bitrate to 3000 kBit/s or constant rate factor to values from 0 to max(VP8, H264)). But it seems, the only thing I can do is to make it worse. When I monitor the stream bandwidth when using the pass profile, a stream needs about 6000-7000 kBit/s. I never got it to lower this number with any other profile. (Sometimes it got more unstable and alternated between 6000kbit/s and 30000kbit/s).
I hope you can give me a tip!
My system:
Tvheadend 4.3-1249~g3515154
built from source with: AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static\ --enable-trace\ --enable-debug ./Autobuild.sh

Ubuntu 16.04LTS
AMD A8-5600K APU
8 GB DDR3
no separate GPU

Thank you in advance! :)


Replies (13)

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

How you watch on mobile device
with so small screen its not problem to use 1280x720
and bitrate can be ~2Mbps or less

video codec

some simple bitrates

read more

audio codec
select language for multi-language channels

then create
Profile

go to user you use
and set this profile to be only selectable by default

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

Hello,

thank you for your ultra fast response! :)

I think I did the right settings, but the bitrate is still at 6000kbit/s (sometimes up to 12000kbit/s)

Here are my settings:

5.jpeg (162 KB) 5.jpeg
4.jpeg (176 KB) 4.jpeg
3.jpeg (175 KB) 3.jpeg
2.jpeg (217 KB) 2.jpeg
1.jpeg (121 KB) 1.jpeg

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

You watching input to TVH server traffic,
this is from IPTV provider.
Client is on next tab Subscriptions,
there is a client traffic.

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

thank you

sometimes, the problem sits in front of the pc :D

so when the stream on the client pauses every 5-10 seconds and aborts after 2-3 minutes, my system is to slow in transcoding?

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

Did you enable "restart on error"
what is load of PC CPU/GPU
simple HTOP command

AMD A6-5400B with 4Gb ram no problem for 2 HD transcoded streams
to 480p de-interlaced

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

Hi,

Sorry for the late reply.

HTOP says about 35-50% CPU load while on stream is playing. No peaks to full load, always under 50%.

When I play with pass profile the web interface stream tab says the stream is playing with 0kbps input and 0 kbps output after a minute or two. when i play the stream with the mobile profile the stream plays well for a minute or two, than stops a second, then plays a second, then aborts(=> no stream in the stream tab left, with pass, a stream with 0kbps is listed).

I hope you can help me :)

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

Do you try to increase IPTV threads value

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

jep, changed it to 4 threads long time ago.

edit: also tried decreasing the stream quality to 480p 512kbps

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

situaion with
top -H

Do you try to build with standard parameters?

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

I took the build command from a youtube video^^ so no. what command should I use to build with default parameters?
EDIT: I startet a rebuild with ./Autobuild without arguments
EDIT2: reinstalled new build
EDIT3: same problem :'(
Thank you for your time! :)

top -H looks good to me

1.PNG (104 KB) 1.PNG

RE: Transcoding of IPTV streams - Added by saen acro over 6 years ago

just

cd tvheadend
git pull
./Autobuild.sh -j$(nproc)

for more information
https://tvheadend.org/boards/4/topics/24116

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

installed build 4.3-1252~g595fd17 (2018-05-03T19:30:58+0000)

still the same problem

Checking support/features
checking for cc execinfo.h ... ok
checking for cc -mmmx ... ok
checking for cc -msse2 ... ok
checking for cc -Wunused-result ... ok
checking for cc getloadavg ... ok
checking for cc atomic32 ... ok
checking for cc atomic64 ... ok
checking for cc atomic_time_t ... ok
checking for cc atomic_ptr ... ok
checking for cc bitops64 ... ok
checking for cc lockowner ... ok
checking for cc qsort_r ... ok
checking for cc stime ... ok
checking for cc gmtoff ... ok
checking for cc recvmmsg ... ok
checking for cc sendmmsg ... ok
checking for cc libiconv ... fail
^ using build-in glibc iconv routines
checking for cc ifnames ... ok
checking for cc cclang_threadsan ... fail
checking for py module gzip ... ok
checking for pkg-config ... ok
checking for xgettext ... ok
checking for msgmerge ... ok
checking for gzip ... ok
checking for bzip2 ... ok
checking for pkg openssl ... ok (detected 1.0.2g)
checking for cc linux/dvb/version.h ... ok
checking for pkg zlib ... ok (detected 1.2.8)
checking for pkg libpcre2-8 ... ok (detected 10.21)
checking for pkg liburiparser ... ok (detected 0.8.4)
checking for pkg avahi-client ... ok (detected 0.6.32-rc)
checking for cmake ... ok
checking for cc -lstdc++ ... ok
checking for pkg libva >=0.38.0 ... ok (detected 0.39.0)
checking for pkg libva-x11 >=0.38.0 ... ok (detected 0.39.0)
checking for pkg libva-drm >=0.38.0 ... ok (detected 0.39.0)
checking for cc sys/inotify.h ... ok
checking for cc inotify_init1 ... ok
checking for cc dvbcsa/dvbcsa.h ... ok
checking for cc -ldvbcsa ... ok
fetching dvb-scan files ... ok
checking for cc epoll_create1 ... ok
checking for pkg dbus-1 ... ok (detected 1.10.6)

Compiler:
Using C compiler: cc
Using LD flags: -ldvbcsa
Build for arch: x86_64

Binaries:
Using PYTHON: python
Using GZIP: gzip
Using BZIP2: bzip2

Options:
pie yes
ccdebug no
cardclient yes
cwc yes
cccam 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 yes
libx264 yes
libx264_static yes
libx265 yes
libx265_static yes
libvpx yes
libvpx_static yes
libtheora yes
libtheora_static yes
libvorbis yes
libvorbis_static yes
libfdkaac no
libfdkaac_static no
libopus yes
libopus_static yes
nvenc no
vaapi yes
mmal no
omx no
inotify yes
epoll yes
pcre no
pcre2 yes
uriparser yes
ccache no
tvhcsa yes
bundle no
pngquant no
kqueue no
dbus_1 yes
android no
gtimer_check no
slow_memoryinfo no
libsystemd_daemon no
bintray_cache yes
ddci yes
cclang_threadsan no
gperftools no
execinfo yes
mmx yes
sse2 yes
W_unused_result yes
getloadavg yes
atomic32 yes
atomic64 yes
atomic_time_t yes
atomic_ptr yes
bitops64 yes
lockowner yes
qsort_r yes
stime yes
gmtoff yes
recvmmsg yes
sendmmsg 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
linuxdvb_ca yes
upnp yes
bin_cmake yes
stdcpp yes
libogg_static yes
hwaccels yes
inotify_h yes
inotify_init1 yes
dvbcsa yes
epoll_create1 yes
mpegts yes
mpegts_dvb yes

Packages:
openssl 1.0.2g
zlib 1.2.8
libpcre2-8 10.21
liburiparser 0.8.4
avahi-client 0.6.32-rc
libva 0.39.0
libva-x11 0.39.0
libva-drm 0.39.0
dbus-1 1.10.6

Installation paths:
Prefix: /usr
Binaries: ${prefix}/bin
Libraries: ${prefix}/lib
Data files: ${prefix}/share
Man pages: /usr/share/man

Final Binary:
/home/administrator/tvheadend/tvheadend/build.linux/tvheadend

Tvheadend Data Directory:
/usr/share/tvheadend

RE: Transcoding of IPTV streams - Added by Markus Bichl over 6 years ago

Found the problem!
As long as I disable the firewall the stream works.

    (1-13/13)