I have adapted code from this Stack Overflow answer to try to download a video and use ffmpeg to alter it
yt-dlp "https://www.youtube.com/watch?v=PtkqwslbLY8" -o ffmpeg -i in.mp4 -vcodec libx264 -crf 23 -preset fast -profile:v baseline \
-level 3 -refs 6 -vf "scale=640:-1,pad=iw:480:0:(oh-ih)/2,format=yuv420p" \
-acodec copy output.mp4
However, when I run this I'm getting the error:
yt-dlp: error: no such option: -l
Any ideas of how to fix this?
yt-dlp "https://www.youtube.com/watch?v=PtkqwslbLY8" -o - | ffmpeg -i - -vcodec libx264 -crf 23 -preset fast -profile:v baseline -level 3 -refs 6 -vf "scale=640:-1,pad=iw:480:0:(oh-ih)/2,format=yuv420p" -acodec copy output.mp4
-o -
, not in a regular fileffmpeg
, not -i in.mp4
but | ffmpeg -i -