FAQ  •  Register  •  Login

RTSP input and huge bitrate output,can I simply copy stream?

<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Thu Aug 11, 2022 11:03 am

RTSP input and huge bitrate output,can I simply copy stream?

Hi, i'ts almost easy to configure, but I don't undestand why it cannot just stream out exaclty (copy) of what comes in. I'm using it to display an rtsp to a LG tv. I've disabled transcoding and all possibile other features, as result it start ffmpeg process at 90% of CPU and rally high bit rates.
How can I correct it? I would tell ffmpeg to simply copy the stream out, as it is, thanks
Last edited by GiovanniG on Thu Aug 11, 2022 2:12 pm, edited 1 time in total.
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Thu Aug 11, 2022 2:11 pm

Re: RTSP input and huge bitrate output,can I simply copy str

At lower resolution, 640x360 150kb/sec, output about 2mbit. I've checked with VLC and the codec used for reencode is MPG1/2(!) wow
I'm looking for a way to simply copy the stream to output, without decoding/reencoding it. If there may be incompatibilities, I can correct the mp4 forat from the source.
Thank you for helping me
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Aug 11, 2022 4:47 pm

Re: RTSP input and huge bitrate output,can I simply copy str

What profile are you using in Serviio for your LG TV? You can see the profile assigned to each device in the Serviio console on the Status tab. It sounds like Serviio is detecting an unsupported codec and is transcoding based on the profile. While you said you've disabled all transcoding, do you have captions burn-in enabled? This overrides any transcoding setting, as it's required to burn in the captions.

Can you post the media info of a file that isn't playing as expected? There's a link in my sig line that describes how to get that info.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Fri Aug 12, 2022 3:14 pm

Re: RTSP input and huge bitrate output,can I simply copy str

Hi! Thank you a lot for kind answer!
I followed your suggestions, I've noticed I can assign a profile to each host.. I couldn't now it before because there was the "arrow" on the right inticating that was a menu for multichoice, I hope you can help next users by notify to choose it in their installations. I'll test it. For now all is "Generic DLNA profile" including the LG TV detected.

About captions I haven't undersood you completely, I've searched for this word in eavery menu and cannot find it. How can I burn in the captions?
Last edited by GiovanniG on Fri Aug 12, 2022 3:57 pm, edited 1 time in total.
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 12, 2022 3:26 pm

Re: RTSP input and huge bitrate output,can I simply copy str

On the Serviio console, there's a Delivery/Subtitles location. On that tab, there's a box labeled "Enable burned-in subtitles". If that box is checked, captions/subtitles are burned into the video stream, which requires transcoding.

Without knowing the content of the RTSP stream, I can't say what the stream content might include for codecs, or if there is a caption track included. Using the generic profile normally doesn't do any transcoding on anything, other than the caption burn-in I mentioned previously.

You can send a PM to another user by clicking their user name, and on their profile page select Send a Private Message.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Fri Aug 12, 2022 3:37 pm

Re: RTSP input and huge bitrate output,can I simply copy str

I cannot send private messages here because I am too young, have you Tested the link above I've sent you? Thanks! With subtype=1 you have a small stream of 640x360, for testing is lighter
I've found it, it's not checked, but I've disabled completely subtitles and so it's "grayed out", I cannot change it, I've ignored it because I didn't know a "grayed out" setting may have impact. ANyway in thea page is all blank

For now I have no results: VLC can't open MRL 'http://192.168.0.108:8895/resource/1000000020001498/MEDIA_ITEM/MPEG_PS_PAL-0/ORIGINAL'.
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 12, 2022 3:54 pm

Re: RTSP input and huge bitrate output,can I simply copy str

I can't make that URL work, so I'll need a more accurate URL to test. I can understand you not wanting to post it publicly, so no worries there. I don't know how many posts you need to send a PM, but maybe I can send you one and you can respond. I'll try that.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Fri Aug 12, 2022 3:57 pm

Re: RTSP input and huge bitrate output,can I simply copy str

Thank you for you kind help :)
Unfortunately I can't reply, since you're here I post it, then on your next reply I?ll edit the message
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 12, 2022 4:14 pm

Re: RTSP input and huge bitrate output,can I simply copy str

OK, I'm playing it now in VLC, so I removed your URL from the message.

I didn't use the low res version. The video is H.265/HEVC. If your TV is only 1080, it probably can't play it. Usually only a 4K player supports that video.

I loaded the link in Serviio on my test server. It accepted the link as valid, but I have been unable to play the link using either MediaBrowser (loads the image but won't play) or my Roku Premiere (says no supported video). Both devices are 4K, so I'll try using my Ultra 4800 and my LG TV downstairs later today. For now, VLC is the only player that has been successful playing it.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 12, 2022 4:40 pm

Re: RTSP input and huge bitrate output,can I simply copy str

I tried playing it in my Nvidia Shield, and the image would load, but only a bit of the image was visible. It wouldn't load the entire image, just a strip across the top. I could see the clock changing, so it was a live feed. Perhaps I should have stuck with the low-res image, but I already removed that from your post. :)
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Fri Aug 12, 2022 5:54 pm

Re: RTSP input and huge bitrate output,can I simply copy str

Please have a try more, thank you really a lot!:

the difference is last 1, which menas substream.
Try first with videolan, it should work.
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Fri Aug 12, 2022 8:12 pm

Re: RTSP input and huge bitrate output,can I simply copy str

OK, I tried the subtype=1 line, and it works perfectly in VLC and MediaBrowser. It would not load on my Samsung TV. No error shown, just a black screen and no indication of playback. Went in the bedroom and tried both the Shield (using Kodi as the player) and the Samsung in there. Neither would load the video. The Shield also has VLC installed, and it played on that version as well.

So, it seems to play through Serviio without an issue. There's probably something specific in the stream to cause the different players to not load it. While streaming in MediaBrowser, I checked the CPU usage and it was only running at 9%, so it's not transcoding the video stream. I'll try my LG TV later this afternoon just to see if it can play the stream, or if my more powerful Shield or Roku on that TV can play it.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Sun Aug 14, 2022 11:54 am

Re: RTSP input and huge bitrate output,can I simply copy str

Thank you a lot for your test! Have you tried to change the target TV IP as different models in Serviio, ike you suggested? Can it have impact on visualization? I suppose so.
The stream is h265, maybe becuase of that? For this reason I've set now the substream into h264, can you please test it again? In particular I'v changed 3 substream with 3 different encodings, h264, h264h, h264b, you just need to change the last part of the string with thise numbers
/cam/realmonitor?channel=3&subtype=1 for pure h264
/cam/realmonitor?channel=1&subtype=1 h264h
/cam/realmonitor?channel=4&subtype=1 h264b
/cam/realmonitor?channel=2&subtype=1 h265

Thank you a lot for your tests!
When you open the DLNA with VLC (under vew menu choose playlist, and scroll on left menu till you find), which encapsulation/compression you see? is it mpg1/2?
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Mon Aug 15, 2022 2:00 am

Re: RTSP input and huge bitrate output,can I simply copy str

So, I added the stream to channel 4. Streaming through Serviio with VLC as the player is showing MPEG1/2, and Serviio is indicating it is transcoding (the Now Playing icon is orange instead of green). My laptop is showing as using the Generic profile. Switching to Channel 1 shows the same. I then tried VLC on my Nvidia Shield, same results with both streams.

I looked more closely at the generic profile, specifically the Online Transcoding section. I did find a transcoding line that transcoded ALL rstp streams to MPEG-2 video. I tried changing it to H.264, which Serviio accepted. I then ran VLC again and saw that the codec changed correctly to H.264, so the line was being read correctly. Unfortunately, the only thing that changed with the bandwidth being used to stream the content. Using H.264 used a bit more bandwidth, but the image quality was better as well for the HD stream, which I would expect. However, even using H.264, the content was still not listed on my Roku player and my LG TV would not load the stream, instead giving an error. I searched the LG app store, but VLC is not an available app for the TV.

I tried commenting the rstp line completely out of the profile, but Serviio apparently can't stream that sort of media without transcoding. The files didn't appear on any player this way. It might be a DLNA limitation, I don't know.

However, I found something that worked on the LG TV. I used the web browser and logged into the MediaBrowser. I then selected the server, Online, and the HD test stream. Success! I am now watching the stream full stream directly on the LG, with no other player required. Using the web browser on the TV is a real pain without an actual keyboard, but once you enter the URL to the Serviio computer (I had to use the IP address, not the computer name) you should be able to save it as a bookmark, so you only have to go through that pain once. Of course, to use MediaBrowser you have to have the Pro (paid) version of Serviio. But at least I figured out a way to view it directly on the TV.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Thu Aug 18, 2022 9:40 pm

Re: RTSP input and huge bitrate output,can I simply copy str

Thank you for your extremely genererous passion trying to find a solution!
So as you also see, there are confirmed difficulties of Serviio with RTSP, I hope the authors may read this and care to improve, it should be possible..
I'll try your solution with the evaluation period.

On your last sucessful experiment, does Serviio re-encode the stream or simply copy it? I'm really looking for that becauase I want to use a small spare PC
Also, what about use a combination of ffmpeg + Serviio? Is it possible to convert from ffmpeg on something that Serviio can manage better?
Can ffmpeg do DLNA? I don't thin so, probably I need to use also miniDLNA, but it is for linux.. I don't have much experience on that
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Aug 18, 2022 11:44 pm

Re: RTSP input and huge bitrate output,can I simply copy str

GiovanniG wrote:On your last successful experiment, does Serviio re-encode the stream or simply copy it? I'm really looking for that because I want to use a small spare PC.

Also, what about use a combination of ffmpeg + Serviio? Is it possible to convert from ffmpeg on something that Serviio can manage better?
Can ffmpeg do DLNA? I don't thin so, probably I need to use also miniDLNA, but it is for linux.. I don't have much experience on that


Well, it appears it is encoding the stream into MPEG2, regardless what the incoming codec. However, MPEG2 requires far less power to transcode. I just started the H.264 stream, and it's currently playing in VLC. I know the stream is coming in as H.264. I just looked at the Task Manager on my test Serviio box, and I only see 5% CPU load, which means that FFMPEG (which does the transcoding for Serviio) is doing next to nothing. My test server is running Windows 10 on an AMD Phenom II X4 964 with 8 GB of RAM. Looking at the CPU grid, only two of the four cores have any activity at all, and it's miniscule at most. I think you could easily run this stream with a very simple old computer, whatever you have kicking around.

FFMPEG has versions for almost all operating systems. Most DLNA servers use either the freely available version of FFMPEG (which Serviio does) or they modify the code to suit their specific needs. But yes, FFMPEG is usually the heart of almost any DLNA server that offers transcoding. But FFMPEG by itself isn't a DLNA server. It's just the transcoding engine the server uses.
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Thu Sep 01, 2022 1:28 pm

Re: RTSP input and huge bitrate output,can I simply copy str

Hi mate, thanks to you I've solved the issue, I'm really grateful!
You gave me the right suggestions, once the source is h264 (it looks Serviio complain about "copy" to output an h265 stream, pity, maybe they need to improve that), and I converted it to h264, it's possible as you said to have it on output without transcoding, that that was the main part, bingo! I't enough as you said to change the profiles.xml file (if I do remember it right), telling it doesn't have to encode in mpeg2 but h264, writing h264 it's enough to avoid reencode (thanks god the author or ffmpeg were smart about it) and have it working at 0 CPU and at exactly stream bitrate of the origina source, another sign the stream is just copied.
I haven't time to test DLNA unfortunately, really it was critical for me, I'll report in case it may work. For now I used the mediabrowser and I've saved it to favourites, it still a bit long to open it back and choose full screen, but at list it works!
There may be anothr way to open it fullscreen? maybe open a particular string on browser, skipping all other steps?
<<

atc98092

User avatar

DLNA master

Posts: 5212

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state)

Post Thu Sep 01, 2022 11:21 pm

Re: RTSP input and huge bitrate output,can I simply copy str

GiovanniG wrote:There may be another way to open it fullscreen? maybe open a particular string on browser, skipping all other steps?

Glad you got it sorted. I am unaware of any way to open a specific item in MediaBrowser using a URL. The video player is embedded in the web page, but the video selection is done outside the player interface. You might be able to figure it out with a packet sniffer that can show the stream requested, but that's way outside my expertise. :P
Dan

LG NANO85 4K TV, Samsung JU7100 4K TV, Sony BDP-S3500, Sharp 4K Roku TV, Insignia Roku TV, Roku Ultra, Premiere and Stick, Nvidia Shield, Yamaha RX-V583 AVR.
Primary server: Intel i5-6400, 16 gig ram, Windows 10 Pro, 22 TB hard drive space | Test server Windows 10 Pro, AMD Phenom II X4 965, 8 gig ram

HOWTO: Enable debug logging HOWTO: Identify media file contents
<<

GiovanniG

Serviio newbie

Posts: 13

Joined: Wed Aug 10, 2022 11:18 am

Post Wed Oct 05, 2022 5:42 am

Re: RTSP input and huge bitrate output,can I simply copy str

Hi, I've noticed the video player enbedded it's buffering a lot, so while rtsp is displaying with a couple of seconds of dealy, with LG browser there may be up to 15 seconds. Insane for fideo surveillance..
DLNA is not working, that's probably a serviio bug

Return to LG

Who is online

Users browsing this forum: No registered users and 5 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.