mvinson
Posts: 5
Joined: Wed Oct 10, 2018 6:12 pm

Re: Real Time Transcoding of DVB TV Streams

Wed Oct 10, 2018 8:37 pm

Testing this out with a RPi3B+ with Stretch and a multicast udp MPEG2TS stream coming from an HDHomerun TECH3-US commercial tuner.

So far omxplayer can see the stream and play it, but rtranscode spits out an error that no stream can be found.

Code: Select all

[email protected]:~ $ omxplayer -i udp://@239.255.1.18:59004
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
Input #0, mpegts, from 'udp://@239.255.1.18:59004':
  Duration: N/A, start: 65745.995333, bitrate: N/A
  Program 3
    Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired)
have a nice day ;)
[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
no element with name "stream" found
[email protected]:~ $

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

Re: Real Time Transcoding of DVB TV Streams

Thu Oct 11, 2018 10:11 am

mvinson wrote:
Wed Oct 10, 2018 6:19 pm
Hi,

I am testing this out on a RPi3b+ with Raspbian Stretch and a multicast udp stream coming directly out of an HDHomerun tuner. So far omxplayer sees and plays the streams but rtranscode is not having any luck.

output from omxplayer

Code: Select all

[email protected]:~ $ omxplayer -i udp://@239.255.1.18:59004
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
[mpeg2video @ 0xcd13e0] Invalid frame dimensions 0x0.
Input #0, mpegts, from 'udp://@239.255.1.18:59004':
  Duration: N/A, start: 65745.995333, bitrate: N/A
  Program 3
    Stream #0:0[0x31]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bottom first), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0:1[0x34](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:2[0x35](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired)
have a nice day ;)
output from rtranscode with same uri

Code: Select all

[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
no element with name "stream" found
The stream is mpeg2 and I have the license activated for mpeg2.

Thanks for your help!
How large is your GPU memory size (in /boot/config.txt)?
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

mvinson
Posts: 5
Joined: Wed Oct 10, 2018 6:12 pm

Re: Real Time Transcoding of DVB TV Streams

Thu Oct 11, 2018 3:44 pm

gpu_mem=192 in my current /boot/config.txt

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

Re: Real Time Transcoding of DVB TV Streams

Fri Oct 12, 2018 6:28 am

mvinson wrote:
Thu Oct 11, 2018 3:44 pm
gpu_mem=192 in my current /boot/config.txt
OK.
The error message means that the gstreamer tool chain throws an error. To get more information use
export GST_DEBUG=1
and then run your rstranscode command line.
Post the result here.
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

User avatar
Cr4z33
Posts: 10
Joined: Fri Oct 12, 2018 3:30 pm

Re: Real Time Transcoding of DVB TV Streams

Fri Oct 12, 2018 3:43 pm

I don't know if this is an off topic question, but does anybody know if this can be used with MagicMirror? :?

I am planning to build a smart mirror for the bathroom and I would love to add also a TV window in it streaming from my Linux based decoder (Vu+ Duo 2).

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

Re: Real Time Transcoding of DVB TV Streams

Fri Oct 12, 2018 5:25 pm

Cr4z33 wrote:
Fri Oct 12, 2018 3:43 pm
I don't know if this is an off topic question, but does anybody know if this can be used with MagicMirror? :?

I am planning to build a smart mirror for the bathroom and I would love to add also a TV window in it streaming from my Linux based decoder (Vu+ Duo 2).
You won't need it. If the smart mirror is connected to your network, you can display the TV stream. Transcoding won't be required,
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

User avatar
Cr4z33
Posts: 10
Joined: Fri Oct 12, 2018 3:30 pm

Re: Real Time Transcoding of DVB TV Streams

Fri Oct 12, 2018 5:27 pm

gkreidl wrote:
Fri Oct 12, 2018 5:25 pm
Cr4z33 wrote:
Fri Oct 12, 2018 3:43 pm
I don't know if this is an off topic question, but does anybody know if this can be used with MagicMirror? :?

I am planning to build a smart mirror for the bathroom and I would love to add also a TV window in it streaming from my Linux based decoder (Vu+ Duo 2).
You won't need it. If the smart mirror is connected to your network, you can display the TV stream. Transcoding won't be required,
Alright thanks and sorry for the off topic.

mvinson
Posts: 5
Joined: Wed Oct 10, 2018 6:12 pm

Re: Real Time Transcoding of DVB TV Streams

Wed Oct 17, 2018 9:33 pm

Here is the output of the command with GST_DEBUG enabled:

Code: Select all

[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
0:00:00.012090781  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "udpsrc"
0:00:00.012243021  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "tsdemux"
0:00:00.012285365  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected](nil)]
0:00:00.015281250  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "ac3parse"
0:00:00.015365469  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.015414375  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "matroskamux"
0:00:00.015452292  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected](nil)]
0:00:00.015624375  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "mpegvideoparse"
0:00:00.015662344  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.037512031  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected]]
0:00:00.038166823  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "h264parse"
0:00:00.038470000  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.038687240  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected]]
0:00:00.039114584  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1141:priv_gst_parse_launch: No src-element named "demux" - omitting link
0:00:00.039202552  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1141:priv_gst_parse_launch: No src-element named "demux" - omitting link
0:00:00.039532761  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1155:priv_gst_parse_launch: No sink-element named "(null)" - omitting link
no element with name "stream" found

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

Re: Real Time Transcoding of DVB TV Streams

Wed Oct 17, 2018 10:16 pm

mvinson wrote:
Wed Oct 17, 2018 9:33 pm
Here is the output of the command with GST_DEBUG enabled:

Code: Select all

[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
0:00:00.012090781  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "udpsrc"
0:00:00.012243021  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "tsdemux"
0:00:00.012285365  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected](nil)]
0:00:00.015281250  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "ac3parse"
0:00:00.015365469  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.015414375  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "matroskamux"
0:00:00.015452292  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected](nil)]
0:00:00.015624375  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "mpegvideoparse"
0:00:00.015662344  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.037512031  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected]]
0:00:00.038166823  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:716:priv_gst_parse_yyparse: no element "h264parse"
0:00:00.038470000  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.038687240  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:801:priv_gst_parse_yyparse: link has no source [[email protected]]
0:00:00.039114584  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1141:priv_gst_parse_launch: No src-element named "demux" - omitting link
0:00:00.039202552  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1141:priv_gst_parse_launch: No src-element named "demux" - omitting link
0:00:00.039532761  8557   0x919d40 ERROR           GST_PIPELINE grammar.y:1155:priv_gst_parse_launch: No sink-element named "(null)" - omitting link
no element with name "stream" found
Some important gstreamer parts are missing (not installed). Page 11 of the manual contains a list if all required gstreamer packages.
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

mvinson
Posts: 5
Joined: Wed Oct 10, 2018 6:12 pm

Re: Real Time Transcoding of DVB TV Streams

Thu Oct 18, 2018 11:02 pm

Installed the missing pieces from page 11 of the manual. Getting closer I think but still getting some weird errors.

Code: Select all

[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
0:00:00.605452812   746 0x6fd024c0 ERROR            omxvideodec gstomxvideodec.c:980:gst_omx_video_dec_reconfigure_output_port:<omxmpeg2videodec-omxmpeg2videodec0> Failed to negotiate RGBA for EGLImage
New connection 172.27.1.16:41424
Starting to stream to 172.27.1.16:41424
New connection 172.27.1.16:41425
Starting to stream to 172.27.1.16:41425
Removing connection 172.27.1.16:41424
Removing connection 172.27.1.16:41425
0:00:04.140079634   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
New connection 172.27.1.16:41427
Starting to stream to 172.27.1.16:41427
Removing connection 172.27.1.16:41427
0:00:07.505510935   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
New connection 172.27.1.16:41428
Starting to stream to 172.27.1.16:41428
Removing connection 172.27.1.16:41428
New connection 172.27.1.16:41429
Starting to stream to 172.27.1.16:41429
Removing connection 172.27.1.16:41429
New connection 172.27.1.16:41434
Starting to stream to 172.27.1.16:41434
Removing connection 172.27.1.16:41434
New connection 172.27.1.16:41435
Starting to stream to 172.27.1.16:41435
0:00:18.211666868   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
0:00:18.250203378   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
0:00:18.293377597   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
Removing connection 172.27.1.16:41435
0:00:18.774606764   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
0:00:18.786809524   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0520, now size 131072

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

Re: Real Time Transcoding of DVB TV Streams

Thu Oct 25, 2018 2:34 pm

mvinson wrote:
Thu Oct 18, 2018 11:02 pm
Installed the missing pieces from page 11 of the manual. Getting closer I think but still getting some weird errors.

Code: Select all

[email protected]:~ $ rtranscode -h=8  -v=19 -t=udp://239.255.1.18:59004
Unknown=udp://239.255.1.18:59004 hd3 ac3:0x34,ac3:0x35
Starting to transcode
Size: 1280x720  VBR: 3M  ABR: original AC3
Deinterlace: off Scaler: Soft,NN
Listening on http://127.0.0.1:9080/xyz.mkv
Starting pipeline
0:00:00.605452812   746 0x6fd024c0 ERROR            omxvideodec gstomxvideodec.c:980:gst_omx_video_dec_reconfigure_output_port:<omxmpeg2videodec-omxmpeg2videodec0> Failed to negotiate RGBA for EGLImage
New connection 172.27.1.16:41424
Starting to stream to 172.27.1.16:41424
New connection 172.27.1.16:41425
Starting to stream to 172.27.1.16:41425
Removing connection 172.27.1.16:41424
Removing connection 172.27.1.16:41425
0:00:04.140079634   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
New connection 172.27.1.16:41427
Starting to stream to 172.27.1.16:41427
Removing connection 172.27.1.16:41427
0:00:07.505510935   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
New connection 172.27.1.16:41428
Starting to stream to 172.27.1.16:41428
Removing connection 172.27.1.16:41428
New connection 172.27.1.16:41429
Starting to stream to 172.27.1.16:41429
Removing connection 172.27.1.16:41429
New connection 172.27.1.16:41434
Starting to stream to 172.27.1.16:41434
Removing connection 172.27.1.16:41434
New connection 172.27.1.16:41435
Starting to stream to 172.27.1.16:41435
0:00:18.211666868   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
0:00:18.250203378   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
0:00:18.293377597   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0400, now size 65536
Removing connection 172.27.1.16:41435
0:00:18.774606764   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
0:00:18.786809524   746 0x6fe4ee00 ERROR            omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0520, now size 131072
Sorry, I must have missed this one.
Only the first error message is important. I'm not sure about it. Did you enable the experimental OpenGL server? (I never use it).

The later error messages are not really errors, as the fragmented buffers are handled by the 6by9 patches.
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

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

Re: Real Time Transcoding of DVB TV Streams

Thu Oct 25, 2018 2:36 pm

I've updated the rtranscode 4.0 package to contain my latest mumudvb release (no other changes).
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

gigo1988
Posts: 40
Joined: Wed Sep 07, 2016 11:38 pm

Re: Real Time Transcoding of DVB TV Streams

Sun Nov 18, 2018 9:44 pm

Hello Gkreidl,

is it possible to set the Output to interlaced and no deinterlaced?

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

Re: Real Time Transcoding of DVB TV Streams

Mon Nov 19, 2018 1:00 am

gigo1988 wrote:
Sun Nov 18, 2018 9:44 pm
Hello Gkreidl,

is it possible to set the Output to interlaced and no deinterlaced?
No, the ouput is always progressive. For SD streams you can use doubled deinterlacing, which turns transforms a 576i50 into 576p50, using both half pictures of the interlaced original in turn. It's not possible for interlaced HD streams.
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”