F5F Stay Refreshed Software Operating Systems FFMPEG 'tee' command discards frames from both streams

FFMPEG 'tee' command discards frames from both streams

FFMPEG 'tee' command discards frames from both streams

K
Katisakat
Junior Member
15
09-16-2023, 02:22 AM
#1
FFMPEG is handling video input from RTMP, encoding it, and writing to a file while streaming online. When internet slows down, the live feed drops out briefly and duplicate frames appear locally. The issue isn't local processing speed but upload bandwidth limiting the process. You want local files to stay clean without duplicates, even if the stream quality suffers. Is there a method to prioritize local output quality and try streaming a copy when bandwidth is available, thus keeping local files pristine?
K
Katisakat
09-16-2023, 02:22 AM #1

FFMPEG is handling video input from RTMP, encoding it, and writing to a file while streaming online. When internet slows down, the live feed drops out briefly and duplicate frames appear locally. The issue isn't local processing speed but upload bandwidth limiting the process. You want local files to stay clean without duplicates, even if the stream quality suffers. Is there a method to prioritize local output quality and try streaming a copy when bandwidth is available, thus keeping local files pristine?

G
gymclo6
Member
187
09-16-2023, 06:23 AM
#2
I tried using ffmpeg with the 'tee' encoder, saving it locally while also sending it via RTMP to a different port. Then I ran another instance to capture the stream and copied the codec directly. The process took roughly 20 seconds due to delays.
G
gymclo6
09-16-2023, 06:23 AM #2

I tried using ffmpeg with the 'tee' encoder, saving it locally while also sending it via RTMP to a different port. Then I ran another instance to capture the stream and copied the codec directly. The process took roughly 20 seconds due to delays.

B
BrunoZed
Member
121
10-03-2023, 09:10 PM
#3
I'll wait for your instructions.
B
BrunoZed
10-03-2023, 09:10 PM #3

I'll wait for your instructions.

V
VebbiHD
Member
209
10-08-2023, 05:01 PM
#4
I possess a stream box with an RTMP server set up for receiving streams. On my gaming computer I run a minimal compression OBS instance that sends the feed to the box for processing before streaming. Environment settings are defined in a shell script, and the ffmpeg command runs like this: ffmpeg -loglevel $LOGLEVEL -analyzeduration $ANALYZEDUR -probesize $PROBESIZE -i rtmp://localhost/live/test -s "$INRES" -framerate "$FPS" -f tee -map 0 -flags +global_header -vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $MINRT -maxrate $MAXRT -pix_fmt yuv420p -s $OUTRES -preset $QUALITY -acodec copy -threads $THREADS -strict normal -bufsize $BUFSIZE "[onfail=ignore:f=flv]output-$DATETIME.flv|[f=flv]rtmp://localhost/live/test2 which should wait a few seconds for me to get OBS streaming to rtmp://localhost/live/test; this saves the stream to the hard drive and streams it to rtmp://localhost/live/test2 which is picked up by a second ffmpeg instance ffmpeg -loglevel $LOGLEVEL -analyzeduration $ANALYZEDUR -probesize $PROBESIZE -i rtmp://localhost/live/test2 -s "$INRES" -framerate "$FPS" -f tee -map 0 -flags +global_header -vcodec copy -acodec copy -strict normal -bufsize $BUFSIZE "[f=flv]$WEBSITENUMBERONE|[f=flv]$OTHERSTREAMSITES"] which should take around 30 seconds."
V
VebbiHD
10-08-2023, 05:01 PM #4

I possess a stream box with an RTMP server set up for receiving streams. On my gaming computer I run a minimal compression OBS instance that sends the feed to the box for processing before streaming. Environment settings are defined in a shell script, and the ffmpeg command runs like this: ffmpeg -loglevel $LOGLEVEL -analyzeduration $ANALYZEDUR -probesize $PROBESIZE -i rtmp://localhost/live/test -s "$INRES" -framerate "$FPS" -f tee -map 0 -flags +global_header -vcodec libx264 -g $GOP -keyint_min $GOPMIN -b:v $CBR -minrate $MINRT -maxrate $MAXRT -pix_fmt yuv420p -s $OUTRES -preset $QUALITY -acodec copy -threads $THREADS -strict normal -bufsize $BUFSIZE "[onfail=ignore:f=flv]output-$DATETIME.flv|[f=flv]rtmp://localhost/live/test2 which should wait a few seconds for me to get OBS streaming to rtmp://localhost/live/test; this saves the stream to the hard drive and streams it to rtmp://localhost/live/test2 which is picked up by a second ffmpeg instance ffmpeg -loglevel $LOGLEVEL -analyzeduration $ANALYZEDUR -probesize $PROBESIZE -i rtmp://localhost/live/test2 -s "$INRES" -framerate "$FPS" -f tee -map 0 -flags +global_header -vcodec copy -acodec copy -strict normal -bufsize $BUFSIZE "[f=flv]$WEBSITENUMBERONE|[f=flv]$OTHERSTREAMSITES"] which should take around 30 seconds."