Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
How to pass in filename arguments from youtube-dl to exec? #16700
Comments
|
Input and output names should be different as you already mentioned. Also |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.06.11. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
I'm struggling to figure out the format for -exec when running ffmpeg, I'm attempting to cut an audio file from youtube into a 30 second clip. However, I can't figure out a way to use {}, or youtube-dl output formats in the exec command.
If I try to use {} as the output name like so
youtube-dl -x https://soundcloud.com/rinsefm/sasasas110618 --exec "ffmpeg -ss 00:01:00.00 -i {} -ss 00:00:00.00 -t 00:00:30.00 {}"
I get a
Error while decoding stream #0:0: Invalid data found when processing input, presumably because it's overwriting the file while reading.If I try and use the youtube-dl format for naming I get a syntax error as this is not valid for ffmpeg
youtube-dl -x https://soundcloud.com/rinsefm/sasasas110618 --exec 'ffmpeg -ss 00:01:00.00 -i {} -ss 00:00:00.00 -t 00:00:30.00 %(uploader)s%(title)s.%(ext)s'
I've been searching for hours in the find -exec documentation an across forums and I can't find a way to alter the name of the output file dynamically from the input file in exec. Ideally I'd like to use the original filename but append _clip to the name. Any pointers?