published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 out/cbr-6000.flv exit=0 | duration=60.033000 | size=46155345 | bit_rate=6150663 edge: test file (60 s FLV, 6000 kbps CBR + 128 kbps AAC) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/remux.mp4 exit=0 | duration=60.023152 | size=46157545 | bit_rate=6151965 edge: same stream remuxed to MP4 (OBS-style container, B-frames) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/noaudio.mkv exit=0 | duration=20.072000 | size=15191953 | bit_rate=6054983 edge: video only, Matroska, 20 s published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/short2s.flv exit=0 | duration=2.049000 | size=1851858 | bit_rate=7230289 edge: 2-second clip (too short) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/short3-5s.flv exit=0 | duration=3.582000 | size=3271581 | bit_rate=7306713 edge: 3.5-second clip (too short; the old version accepted it) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/clip12s.flv exit=0 | duration=12.049000 | size=9773825 | bit_rate=6489385 edge: 12-second clip (accepted) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/offset100.mkv exit=0 | duration=160.023000 | size=46085036 | bit_rate=2303920 edge: timestamps start at 100 s (output_ts_offset, 60 s of video): WRONG BY DESIGN, duration includes the offset (real 6.15 Mbps); use the second command published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/cut-from-10s.ts exit=0 | [h264 @ 0x64e4a533dfc0] non-existing SPS 0 referenced in buffering period | duration=20.064667 | size=15062372 | bit_rate=6005530 edge: 20 s cut from second 10 with stream copy (does not start at 0) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/empty.flv exit=1 | edge/empty.flv: Invalid data found when processing input edge: empty file published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/audioonly.m4a exit=0 | duration=20.015170 | size=324726 | bit_rate=129791 edge: audio only (no video packets) published: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 recording.flv as run: ffprobe -v error -show_entries format=duration,size,bit_rate -of default=nw=1 edge/missing.flv exit=1 | edge/missing.flv: No such file or directory edge: file that does not exist published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 out/cbr-6000.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 60, average 6.14 Mbps, busiest second 9.63 Mbps edge: test file (60 s FLV, 6000 kbps CBR + 128 kbps AAC) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/remux.mp4 | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 60, average 6.14 Mbps, busiest second 9.47 Mbps edge: same stream remuxed to MP4 (OBS-style container, B-frames) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/noaudio.mkv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 19, average 5.97 Mbps, busiest second 9.14 Mbps edge: video only, Matroska, 20 s published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/short2s.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | recording too short: need at least 10 seconds edge: 2-second clip (too short) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/short3-5s.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | recording too short: need at least 10 seconds edge: 3.5-second clip (too short; the old version accepted it) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/clip12s.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 12, average 6.49 Mbps, busiest second 9.63 Mbps edge: 12-second clip (accepted) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/offset100.mkv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 60, average 6.12 Mbps, busiest second 9.47 Mbps edge: timestamps start at 100 s (output_ts_offset, 60 s of video): handled, 6.12 Mbps against 6.14 for the unshifted file published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/cut-from-10s.ts | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | [h264 @ 0x64ae90aca0c0] non-existing SPS 0 referenced in buffering period | whole seconds 19, average 6.00 Mbps, busiest second 9.06 Mbps edge: 20 s cut from second 10 with stream copy (does not start at 0) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/empty.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=1 | edge/empty.flv: Invalid data found when processing input | no packets read: check the file name and that it is a video edge: empty file published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/audioonly.m4a | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=0 | whole seconds 19, average 0.13 Mbps, busiest second 0.13 Mbps edge: audio only (no video packets) published: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 recording.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' as run: ffprobe -v error -show_entries packet=dts_time,size -of csv=p=0 edge/missing.flv | awk -F, '$1 != "N/A" {v = $1 + 0; if (!seen || v < f) f = v; seen = 1; k = int(v); s[k] += $2*8/1e6; if (k > mx) mx = k} END {if (!seen) {print "no packets read: check the file name and that it is a video"; exit 1}; a = int(f); if (f - a > 0.1) a++; n = mx - a; for (i = a; i < mx; i++) {t += s[i]; if (s[i] > m) m = s[i]}; if (n >= 10) printf "whole seconds %d, average %.2f Mbps, busiest second %.2f Mbps\n", n, t/n, m; else print "recording too short: need at least 10 seconds"}' exit=1 | edge/missing.flv: No such file or directory | no packets read: check the file name and that it is a video edge: file that does not exist published: ffmpeg -ss 5 -t 60 -i source.webm -vf scale=1920:1080:flags=lanczos,fps=60 -c:v libx264 -preset veryfast -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -x264-params nal-hrd=cbr:force-cfr=1 -g 120 -keyint_min 120 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv cbr-6000.flv as run: ffmpeg -ss 5 -t 60 -i in/bbb-400.webm -vf scale=1920:1080:flags=lanczos,fps=60 -c:v libx264 -preset veryfast -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -x264-params nal-hrd=cbr:force-cfr=1 -g 120 -keyint_min 120 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv edge/enc-test.flv exit=0 | video width,height,fps / duration,size: 1920,1080,60/1 60.033000,46153465 edge: real source in/bbb-400.webm (4K 60 fps film), 60 s output published: ffmpeg -ss 5 -t 60 -i source.webm -vf scale=1920:1080:flags=lanczos,fps=60 -c:v libx264 -preset veryfast -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -x264-params nal-hrd=cbr:force-cfr=1 -g 120 -keyint_min 120 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv cbr-6000.flv as run: ffmpeg -ss 5 -t 60 -i edge/src-720p24-silent.mkv -vf scale=1920:1080:flags=lanczos,fps=60 -c:v libx264 -preset veryfast -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -x264-params nal-hrd=cbr:force-cfr=1 -g 120 -keyint_min 120 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv edge/enc-test.flv exit=0 | video width,height,fps / duration,size: 1920,1080,60/1 4.983000,4175823 edge: 10 s 1280x720 24 fps source without audio: output is 5 s (-ss 5 skips half), still 1080p60, no audio track published: ffmpeg -ss 5 -t 60 -i source.webm -vf scale=1920:1080:flags=lanczos,fps=60 -c:v libx264 -preset veryfast -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -x264-params nal-hrd=cbr:force-cfr=1 -g 120 -keyint_min 120 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv cbr-6000.flv as run: same, source.webm = a 3 s clip exit=0 | output cbr-6000.flv: 484 bytes, no video, ffmpeg printed nothing edge: source shorter than the 5 s seek gives an empty file with exit 0; the source must be longer than 65 s for a 60 s file