Transcode DVB enigma2 receiver with XU4 with ffmpeg

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

Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by martos » Fri Jun 29, 2018 1:08 am

For me i use it when i am in hotel , some channels is not in the tv so i make a nat ( my extrenal ip to the internal device ip , easy with only http flux ) and i can see it on my cell phone or my laptop.

With this low bandwith i can use 3g or more to see it ( 350Kbs )

In my first test in use a Raspberry pi 3, with the the hardware decoder ( the hardware decoder have some bug , decoders: h264_mmal , encoders: h264_omx ) we can transcode to 320*240.

But i see on Odroid MC1 in some used site, so i buy it, because the exynos 5520 is more powerfull, and odroid make a new dev for hardware decode ... and we can transcode to 512*384 (and more in futur*)

For price the 2 hardware :
Raspberry Pi 3 Model B+ Desktop Starter Kit (16Gb) = 60 €
ODROID-HC1(same xu4 without hdmi) +sd 16Gb+power = 70 €
ODROID-XU4 +sd 16Gb+power = 85 €

Odroid could be a good choice BUT , *for the moment the hardware decoder of odroid have bug on the MPEG4 ( so we use only cpu : h264_v4l2m2 mdon't decode mpeg4, know issue : only H.264 video format at this moment. MPEG4/MPEG2 video decoding is very unstable, so we must force to use software encoder/decoder )

Raspberry Pi 3 Model B+ is good but the cpu is low ... but with hardware decoder/encoder is ok
Don't use wifi network , but only rj45 cable.

With this 2 hardware we can't decode 4k ( for the moment for the Odroid XU4 family )

How to install XU4 or ODROID-HC1

No compil, just install ... Go :

We use Ubuntu 18.04 (20180531)
https://wiki.odroid.com/odroid-xu4/os_i ... buntu_4.14
(read the release note )

install :
https://wiki.odroid.com/odroid-xu4/gett ... tall_linux

After we install e2transcoder (the web GUI) and ffmpeg ( http://e2transcoder.sharetext.net/how-t ... ranscoder/ )

apt install mali-fbdev
apt-get install ffmpeg
apt-get install apache2
apt-get install libav-tools
apt-get install zip
apt-get install mc
apt-get install zip
apt-get install php
apt-get install libapache2-mod-php
apt-get install sqlite
apt-get install php-sqlite3
apt-get install php-xml

wget http://e2transcoder.sharetext.net/wp-co ... er_072.zip
copy in the zip the repertories/DB/*.*to /var/www/html/ ( is use mc for this )
so you must have in /var/www/html/
/admin
/stream
index.html (original )
index.php
rm /var/www/html/admin/config.php
cp /var/www/html/admin/config_linux.php /var/www/html/admin/config.php

edit /var/www/html/admin/config.php ( for me mc -e /var/www/html/admin/config.php )

$conf["callreceiver"] = 1; // if enigma2 receiver is not used must be 0, but it is not mandatory if re ceiver is used
$conf["stream_dir"]="/var/www/html/stream/"; //full path of stream dir
$conf["command"] = "/usr/bin/ffmpeg"; // path of avconv or ffmpeg executable , if avconv of ffmpeg installed from package only need executable name
$conf["stream_web_dir"] = "/stream/"; //web url folder of stream
//enigma2 receiver configuration
$conf["db_username"] = "root"; //enigma2 user name
$conf["db_password"] = "YYYYYY"; //enigma2 password
$conf["db_ip"] ="192.168.ZZZ.ZZZ"; //enigma2 IP
$conf["parameters"] = "-threads 16 -vcodec h264 -i {stream_url} -s 512x384 -vf fps=21 -maxrate:v 400k -bufsize:v 60000k -ac 1 -ar 22050 -vbr 1 -sn {stream_dir}ystream.m3u8";
$conf["stream_log"] = "/var/log/stream.log" ; //full path of avconv or ffmpeg log

Folders /admin/db and /stream/ should be writable by web server. In case of apache this is user apache for nginx www-data.

chown -R www-data /var/www/html/
chmod -R 755 /var/www/html/
touch /var/log/stream.log
chown www-data /var/log/stream.log

Little bug with slqlite ( need to add in Odroid section too )

find sqlite3.so ( for me locate sqlite3.so )
In raspeberry :
/usr/lib/php/20151012/sqlite3.so

find php.ini ( /etc/php/7.2/apache2/php.ini )
in this file find section
[sqlite]
and change :
[sqlite3]
sqlite3.extension_dir =/usr/lib/php/20170718/sqlite3.so


It's finish !



Go your browser http://ip_of_receiver/index.php
Put Login / pass ( put in config.php )
Go in "Settings" section
click on "Reload E2 Playlist"
Come back on "Channels"
Choose your Channel by click
in top you must have
TV:namechanel
namechanel
(be carefull you can not show tv and transcode other channel if it's not in the same transpondeur )
the 3 line you can see "Preparing" after some times "Runing"( you can check tail -f /var/log/stream.log )
Go to "Live" section and click on the play icon. (or put the link in vlc )



http://e2transcoder.sharetext.net/screenshots/



Have Fun

the +
Easy to install
price
Low bandwith

The -
The Gui is not complet : can't zap, some iptv d'ont work (parameter, in manual it's works) , can't see log, some parameters is not manageable ... and not secur ... If someone can work on this
Last edited by martos on Fri Jun 29, 2018 3:39 pm, edited 1 time in total.

User avatar
rooted
Posts: 6509
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 34 times
Been thanked: 13 times
Contact:

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by rooted » Fri Jun 29, 2018 3:51 am

Amazing second post, thank you for sharing.

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by odroid » Fri Jun 29, 2018 9:55 am

Thank you for the nice guide.
But the screenshots link is broken.

User avatar
meveric
Posts: 10179
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, N2
Has thanked: 10 times
Been thanked: 81 times
Contact:

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by meveric » Fri Jun 29, 2018 2:15 pm

all links are broken ;)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by mad_ady » Fri Jun 29, 2018 2:59 pm

If cleaned up a bit it might make an interesting article for the magazine

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by martos » Fri Jun 29, 2018 3:40 pm

I edit the post and put the good link.
Could you help me to clean the post ?

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by mad_ady » Fri Jun 29, 2018 3:47 pm

If you want to submit it as an article you should PM @robroy and he or his team of editors will help you with the layout and text. Regarding instructions - you should make sure the commands are accurate and you're not skipping any steps that seem trivial to you (other users might miss them).

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by martos » Fri Jun 29, 2018 4:29 pm

Could someone can test in Odroid c2 ( i don't know if we have HW decoder) but with parameters in config.php :
$conf["parameters"] = "-threads 4 -i {stream_url} -s 320x240 -vf fps=22 -maxrate:v 400k -bufsize:v 60000k -ac 1 -ar 22050 -vbr 1 -sn {stream_dir}ystream.m3u8";

with tail -f /var/log/stream.log
( if you can copy/past the log here )
you must be more than 1 realtime speed with 22 or 23 fps
and if you can make a top cpu and check how many it's use by ffmpeg

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

Re: Transcode DVB enigma2 receiver with XU4 with ffmpeg

Unread post by martos » Fri Jun 29, 2018 4:31 pm

Ok i try to clean up next week and test to start from the beginning to check if i don't forget something.

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 3 guests