bastimeyer · GitHub

Write stream to stdout while also opening it in the player.

$ streamlink --record=- twitch.tv/esl_dota2 best | ffmpeg -hide_banner -i pipe:0 -c copy -f null /dev/null
[cli][info] Found matching plugin twitch for URL twitch.tv/esl_dota2
[cli][info] Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)
[cli][info] Opening stream: 1080p60 (hls)
[cli][info] Starting player: mpv
[plugins.twitch][info] Will skip ad segments
[plugins.twitch][info] Low latency streaming (HLS live edge: 2)
[plugins.twitch][info] This is not a low latency stream
Input #0, mpegts, from 'pipe:0':
  Duration: N/A, start: 17878.165000, bitrate: N/A
  Program 1
  Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 191 kb/s
  Stream #0:1[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn
  Stream #0:2[0x102]: Data: timed_id3 (ID3  / 0x20334449)
Output #0, null, to '/dev/null':
  Metadata:
    encoder         : Lavf59.16.100
  Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 59.94 tbr, 90k tbn
  Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 191 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
[cli][info] Player closed0 size=N/A time=00:00:08.84 bitrate=N/A speed=2.33x
[cli][info] Stream ended
[cli][info] Closing currently open stream...
frame=  534 fps=134 q=-1.0 Lsize=N/A time=00:00:08.88 bitrate=N/A speed=2.24x
video:6220kB audio:208kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Read the original on github.com ↗