Page 1 of 1

RTSP > 1920 x 1080 --> HDMI?

Posted: Fri Dec 21, 2018 5:20 pm
by TheWaterbug
I want to render the video from my BeeCam onto my HDTV via my Pi. The BeeCam outputs rtsp. The problem is that my BeeCam is a Reolink RLC-423S with a _minimum_ output resolution of 2304 x 1296, which is larger than the maximum size of 1920 x 1080 that omxplayer can handle.

I do have ffmpeg running on this same Pi, acting as a relay station to send the BeeCam video (and some audio) to my YouTube channel, but that instance is just repackaging and pushing, not resizing or encoding:

Code: Select all

./ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "rtsp://anonymous:[email protected]:554" -f concat -safe 0 -i playlist.txt -vcodec copy -acodec copy -t 01:47:02 -f flv "rtmp://a.rtmp.youtube.com/live2/my-youtube-streaming-key"
I can try using ffmpeg to scale or crop the video (whichever uses less CPU) and send it to omxplayer, but I'm not sure how to do that. I saw this post that says omxplayer doesn't use standard pipes, but I couldn't get mkfifo to work, possibly because I have the syntax wrong. I'm not sure which parts of this example from that page are literals and which are placeholders :D :

Code: Select all

(mkfifo streamer;  ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 -f alsa -ac 2 -i pulse streamer)& omxplayer streamer
I tried this:

Code: Select all

(mkfifo /tmp/blah;  ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "anonymous:[email protected]:554" -f concat -safe 0 -i playlist.txt -vcodec copy -acodec copy -t 01:47:02 -f flv  streamer)& omxplayer /tmp/blah
(where 192.168.1.9 is my _other_ Reolink camera that outputs 1920 x 1080, so I can test the basic setup before I attempt to resize the larger video), but I get nothing on the TV.

I assume I have some sort of syntax error there, but since I'm just copying and pasting I'm not sure where!

Or is there another, better way of rendering a larger rtsp stream out through the HDMI?

Thanks!

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Tue Dec 25, 2018 6:11 am
by TheWaterbug
I had a typo/copy-o in my previous post. I'm now trying

Code: Select all

(mkfifo /tmp/blah;  ffmpeg -re -thread_queue_size 512 -rtsp_transport tcp -i "rtsp://anonymous:[email protected]:554" -f concat -safe 0 -i playlist.txt -vcodec copy -acodec copy -t 01:47:02 -f flv  /tmp/blah)& omxplayer /tmp/blah
This results in the console outputting:

Code: Select all

[2] 22986
ffmpeg version N-89882-g4dbae00bac Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1) 20170516
  configuration: 
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  5.101 / 58.  5.101
  libavdevice    58.  0.101 / 58.  0.101
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101

and /tmp containing:
blah
omxplayerdbus.pi
omxplayerdbus.pi.pid

but still no video on the screen. Copying and pasting rtsp://anonymous:[email protected]:554 results in video that's 1920 x 1072, so the URL is good, and the camera is live.

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Tue Dec 25, 2018 9:01 am
by 6by9
The hardware h264 acceleration has a hard limit on the width of 2048 pixels. Sorry, there is no getting around that one.
Real-time software decoding or encoding of hd h264 is unlikely to be practical even on a 3b+ - it generally requires too much processing for the Arm processing power available.

If you can drop the resolution at which your camera streams then you may be able to get it to work, but at 2304 wide it will not hardware decode.

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Thu Jan 10, 2019 9:33 pm
by TheWaterbug
^^
Ah, thank you for replying, and on Christmas, too!

I didn't realize there was a HW limitation for ffmpeg as well.

Is there a height limitation?

This makes me even grumpier that my brand-new RLC-410 doesn't support 2048x1536. Reolink removed that in favor of 2304x1296 "since that's also 3 MP."

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Fri Sep 20, 2019 6:26 pm
by TheWaterbug
6by9 wrote:
Tue Dec 25, 2018 9:01 am
The hardware h264 acceleration has a hard limit on the width of 2048 pixels. Sorry, there is no getting around that one.
Real-time software decoding or encoding of hd h264 is unlikely to be practical even on a 3b+ - it generally requires too much processing for the Arm processing power available.

If you can drop the resolution at which your camera streams then you may be able to get it to work, but at 2304 wide it will not hardware decode.
Hi! Does any of this change with the new Pi4? I see that the specs read "H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)" but I can't tell whether it can handle higher frame sizes at lower frame rates. I don't really care that much about frame rate, and 15 fps would be just fine with me if it could handle larger video.

Thanks!

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Fri Sep 20, 2019 7:28 pm
by 6by9
Not with hardware encode. It's still the same h264 encoder block, so the hard limit around 1920 wide still exists.
The arm cores may be sufficiently powerful to cope with software encoding your video stream depending on frame rate. It's hard to predict, so try it and see.

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Sat Nov 09, 2019 8:53 pm
by whocares_ido
Reolink 420 also supports a resolution of 2048x1536. Is this not available for Reolink 410?

I was not able to play a 2048x1536 stream properly but I have not played with all available encoding options yet.

Is the height of 1536 too much for the raspberry pi or is there a chance that it could handle this stream if I change the encoding settings?

I could change the maximum bitrate, the h264 profile (base, main, high) and frame rate.

Re: RTSP > 1920 x 1080 --> HDMI?

Posted: Thu Nov 14, 2019 12:06 pm
by clarc
Have you tried VLC. I think it is accelerated. There are several plugins for it and it is very powerful player. The only problem is
audio file play is skippy. Not good. So I use smplayer for audio files. Video/audio works great with VLC.











Kodi Lucky Patcher nox