Jump to content


Photo

Transcoding only for some receiver, but why ?


  • Please log in to reply
101 replies to this topic

Re: Transcoding only for some receiver, but why ? #41 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 11 June 2017 - 10:06

ok what i understand , if i try to change something ( resolution , sound ... ) it use cpu and it's bad ...

so :

sudo /usr/src/ffmpeg/ffmpeg -c:v h264_mmal -i http://192.168.0.28:...:EEEE0000:0:0:0: -c:v h264_omx -c:a copy -b:v 500k /home/pi/outputfile9.mp4

it's best result ( cpu 50 % max fps 22 )

BUT

i have randomly some error "PES packet size mismatch" with some cut ...

If i look on google , new version of ffmpeg worrect it ...

I must look more details , but i think i must compile again  ...



Re: Transcoding only for some receiver, but why ? #42 Erik Slagter

  • PLi® Core member
  • 46,951 posts

+541
Excellent

Posted 11 June 2017 - 10:09

the topic was about encoder not decoder.

Also, ffmpeg doesn't have an interface to the STB encoding api, so as soon as you start using ffmpeg, it will all run on the cpu (software).

Edited by Erik Slagter, 11 June 2017 - 10:09.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Transcoding only for some receiver, but why ? #43 Dimitrij

  • PLi® Core member
  • 9,993 posts

+338
Excellent

Posted 11 June 2017 - 10:25

https://forums.openp...-db-transcoder/


GigaBlue UHD Quad 4K /Lunix3-4K/Solo 4K


Re: Transcoding only for some receiver, but why ? #44 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 11 June 2017 - 10:51

find and correct the error ....

It's my fault = Overclock to heavy

reduce to 1350 and gpu 550 and ... works perfect ...

 

For hd51 with only armv7 works with all channel not HD

If we want it in HD we must have hardware decoder and if possible hardware encoder.

 

For Raspberry i continue teh test and i want to test db transcoder for raspberry after .



Re: Transcoding only for some receiver, but why ? #45 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 11 June 2017 - 13:37

One question :

 

The HD51 can make PiP at 576i , could we have this transcode ?

in this case the cpu is enough to transcode 576i to 320x240 ...



Re: Transcoding only for some receiver, but why ? #46 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 11 June 2017 - 15:07

The drivers don't give us access to it. So answer is no.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: Transcoding only for some receiver, but why ? #47 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 11 June 2017 - 20:50

I make new compil ( i want all the codec to make test and use last version )

 

sources :
https://discourse.os...detection/37137
https://trac.ffmpeg....ionGuide/Ubuntu

i make some correction ...


mkdir $HOME/sources
mkdir $HOME/sources/ffmpeg
mkdir $HOME/ffmpeg_build

sudo apt-get update
sudo apt-get install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev yasm libx264-dev cmake mercurial libmp3lame-dev libopus-dev


## not include so compile : libfdk-aac-dev

cd $HOME/sources/ffmpeg

wget -O fdk-aac.tar.gz https://github.com/m.../tarball/master
tar xzvf fdk-aac.tar.gz
cd mstorsjo-fdk-aac*
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

cd $HOME/sources/ffmpeg

## X265 : libfdk-aac-dev

cd $HOME/sources/ffmpeg

sudo apt-get install cmake mercurial
cd $HOME/sources/ffmpeg
hg clone https://bitbucket.or...ticoreware/x265
cd $HOME/sources/ffmpeg/x265/build/linux

I'm seeing the same problem with a Raspberry Compute Module 3 and I manually patched CMakeLists.txt
change -mcpu=native by -mcpu=cortex-a53 -mfpu=neon-vfpv4

PATH="$HOME/bin:$PATH" cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install



## Compile Raspberry Pi hardware de-/encoder (MMAL and OMX)

cd $HOME/sources/ffmpeg
sudo apt-get install git
git clone git://github.com/raspberrypi/userland
cd userland
./buildme


## ffmpeg all options

cd $HOME/sources/ffmpeg
wget http://ffmpeg.org/re...napshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --pkg-config-flags="--static" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-mmal  --enable-decoder=mpeg2_mmal --enable-decoder=mpeg4_mmal --enable-decoder=h264_mmal --enable-decoder=vc1_mmal --enable-omx-rpi --enable-encoder=h264_omx
make -j4
make install
make distclean


test :

/home/pi/sources/ffmpeg/ffmpeg/ffmpeg -version
ffmpeg version N-86424-g2e44126 Copyright © 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Raspbian 4.9.2-10)
configuration: --pkg-config-flags=--static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-mmal --enable-decoder=mpeg2_mmal --enable-decoder=mpeg4_mmal --enable-decoder=h264_mmal --enable-decoder=vc1_mmal --enable-omx-rpi --enable-encoder=h264_omx
libavutil      55. 63.100 / 55. 63.100
libavcodec     57. 98.100 / 57. 98.100
libavformat    57. 73.100 / 57. 73.100
libavdevice    57.  7.100 / 57.  7.100
libavfilter     6. 91.100 /  6. 91.100
libswscale      4.  7.101 /  4.  7.101
libswresample   2.  8.100 /  2.  8.100
libpostproc    54.  6.100 / 54.  6.100


 



Re: Transcoding only for some receiver, but why ? #48 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 11 June 2017 - 21:06

Yes best result with this compile !



Re: Transcoding only for some receiver, but why ? #49 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 12 June 2017 - 09:48

Ok now the server who receive the stream flux ... another unknow for me, so i check all the way to stream and i look for server : ( if i put xxx it's beacause i don't know ... )

 

RTMP
-f flv "rtmp://192.168.1.2/live/stream"
server : https://www.linux-pr...ls/rtmp-server/

MPEG TS on UDP
-f mpegts udp://127.0.0.1:1234
server : XXX

MPEG TS ON HTTP
http://127.0.0.1:8090/test.ffm
server : xxx

MPEG-TS over RTP
-f rtp_mpegts rtp://127.0.0.1:1234
server : xxx

m3u8 Playlist (HLS)
-force_key_frames expr:gte(t,n_forced*5) -hls_time 5 -f hls  -f hls -y "C:\stream.m3u8"
server : xxx

MPEG DASH
-f dash -y "C:\stream.mpd"
server : xxx

RTSP
-flags:a +global_header -rtpflags +latm -c:v libx264 -pix_fmt yuv420p -crf 23 -s 320x240 http://127.0.0.1:8090/test.ffm
server : xxx

 



Re: Transcoding only for some receiver, but why ? #50 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 12 June 2017 - 13:18

error with sound of dvb :

http://git.videolan....5884fe806a13a21

must compile again ....



Re: Transcoding only for some receiver, but why ? #51 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 13 June 2017 - 12:40

Some news

https://www.raspberr...d7606e190f9e7da

So i install crtmpserver ( be carefull the soft is stopped and lot of trouble with conf file and log )

and i test it ...

 

Next point is install http://e2transcoder..../author/andris/



Re: Transcoding only for some receiver, but why ? #52 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 13 June 2017 - 21:37

ok crtmpserver ok view stream ok:

 

Flux in enter : ( CHANNEL NRJ12 1080HD )

ffmpeg -threads 8 -c:v h264_mmal -i http://192.168.0.28:...:EEEE0000:0:0:0: -c:v h264_omx -c:a copy -c:a libmp3lame -ac 1 -f flv -metadata streamName=myStream tcp://0.0.0.0:6666

 

Flux read : (windows )

C:\ffmpeg\bin\ffplay -an "rtmp://192.168.0.19/flvplayback/myStream live=1"

 

for the moment i don't find with VLC ... if you have an idea ...

 

If you prefer you can make a web server with script to see the video on web page in your raspberry ( https://www.raspberr...hp?f=43&t=45368 )



Re: Transcoding only for some receiver, but why ? #53 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 14 June 2017 - 18:54

Find for windows VLC

 

C:\ffmpeg\rtmpdump\rtmpdump -v -r "rtmp://192.168.0.19/flvplayback/myStream" --live -o - | "C:\Program Files (x86)\VideoLAN\VLC\VLC.exe" -

 

if you find other solution without rtmpdump ...

 

Now install e2 transcoder ...



Re: Transcoding only for some receiver, but why ? #54 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 16 June 2017 - 23:05

ok some news :

I receive the new electric power 3a of raspberry pi3

and NOW the transcoding works at 25 ftp at 1080HD perfectly :

config.txt works for me

core_freq=580
arm_freq=1380
over_voltage=4
disable_splash=1
gpu_mem=320
temp_limit=75
sdram_freq=460

 

ffmpeg -benchmark -threads 4 -c:v h264_mmal -i http://192.168.0.28:...:EEEE0000:0:0:0: -c:v h264_omx -s 320x240 -pix_fmt yuv420p -bufsize 3000k -c:a libmp3lame -ac 1 -ar 22050 -f flv -metadata streamName=myStream tcp://0.0.0.0:6666

 

with this parameters i have 25 fps and stay under 300 K /s ! so perfect for my smartphone where i am not at home ...

 

For e2trancoder

 

config.php

 $conf["parameters"] = "-i {stream_url} -c:a aac -q:a 1 -strict experimental -c:v libx264 -crf {crf}  -profile:v baseline -filter:v yadif -vf \"scale=trunc(oh*a/2)*2:min({width} \,iw)\" -r 24 -map 0:a:{audio_id} -map 0:v:0 -hls_time 10 -hls_wrap 6 {stream_dir}ystream.m3u8";
to

 $conf["parameters"] = "-threads 4 -c:v h264_mmal -i {stream_url} -c:v h264_omx -s 320x240 -pix_fmt yuv420p -bufsize 3000k -c:a libmp3lame -ac 1 -ar 22050  {stream_dir}ystream.m3u8";

 

Go to test ...


 



Re: Transcoding only for some receiver, but why ? #55 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 17 June 2017 - 00:00

some old channel in mpeg2 we must change to

 $conf["parameters"] = "-threads 4l -i {stream_url} -c:v h264_omx -s 320x240 -pix_fmt yuv420p -bufsize 3000k -c:a libmp3lame -ac 1 -ar 22050  {stream_dir}ystream.m3u8";

 

...



Re: Transcoding only for some receiver, but why ? #56 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 17 June 2017 - 11:20

ok because we can't choose the config depanding the channel, we must use th auto find decoder of ffmpeg  of so i this case we must don't use the parameters : -c:v h264_mmal ( hardware decoders but only x264 )

so i try

ffmpeg -threads 8 -i http://192.168.0.28:...:EEEE0000:0:0:0: -c:v h264_omx -s 480x330 -b:v 350k -c:a libmp3lame -ac 1 -ar 22050 -f flv -metadata streamName=myStream tcp://0.0.0.0:6666

and works for all channel

 

the change can be -s 480x330 and -b:v 350k , first is resolution size and second video bandwith .

In my home i have adsl connexion and 2 children and i wife SO i can only use 380 k in upload before a war ( adsl is asynchronous my upload the uplaod become your download where your are external so 1 M max so only 380 K )

 

test in progress ..
 



Re: Transcoding only for some receiver, but why ? #57 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 20 June 2017 - 19:07

OK now works with beautifull WeB GUI of e2transcoder ! ( thank's to the autor for this works and help)

Bug 1

the h264_omx dont works with m3u8

so

Bug 2

we use the h264_mmal and libx264 (sofwarre ) it's works with mpeg4 channels but not mpeg2 channel ...

we are working on it

 

For now my config file :

 

 cat /var/www/html/admin/config.php
<?php
  //mandatory configuration
 $conf["username"] = "root"; //username to access DB transcoder
 $conf["password"] = "xxxxxxxxxx"; //password to access DB transcoder
 $conf["callreceiver"] = 1; // if enigma2 receiver is not used must be 0, but it is not mandatory if receiver is used
 $conf["stream_dir"]="/var/www/html/stream/"; //full path of stream dir
 $conf["db_stream_port"]="8001"; //enigma2 stream port
 $conf["command"] = "/usr/local/bin/ffmpeg";   // path of avconv or ffmpeg executable , if avconv of ffmpeg installed from package only need executable name
 //$conf["command"] = "avconv";   // 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"] = "xxxxxxxx"; //enigma2 password
 $conf["db_ip"] ="192.168.0.28"; //enigma2 IP
 $conf["db_web_port"]="80"; //enigma2 WEB interface port

 // Advanced settings
 $conf["parameters"] = "-c:v h264_mmal -i {stream_url} -b:v 350k  -c:a libmp3lame -ac 1 -ar 22050 -s 320x240 -sn {stream_dir}ystream.m3u8";
 $conf["database"] = "db/dbtranscode.db" ; //sqlite database path
 $conf["stream_log"] = "/var/log/stream.log" ; //full path of avconv or ffmpeg log

 //Bellow this line do not edit
 $conf["command"] =  $conf["command"] . " " . $conf["parameters"];
?>

 



Re: Transcoding only for some receiver, but why ? #58 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 20 June 2017 - 19:43

Little bug :

1)

failed to open vchiq instance

brutal solution :

sudo chmod 777 /dev/vchiq

2)

After long time :

"tvservice-client: Failed to connect to TV service:" -1

i think it's a powersave with hdmi

sudo shutdown -r now  ( ok ok i must find other solution )



Re: Transcoding only for some receiver, but why ? #59 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 20 June 2017 - 19:59

bug

1)

better solution : ( not make sudo chmod 777 /dev/vchiq after reboot )

sudo usermod -a -G video www-data



Re: Transcoding only for some receiver, but why ? #60 martossien

  • Senior Member
  • 97 posts

0
Neutral

Posted 20 June 2017 - 21:27

find solution to check the codex of flux

 

ffprobe http://192.168.0.28:...:EEEE0000:0:0:0: 2>&1 >/dev/null |grep Stream.*Video | sed -e 's/.*Video: //' -e 's/[, ].*//'

 

return :

 

h264
or mpeg2 channel :

 

return :

 

mpeg2video




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users