After reading the above an idea popped up:
Is it possible to start two ffmpeg sessions at the same time where the first connects to the web source of streaming video and saves it to disk as a file in ts format while the other uses the ts file as input and does the recoding I need to get the correct format (mp4 and size 480p)?
This way the intermediate file in ts format could be playable during download also on a video player and the recoding to the final file will be done in parallel.
If it is possible, then how can it be done inside the downloading script?
If I just pipe the ts output into the recoding function then there would not be a file that can be opened by a video player....
This is how it looks like now in my script:
Is it possible to start two ffmpeg sessions at the same time where the first connects to the web source of streaming video and saves it to disk as a file in ts format while the other uses the ts file as input and does the recoding I need to get the correct format (mp4 and size 480p)?
This way the intermediate file in ts format could be playable during download also on a video player and the recoding to the final file will be done in parallel.
If it is possible, then how can it be done inside the downloading script?
If I just pipe the ts output into the recoding function then there would not be a file that can be opened by a video player....
This is how it looks like now in my script:
Code:
CMD="ffmpeg -hide_banner -loglevel warning ${MODE} -i \"${M3U8URL}\" -r 30 -vf scale=w=-4:h=${VIDEORES} -c:v libx264 -preset fast -crf 26 -x264-params keyint=30:scenecut=0:open-gop=0 -c:a aac -t ${CAPTURETIME} ${TARGETFILE}"
Statistics: Posted by Bosse_B — Thu Oct 03, 2024 8:13 am