gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Mon Oct 30, 2017 9:44 am

kazuko.nakamura wrote:
Sun Oct 29, 2017 3:11 pm
I've seen strange thing - when commercial appears, stream always stops.
Also stream stops when commercial changing from one to another.
I've seen this happen a few times, but regularly only on one channel. It may be caused by two things:

1) The encoding settings of the video stream change and the omx-decoder cannot handle it.

2) The channel sends a program change in the ts stream. I've seen this in my mumudvb logs and in some cases this stopped the transcoder.

You could try the following (not tested yet):
in config.py replace

Code: Select all

tsdemux parse-private-sections=false name=demux
by

Code: Select all

tsdemux parse-private-sections=false program-number=-1 name=demux
both in rt_av_template and rt_v_template
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

kazuko.nakamura
Posts: 52
Joined: Sun May 29, 2016 7:14 am

Re: Real Time Transcoding of DVB TV Streams

Mon Oct 30, 2017 10:00 pm

Finnaly is working !!! (so far)

This post will be conclusion of my struggle with RPi2 transcoding .ts stream and "how-to"

Equipment I've got:
1. RPi2 with mpeg licenses in config.txt
2. Last Jessie release from: http://downloads.raspberrypi.org/raspbi ... 017-07-05/
3. USB DVB Stick: Geniatech T230c (0572:c689) with CrazyCat drivers compiled. All working on DVB-C.
4. HTS Tvheadend 4.3-556~g9339e92, installed from mpmc repo.
5. Rtranscode with configuration changes.

How to (All making on raspberry):

1. After installing fresh Jessie we need to compile drivers: https://www.linuxtv.org/wiki/index.php/Geniatech_T230C
Not all procedure is necessary from link above if you have last Jessie release. Of course your DVB Stick can have drivers build in Jessie, so this step isn't necessary.

Code: Select all

sudo apt-get install raspberrypi-kernel-headers

git clone https://bitbucket.org/CrazyCat/media_build
cd media_build
./build --main-git

Go to: media_build/v4l/Makefile and comment this lines:
#ifeq ($(makefile-mm),1)
#-include $(obj)/Makefile.mm
#endif

sudo make install

2. Modify config.txt
Add this lines at the end file:

Code: Select all

gpu_mem=128
gpu_freq=500
h264_freq=500

decode_MPG2=.............
decode_WVC1=.............

3. Install TVheadend

Code: Select all

sudo nano /etc/apt/sources.list

add this line:
deb https://dl.bintray.com/mpmc/deb raspbianjessie stable-4.2

sudo apt-get update

sudo apt-get install tvheadend

After installation login to tvheadend via web browser with login and password from installation and create new user in Configuration > Users. New user must have all privilages like admin. After this you can open tvheadend in web browser with no login prompt. This is important step to have correct links to .ts streams from playlist below.

4. Configure yours tvheadend to have working channels (muxes, epg etc.) and save on disk channels "playlist". Change "playlist" file to "playlist.m3u":

Code: Select all

http://RASPBERRY_IP:9981/playlist

5. Install rtranscode:

Code: Select all

sudo apt-get install gstreamer1.0-libav gstreamer1.0-omx gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools

wget http://steinerdatenbank.de/software/transcoder3.tar.gz
tar -xzf transcoder3.tar.gz
cd transcoder3
sudo ./install

6. Make channels.dat from playlist.m3u (saved from tvheadend):

Code: Select all

rtranscode -i=playlist.m3u -o=channels.dat
Rtranscode will make channels.dat from playlist.m3u. Copy channels.dat to: /usr/local/share/rtranscode (overwrite oryginal file in this directory).


7. Modify "channels.dat":
Remove all text from "question mark" to "pass" for every channel:

Before:

Code: Select all

http://RASPBERRY_IP:9981/stream/channelid/784538894?ticket=B3A93347F43F3D6BC0D51F3E4BA3B756846B430A&profile=pass
After:

Code: Select all

CHANNEL_NAME=http://RASPBERRY_IP:9981/stream/channelid/784538894 hd2 mpeg 0x2f8

8. Modify "config.py"
Go to /usr/local/share/rtranscode and edit config.py file.
Change lines rt_av_template and rt_v_template to this lines:

rt_av_template:

Code: Select all

rt_av_template = 'http-launch $port$ $path$ video/x-matroska $runmode$ $source$ ! tsdemux parse-private-sections=false program-number=-1 name=demux demux.audio$apid$ ! queue max-size-buffers=0 max-size-time=0 ! $audioparser$ ! $audiodecoder$ ! audioconvert dithering=0 ! audio/x-raw,channels=$channels$ ! $audioencoder$ bitrate=$abr$ ! matroskamux name=stream streamable=true demux. ! queue max-size-buffers=0 max-size-time=0 ! $videoparser$ ! $videodecoder$ ! omxh264enc target-bitrate=$vbr$ control-rate=variable ! video/x-h264,stream-format=byte-stream,profile=high,width=$width$,height=$height$,framerate=$framerate$/1 ! h264parse ! queue max-size-buffers=0 max-size-time=0 ! stream.'

rt_v_template:

Code: Select all

rt_v_template = 'http-launch $port$ $path$ video/x-matroska $runmode$ $source$ ! tsdemux parse-private-sections=false program-number=-1 name=demux demux.audio$apid$ ! queue max-size-buffers=0 max-size-time=0 ! $audioparser$ ! matroskamux name=stream streamable=true demux. ! queue max-size-buffers=0 max-size-time=0 ! $videoparser$ ! $videodecoder$ ! omxh264enc target-bitrate=$vbr$ control-rate=variable ! video/x-h264,stream-format=byte-stream,profile=high,width=$width$,height=$height$,framerate=$framerate$/1 ! h264parse ! queue max-size-buffers=0 max-size-time=0 ! stream.'

Couple words of explain for above. I'm using Polish DVB muxes and they have some strange issue with rtranscode when commercial appear in stream - rtranscode stop working and transcoded stream stops. Beside adding "program-number=-1" I also add different queue: "queue max-size-buffers=0 max-size-time=0". I don't know nothing about gstreamer and I've got no idea what new queue does, but all is finally working with no stream stops.

Rtranscode is VERY GOOD soft. It offers hardware transcoding with resize with minimal CPU performance. Currently the only such solution on RPi. Of cousre tvheadend also offers hardware transcoding, but is not working on RPi yet and probably it take some time to have this ability in tvheadend (ffmpeg etc.).

gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Mon Oct 30, 2017 10:24 pm

Thanks for the detailed report and I'm glad that it's now working for you. I'll test the queue settings
max-size-buffers=0 max-size-time=0
in my own pipelines and if it works with all configurations I'll add them in the next release.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

marco.roman
Posts: 3
Joined: Wed Nov 08, 2017 1:28 am

Re: Real Time Transcoding of DVB TV Streams

Wed Nov 08, 2017 3:16 am

Hello
I recently found your amazing work. I've been trying to set this up so far unsuccessfully. No matter I use mumudvb or tvheadend as backend the issue for me is the same.

Code: Select all

pi@raspberrypi:~/transcoder3 $ omxplayer -i http://192.168.1.9:9981/stream/channelid/1229109989
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
Input #0, mpegts, from 'http://192.168.1.9:9981/stream/channelid/1229109989':
  Duration: N/A, start: 88450.096322, bitrate: N/A
  Program 1
  Program 2
    Stream #0:0[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m), 704x480 [SAR 40:33 DAR 16:9], Closed Captions, 29.97 fps, 29  .97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x43](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
  Program 4
have a nice day ;)
pi@raspberrypi:~/transcoder3 $ rtranscode -g=http://192.168.1.9:9981/stream/channelid/1229109989
Unknown=http://192.168.1.9:9981/stream/channelid/1229109989
Could not find a valid MPEG TS stream
pi@raspberrypi:~/transcoder3 $
  
Seems like rtranscode cannot find the stream even omx player does. Even adding r=10 does not help.
In tvheadend for example the log show the channel opens and closes the same when using either the omx player or rtranscode.

Code: Select all

2017-11-07 21:05:18.298 mpegts: 569.028MHz in ATSC-T - tuning on Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0
2017-11-07 21:05:18.299 subscription: 0092: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:18.996 subscription: 0093: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:19.091 subscription: 0092: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:26.350 subscription: 0093: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.102 mpegts: 569.028MHz in ATSC-T - tuning on Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0
2017-11-07 21:06:37.102 subscription: 0094: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.641 subscription: 0095: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.760 subscription: 0094: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:45.067 subscription: 0095: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
Anyone can give some suggestion on how I could troubleshoot this?
Thanks

gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Wed Nov 08, 2017 11:51 am

marco.roman wrote:
Wed Nov 08, 2017 3:16 am
Hello
I recently found your amazing work. I've been trying to set this up so far unsuccessfully. No matter I use mumudvb or tvheadend as backend the issue for me is the same.

Code: Select all

pi@raspberrypi:~/transcoder3 $ omxplayer -i http://192.168.1.9:9981/stream/channelid/1229109989
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
[mpeg2video @ 0xc79960] Invalid frame dimensions 0x0.
Input #0, mpegts, from 'http://192.168.1.9:9981/stream/channelid/1229109989':
  Duration: N/A, start: 88450.096322, bitrate: N/A
  Program 1
  Program 2
    Stream #0:0[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, smpte170m), 704x480 [SAR 40:33 DAR 16:9], Closed Captions, 29.97 fps, 29  .97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x43](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s
  Program 4
have a nice day ;)
pi@raspberrypi:~/transcoder3 $ rtranscode -g=http://192.168.1.9:9981/stream/channelid/1229109989
Unknown=http://192.168.1.9:9981/stream/channelid/1229109989
Could not find a valid MPEG TS stream
pi@raspberrypi:~/transcoder3 $
  
Seems like rtranscode cannot find the stream even omx player does. Even adding r=10 does not help.
In tvheadend for example the log show the channel opens and closes the same when using either the omx player or rtranscode.

Code: Select all

2017-11-07 21:05:18.298 mpegts: 569.028MHz in ATSC-T - tuning on Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0
2017-11-07 21:05:18.299 subscription: 0092: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:18.996 subscription: 0093: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:19.091 subscription: 0092: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:05:26.350 subscription: 0093: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.102 mpegts: 569.028MHz in ATSC-T - tuning on Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0
2017-11-07 21:06:37.102 subscription: 0094: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.641 subscription: 0095: "HTTP" subscribing on channel "Enc SD TVUNAM", weight: 100, adapter: "Auvitek AU8522 QAM/8VSB Frontend : ATSC-T #0", network: "ATSC-T", mux: "569.028MHz", service: "Enc SD TVUNAM", profile="pass", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:37.760 subscription: 0094: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
2017-11-07 21:06:45.067 subscription: 0095: "HTTP" unsubscribing from "Enc SD TVUNAM", hostname="192.168.1.9", client="Lavf/57.41.100"
Anyone can give some suggestion on how I could troubleshoot this?
Thanks
By default, rtranscode only supports typical European TV modes: sd1 (720x576i50, MPEG encoding), sd2 (720x576i50, h264 encoding), hd1 (720p50 , h264), hd2 (1080i50, h264).
The manual contains an example how you can add additional modes (in config.py) which in your case are needed.

I never got it to work with tvheadend, but kazuko.nakamura has published a tutorial above.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

marco.roman
Posts: 3
Joined: Wed Nov 08, 2017 1:28 am

Re: Real Time Transcoding of DVB TV Streams

Thu Nov 09, 2017 11:48 pm

Hello Again! After testing with the updated config.py as suggested I get the stream recognized. However I found new issue:

Code: Select all

pi@raspberrypi:~ $ rtranscode -t=http://192.168.1.5:9981/stream/channelid/1527590534
Unknown=http://192.168.1.5:9981/stream/channelid/1527590534 hd3 ac3 0x33
Starting to transcode
Size: 768x432  VBR: 1.05M  ABR: 64K AC3
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
Error Internal data stream error.
Is there any verbose mode or log I can check to see what is that the error is?

I got some debug from gstreamer:

Code: Select all

   pi@raspberrypi:~ $ http-launch --gst-debug-level=3 9080 /xyz.mkv video/x-matroska
efault souphttpsrc location="http://192.168.1.5:9981/stream/channelid/1527590534"
s-live=true keep-alive=true do-timestamp=true retries=1 typefind=true blocksize=16
84 ! tsdemux parse-private-sections=false name=demux demux.audio_0033 ! queue ! mp
gaudioparse ! mpg123audiodec ! audioconvert dithering=0 ! audio/x-raw,channels=2 !
avenc_aac compliance=-2 bitrate=65536 ! matroskamux name=stream streamable=true de
ux. ! queue ! mpegvideoparse ! omxmpeg2videodec ! omxh264enc target-bitrate=288000
control-rate=variable ! video/x-h264,stream-format=byte-stream,profile=high,width=
60,height=288,framerate=29.97/1 ! h264parse ! queue ! stream. 
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
0:00:02.486526562 13189  0x1ece580 ERROR            omxvideodec gstomxvideodec.c:3
30:gst_omx_video_dec_negotiate:<omxmpeg2videodec-omxmpeg2videodec0> Empty caps
0:00:02.490379621 13189  0x1ece580 WARN                GST_PADS gstpad.c:3742:gst_
ad_peer_query:<omxmpeg2videodec-omxmpeg2videodec0:src> could not send sticky event
0:00:02.499105684 13189  0x1ece580 WARN                GST_PADS gstpad.c:3742:gst_
ad_peer_query:<omxmpeg2videodec-omxmpeg2videodec0:src> could not send sticky event
0:00:02.546861712 13189  0x1ece580 WARN             omxvideodec gstomxvideodec.c:2
86:gst_omx_video_dec_loop:<omxmpeg2videodec-omxmpeg2videodec0> error: Internal dat
 stream error.
0:00:02.547482387 13189  0x1ece580 WARN             omxvideodec gstomxvideodec.c:2
86:gst_omx_video_dec_loop:<omxmpeg2videodec-omxmpeg2videodec0> error: stream stopp
d, reason not-negotiated
Error Internal data stream error.
pi@raspberrypi:~ $
   

I added this in my config.py

Code: Select all

rt_sd_video_sizes = {'0':"120x96",'1':"180x144",'2':"240x192",'3':"360x288",'4':"480x384",'5':"600x480",'6':"720x576",'7':"720x480",'8':"704x480"}

rt_hd_video_sizes = {'0':"256x144",'1':"512x288",'2':"768x432",'3':"910x512",'4':"1024x576",'5':"1280x720",'6':"1920x1080"}

rt_audio_bitrates = {'0':("0","original"),'1':("32768","32K"),'2':("65536","64K"),'3':("98304","96K"),'4':("131072","128K"),
                  '5':("163840","160K"),'6':("196608","192K"),'7':("262144","256K"),'8':("327680","320K"),
                  '9':("393216","384K"),'10':("458752","448K"),'11':("524288","512K"),'12':("655360","640K")}

rt_sd_modes = {'sd1':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'25','check':['mpeg2video','720x576','25 fps']},
            'sd2':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'25','check':['h264','720x576','25 fps']},
            'sd3':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','720x480','29.97 fps']},
            'sd4':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','704x480','29.97 fps']}
            }

rt_hd_modes = {'hd1':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'50','check':['h264','50 fps']},
            'hd2':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'25','check':['h264','25 fps']},
            'hd3':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','1920x1080','29.97 fps']},
            'hd4':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'29.97','check':['h264','1920x1080','29.97 fps']}
            }



gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Fri Nov 10, 2017 8:31 am

marco.roman wrote:
Thu Nov 09, 2017 11:48 pm
Hello Again! After testing with the updated config.py as suggested I get the stream recognized. However I found new issue:

Code: Select all

pi@raspberrypi:~ $ rtranscode -t=http://192.168.1.5:9981/stream/channelid/1527590534
Unknown=http://192.168.1.5:9981/stream/channelid/1527590534 hd3 ac3 0x33
Starting to transcode
Size: 768x432  VBR: 1.05M  ABR: 64K AC3
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
Error Internal data stream error.
Is there any verbose mode or log I can check to see what is that the error is?

I got some debug from gstreamer:

Code: Select all

   pi@raspberrypi:~ $ http-launch --gst-debug-level=3 9080 /xyz.mkv video/x-matroska
efault souphttpsrc location="http://192.168.1.5:9981/stream/channelid/1527590534"
s-live=true keep-alive=true do-timestamp=true retries=1 typefind=true blocksize=16
84 ! tsdemux parse-private-sections=false name=demux demux.audio_0033 ! queue ! mp
gaudioparse ! mpg123audiodec ! audioconvert dithering=0 ! audio/x-raw,channels=2 !
avenc_aac compliance=-2 bitrate=65536 ! matroskamux name=stream streamable=true de
ux. ! queue ! mpegvideoparse ! omxmpeg2videodec ! omxh264enc target-bitrate=288000
control-rate=variable ! video/x-h264,stream-format=byte-stream,profile=high,width=
60,height=288,framerate=29.97/1 ! h264parse ! queue ! stream. 
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
0:00:02.486526562 13189  0x1ece580 ERROR            omxvideodec gstomxvideodec.c:3
30:gst_omx_video_dec_negotiate:<omxmpeg2videodec-omxmpeg2videodec0> Empty caps
0:00:02.490379621 13189  0x1ece580 WARN                GST_PADS gstpad.c:3742:gst_
ad_peer_query:<omxmpeg2videodec-omxmpeg2videodec0:src> could not send sticky event
0:00:02.499105684 13189  0x1ece580 WARN                GST_PADS gstpad.c:3742:gst_
ad_peer_query:<omxmpeg2videodec-omxmpeg2videodec0:src> could not send sticky event
0:00:02.546861712 13189  0x1ece580 WARN             omxvideodec gstomxvideodec.c:2
86:gst_omx_video_dec_loop:<omxmpeg2videodec-omxmpeg2videodec0> error: Internal dat
 stream error.
0:00:02.547482387 13189  0x1ece580 WARN             omxvideodec gstomxvideodec.c:2
86:gst_omx_video_dec_loop:<omxmpeg2videodec-omxmpeg2videodec0> error: stream stopp
d, reason not-negotiated
Error Internal data stream error.
pi@raspberrypi:~ $
   

I added this in my config.py

Code: Select all

rt_sd_video_sizes = {'0':"120x96",'1':"180x144",'2':"240x192",'3':"360x288",'4':"480x384",'5':"600x480",'6':"720x576",'7':"720x480",'8':"704x480"}

rt_hd_video_sizes = {'0':"256x144",'1':"512x288",'2':"768x432",'3':"910x512",'4':"1024x576",'5':"1280x720",'6':"1920x1080"}

rt_audio_bitrates = {'0':("0","original"),'1':("32768","32K"),'2':("65536","64K"),'3':("98304","96K"),'4':("131072","128K"),
                  '5':("163840","160K"),'6':("196608","192K"),'7':("262144","256K"),'8':("327680","320K"),
                  '9':("393216","384K"),'10':("458752","448K"),'11':("524288","512K"),'12':("655360","640K")}

rt_sd_modes = {'sd1':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'25','check':['mpeg2video','720x576','25 fps']},
            'sd2':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'25','check':['h264','720x576','25 fps']},
            'sd3':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','720x480','29.97 fps']},
            'sd4':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','704x480','29.97 fps']}
            }

rt_hd_modes = {'hd1':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'50','check':['h264','50 fps']},
            'hd2':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'25','check':['h264','25 fps']},
            'hd3':{'videoparser':'mpegvideoparse','videodecoder':'omxmpeg2videodec','framerate':'29.97','check':['mpeg2video','1920x1080','29.97 fps']},
            'hd4':{'videoparser':'h264parse','videodecoder':'omxh264dec','framerate':'29.97','check':['h264','1920x1080','29.97 fps']}
            }


Are you running Raspbian Stretch?

Edit: To get debug output you can run
export GST_DEBUG="*:1"
from the same terminal before running rtranscode. Higher numbers are also possible.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

marco.roman
Posts: 3
Joined: Wed Nov 08, 2017 1:28 am

Re: Real Time Transcoding of DVB TV Streams

Fri Nov 10, 2017 10:21 pm

Hello!

Here my system info

Code: Select all

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

samuralast
Posts: 2
Joined: Wed Sep 06, 2017 7:51 am

Re: Real Time Transcoding of DVB TV Streams

Mon Dec 04, 2017 3:45 pm

Gkreidl,

Can you update us about your WebServer project, so that it rtranscode can be fully integrated into a webpage?

gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Mon Dec 04, 2017 4:17 pm

samuralast wrote:
Mon Dec 04, 2017 3:45 pm
Gkreidl,

Can you update us about your WebServer project, so that it rtranscode can be fully integrated into a webpage?
Not yet, I was too busy updating things for Stretch.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

booooob
Posts: 1
Joined: Tue Dec 05, 2017 11:26 am

Re: Real Time Transcoding of DVB TV Streams

Tue Dec 05, 2017 11:37 am

gkreidl wrote:
Mon Dec 04, 2017 4:17 pm
Not yet, I was too busy updating things for Stretch.
Have you been able now building working gstreamer for stretch which works with rtranscode?

gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Tue Dec 05, 2017 12:24 pm

booooob wrote:
Tue Dec 05, 2017 11:37 am
gkreidl wrote:
Mon Dec 04, 2017 4:17 pm
Not yet, I was too busy updating things for Stretch.
Have you been able now building working gstreamer for stretch which works with rtranscode?
No.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

kazuko.nakamura
Posts: 52
Joined: Sun May 29, 2016 7:14 am

Re: Real Time Transcoding of DVB TV Streams

Wed Dec 06, 2017 7:52 pm

Where can I find this WebServer project?

gkreidl
Posts: 5321
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Real Time Transcoding of DVB TV Streams

Wed Dec 06, 2017 10:06 pm

kazuko.nakamura wrote:
Wed Dec 06, 2017 7:52 pm
Where can I find this WebServer project?
Nowhere. It was planned for a future release of rtranscode.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Graphics, sound and multimedia”

Who is online

Users browsing this forum: madnerd and 12 guests