[FFmpeg-user] How to check if a youtube URL is valid before starting download?
bo.berglund at gmail.com
Wed Jul 7 15:21:15 EEST 2021
On Tue, 06 Jul 2021 10:14:46 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:
>On Tue, 06 Jul 2021 09:00:47 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:
>>Can this be done using youtube-dl or straight ffmpeg?
>It seems like this will do what I need:
>eval "youtube-dl -F $VIDEOURL"
>if [ $? -eq 0 ]
> exit 0
> exit 1
This works well if a Youtube URL disappears or is replaced with the YT error
message about copyright.
But whenever the video stalls and just continuously displays one single image
for minutes on end the test above does not detect it.
So is there a way to check if a video is static and generate an error in that
ffmpeg -i input_url -checkstaticvideo <maxstatictime>
Is this possible?
Developer in Sweden
More information about the ffmpeg-user