Ability to use passthrough from re-encoded streams going to one platform for another
Is your feature request related to a problem? Please describe. To reduce hardware burden on server, it would help out tremendously if the software could reuse the encoding work it was doing for one platform to send to another, or even the encoding work from the original stream it received if it was from a GPU vs x264
Describe the solution you'd like An option that would appear after already adding one platform for the software to send a stream to that would allow the second platform to receive the same stream encoding as the other platform. Meaning whatever work restreamer did to encode the receiving stream for the platform, it could reuse THAT work and send it to other platforms. There are multi-streaming plugins for OBS that implement this same feature
Describe alternatives you've considered The best I can come up with is making my stream to restreamer compatible with the most platforms and then using the passthrough feature that takes what was received and then passthrough to the applications that are compatible. Then only needing to setup encoding for the additional ones that need it. Another option could be to change the advance settings for the receiving stream in restreamer to encode it at that point and then push a passthrough to the platforms, but 2 issues become apparent with this:
- Based on what the gui shows me, passthrough is not possible for platforms that only need a cap on bitrate (no change to resolution). You will have to do another encoding for platforms that have smaller caps then others
- Passthrough is completely unavailable period if the original stream is a GPU encoded stream like NVEC or AV1. This is based on the GUI that does not give me the passthrough option for the incoming stream if it is from GPU encoders, this makes it seem like I am then re-encoding the receiving stream and then I can passthrough to platforms from there, but then of course the added cost would be to have to encode it for platforms that need it in addition to the re-encoding work I have to do from the start for the receiving stream if it's from a GPU encoder.
And so inherently I get a cost penalty for having my PC use nvidia encoders to stream to restreamer since it cannot passthrough those streams.
Additional context N/A
Business inquiries
N/A
You can try the the dev image of Restreamer, e.g. datarhei/restreamer:dev. In the advanced settings you can select a channel as a source. Also you're not limited anymore to encode to H264 for incoming streams. This might solve your problem.
You can try the the
devimage of Restreamer, e.g.datarhei/restreamer:dev. In the advanced settings you can select a channel as a source. Also you're not limited anymore to encode to H264 for incoming streams. This might solve your problem.
Hi, thank you so much for the reply, I was sup0er excited to try it and got this after I installed the dev image:
Is this bug specific to the docker container or the Host OS? I am using Unraid 7.0 on my server if that helps
Please clear the cache of your browser. Probably an old version of the UI is still in the cache.
Please clear the cache of your browser. Probably an old version of the UI is still in the cache.
Hi @ioppermann,
That worked, I used a different browser, but the next problem I had is that the :dev image complained that there was no encoder available to use on my server. So I took a guess and changed the tag cuda-latest to cuda-dev and that gave me a image that seems to see the encoders fine now. But when I set the incoming stream as passthrough to restreamer, it says no video and this is what the log shows me:
2025-01-24T22:27:18.000Z [info] ffmpeg version 7.1-datarhei-8e7c445-2025-01-09T10:51:26Z Copyright (c) 2000-2024 the FFmpeg developers 2025-01-24T22:27:18.000Z [info] built with gcc 13 (Ubuntu 13.2.0-23ubuntu4) 2025-01-24T22:27:18.000Z [info] configuration: --extra-version='datarhei-8e7c445-2025-01-09T10:51:26Z' --extra-libs='-lpthread -lxml2 -lm -lz -lsupc++ -lstdc++ -lssl -lcrypto -lc -ldl -lcurl' --prefix=/usr/local --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --enable-nonfree --enable-gpl --enable-version3 --enable-postproc --enable-static --enable-openssl --enable-libxml2 --enable-cuda --enable-cuda-llvm --enable-cuda-nvcc --enable-nvdec --enable-nvenc --enable-cuvid --enable-libnpp --enable-libv4l2 --enable-libfreetype --enable-alsa --enable-libsrt --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libfdk-aac --enable-libopus --enable-libvorbis --enable-libdav1d --enable-librav1e --enable-libaom --enable-libxcb --disable-ffplay --disable-ffprobe --disable-debug --disable-doc 2025-01-24T22:27:18.000Z [info] libavutil 59. 39.100 / 59. 39.100 2025-01-24T22:27:18.000Z [info] libavcodec 61. 19.100 / 61. 19.100 2025-01-24T22:27:18.000Z [info] libavformat 61. 7.100 / 61. 7.100 2025-01-24T22:27:18.000Z [info] libavdevice 61. 3.100 / 61. 3.100 2025-01-24T22:27:18.000Z [info] libavfilter 10. 4.100 / 10. 4.100 2025-01-24T22:27:18.000Z [info] libswscale 8. 3.100 / 8. 3.100 2025-01-24T22:27:18.000Z [info] libswresample 5. 3.100 / 5. 3.100 2025-01-24T22:27:18.000Z [info] libpostproc 58. 3.100 / 58. 3.100 2025-01-24T22:27:23.000Z [mpegts ] [warning] Could not find codec parameters for stream 0 (Video: hevc ([27][0][0][0] / 0x001B), none): unspecified size 2025-01-24T22:27:23.000Z Consider increasing the value for the 'analyzeduration' (5000000) and 'probesize' (5000000) options 2025-01-24T22:27:23.000Z [info] Input #0, mpegts, from 'srt://localhost:6000?mode=caller&transtype=live&latency=20000&streamid=894c06a5-7aab-4ea6-9fbd-155fdc799d27.stream,mode:request,token:xxxxx&passphrase=xxxxxx': 2025-01-24T22:27:23.000Z [info] Duration: N/A, start: 296.280000, bitrate: 4 kb/s 2025-01-24T22:27:23.000Z [info] Program 1 2025-01-24T22:27:23.000Z [info] Metadata: 2025-01-24T22:27:23.000Z [info] service_name : mpegts output 2025-01-24T22:27:23.000Z [info] service_provider: obs-studio 2025-01-24T22:27:23.000Z [info] Stream #0:0[0x100]: Video: hevc ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn 2025-01-24T22:27:23.000Z [info] Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 4 kb/s 2025-01-24T22:27:23.000Z [info] Stream mapping: 2025-01-24T22:27:23.000Z [info] Stream #0:0 -> #0:0 (copy) 2025-01-24T22:27:23.000Z [info] Stream #0:1 -> #0:1 (copy) 2025-01-24T22:27:23.000Z [info] hls.streammap:{"address":"http://admin:nyI4OGRY8bAR7ji4eT@localhost:8080/memfs/894c06a5-7aab-4ea6-9fbd-155fdc799d27_output_0.m3u8","variants":[{"variant":0,"address":"http://admin:nyI4OGRY8bAR7ji4eT@localhost:8080/memfs/894c06a5-7aab-4ea6-9fbd-155fdc799d27_output_0.m3u8","streams":[0,1]}]} 2025-01-24T22:27:23.000Z [hls ] [warning] Stream HEVC is not hvc1, you should use tag:v hvc1 to set it. 2025-01-24T22:27:23.000Z [info] Output #0, hls, to 'http://admin:nyI4OGRY8bAR7ji4eT@localhost:8080/memfs/894c06a5-7aab-4ea6-9fbd-155fdc799d27_output_0.m3u8': 2025-01-24T22:27:23.000Z [info] Metadata: 2025-01-24T22:27:23.000Z [info] title : http://OmegaV:8080/894c06a5-7aab-4ea6-9fbd-155fdc799d27/oembed.json 2025-01-24T22:27:23.000Z [info] service_provider: datarhei-Restreamer 2025-01-24T22:27:23.000Z [info] encoder : Lavf61.7.100 2025-01-24T22:27:23.000Z [info] Stream #0:0: Video: hevc ([27][0][0][0] / 0x001B), none, q=2-31, 90k tbr, 90k tbn 2025-01-24T22:27:23.000Z [info] Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 4 kb/s 2025-01-24T22:27:23.000Z [info] Press [q] to stop, [?] for help 2025-01-24T22:27:24.000Z [info] ffmpeg.mapping:{"graphs":[],"mapping":[{"input":{"index":0,"stream":0},"output":{"index":0,"stream":0},"copy":true},{"input":{"index":0,"stream":1},"output":{"index":0,"stream":1},"copy":true}]}
I tried streaming both h.264 and hvec to my server (prefer hevc if possible), both give the same result. This is after editing the channel settings to set it to passthrough. The thing that stood out to me was this line: Stream HEVC is not hvc1, you should use tag:v hvc1 to set it.
Not sure what that means for me to be able to take action to test.
For anybody wondering, I figured it out, the stream is still good, but the player in Restreamer is unable to actually play the video no matter what you do or change. But if you passthrough it to other stuff, the video stream itself is unaffected. I'll be putting up a setup video soon to show