1

I have a bat script (Windows) for the library Livestreamer to record the broadcast in the video

:loop

set day=%DATE:~0,2%
set month=%DATE:~3,2%
set year=%DATE:~6,4%

set hour=%TIME:~0,2%
set minute=%TIME:~3,2%
set second=%TIME:~6,2%

set YYYYMMDD=%day%_%month%_%year%_%hour%_%minute%_%second%


streamlink --hls-live-edge 99999 --hls-segment-threads 10 --ringbuffer-size 1024M -o %YYYYMMDD%.ts https://www.twitch.tv/silvername best
goto loop

How can I break this video into pieces?

I tried to do so, but it did not work, writes the error of the arguments

ffmpeg -i "streamlink --hls-live-edge 99999 --hls-segment-threads 10 --ringbuffer-size 1024M -o %YYYYMMDD%.ts https://www.twitch.tv/manyrin best" -f segment -segment_time 1 -vcodec copy -acodec copy "%03d.ts"
danilshik
  • 289
  • 1
  • 3
  • 13
  • You should input the streamlink output TS file to ffmpeg, not the command. – Gyan Jun 17 '19 at 05:20
  • @Gyan Did not quite understand you, can you tell me the code? – danilshik Jun 17 '19 at 12:18
  • `ffmpeg -i "%YYYYMMDD%.ts" -f segment -segment_time 1 -vcodec copy -acodec copy "%03d.ts"` where `%YYYYMMDD%.ts` is the name of the file that streamlink saved – Gyan Jun 17 '19 at 12:19
  • @Gyan You did not understand, I need to break the video while the broadcast is on, and you suggested that I break it when it was already finished and the file was created – danilshik Jun 17 '19 at 13:45
  • MPEG-TS is a transport format. You can feed it to ffmpeg while it is being saved by streamlink. – Gyan Jun 17 '19 at 13:57
  • @Gyan well, like this "streamlink --hls-live-edge 99999 --hls-segment-threads 10 --ringbuffer-size 1024M -o test.ts https://www.twitch.tv/manyrin best" just saves to file, bun i am get error "streamlink --hls-live-edge 99999 --hls-segment-threads 10 --ringbuffer-size 1024M -o test.ts https://www.twitch.tv/sharishaxd best: Invalid argument" – danilshik Jun 17 '19 at 15:15
  • @Gyan So, is it possible to divide the broadcast while recording? – danilshik Jun 18 '19 at 13:53

0 Answers0