[FFmpeg-user] How to check if a youtube URL is valid before starting download?

Rob Hallam ffmpeg at roberthallam.com
Wed Jul 7 16:04:34 EEST 2021


On Wed, 7 Jul 2021 at 13:52, Bo Berglund <bo.berglund at gmail.com> wrote:
> But still teh same error:
>
> $ ffmpeg -i https://youtu.be/sAt6nY2BWNw -vf "freezedetect=n=0.01:d=5" -map
> 0:v:0 -f null -
> [...]
> https://youtu.be/sAt6nY2BWNw: Invalid data found when processing input

Have you successfully used ffmpeg on a YouTube video *page* URL before?

I haven't done this in a while, but I seem to recall having to use
youtube-dl to grab the video [1], or the video URL [2].

[1]: https://superuser.com/a/1305473/461558
[2]: https://unix.stackexchange.com/a/282413/227308

Note that the latter may no longer work and return a 403 Forbidden
error nowadays.

Cheers,
Rob


More information about the ffmpeg-user mailing list