Trimming with ffmpeg and --postprocessing-args does not work anymore
See original GitHub issue- I’ve verified that I’m running youtube-dl version 2021.06.06
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar bug reports including closed ones
- I’ve read bugs section in FAQ
Hi,
a few weeks ago (sorry, I can’t remember when exactly), trimming downloaded videos using ffmpeg and the --postprocessor-args option ceased to work.
Previously, I used this command, which had been working for several weeks:
youtube-dl --postprocessor-args "-ss 00:00:39.00 -to 00:01:26.00" "https://www.youtube.com/watch?v=uYSt8K8VP6k"
Then the videos downloaded correctly but was not trimmed. So I updated everything (brew upgrade && brew update) and tried this instead:
youtube-dl --postprocessor-args "-ss 00:00:39.00 -c copy -map 0 -to 00:01:26.00" "https://www.youtube.com/watch?v=uYSt8K8VP6k"
To no avail. I tried adding --postprocessor ffmpeg. I tried encircling time codes between single quotes. I also tried putting the option at the end of the command.
Obviously, I have ffmpeg installed and post-trimming the video with a separate call to ffmpeg does work:
ffmpeg -ss $START -i "${INFILE}" -c copy -map 0 -to $END "${OUTFILE}"
So I don’t know what happens and, even more shocking, nothing interesting prints in the log when I add the --verboseoption.
I know that ffmpeg is called by youtube-dl because if I try --embed-subsI get a [ffmpeg] No subtitles to embed error
Does anyone can reproduce this?
Verbose log:
[debug] System config: []
[debug] User config: ['--format', 'best']
[debug] Custom config: []
[debug] Command-line args: ['--postprocessor-args', '-ss 00:00:39.00 -c copy -map 0 -to 00:01:26.00', 'https://www.youtube.com/watch?v=uYSt8K8VP6k', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.9.9 (CPython) - macOS-10.14.6-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.4.1, ffprobe 4.4.1
[debug] Proxy map: {}
[youtube] uYSt8K8VP6k: Downloading webpage
[debug] Invoking downloader on 'https://r5---sn-4gxx-25gy.googlevideo.com/videoplayback?expire=1638494644&ei=VB2pYYvBMMmz1wbe-aeoBg&ip=2a01%3Ae0a%3A914%3A6ed0%3A8db7%3A192e%3A3516%3A6492&id=o-AAeWNNUlGhZZx3oDj2rK-tb8rvsn35wow0u_ZFe3nZOt&itag=18&source=youtube&requiressl=yes&mh=c6&mm=31%2C26&mn=sn-4gxx-25gy%2Csn-hpa7kn7z&ms=au%2Conr&mv=m&mvi=5&nh=EAE%2C&pl=49&initcwndbps=715000&vprv=1&mime=video%2Fmp4&ns=HMdOMEw1IF-ZhoAULp9JzOkG&gir=yes&clen=5566437&ratebypass=yes&dur=97.593&lmt=1437448543536765&mt=1638472637&fvip=5&fexp=24001373%2C24007246&c=WEB&n=udAzlKow2YHPcZ9QxX_&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhAPtzaYmxF3YSPLWpvebtZKAzQ8sM1U3Cordb-D1QQV84AiEAv9gzaA9RpW7mttXqv8Iu3XHq62Wrijpc5xkNJbdFvYs%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cnh%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAKMpRfHB_GtqVSvkcO1eYImbkY9AGG3T2izbSuzLX-5WAiEA5hDpsxu9P88_sAtyYTfUcJghNb54gedwoUctZ4Wp2PY%3D'
[download] Destination: Quarter Pounder with cheese in Pulp Fiction scene-uYSt8K8VP6k.mp4
[download] 100% of 5.31MiB in 01:08
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (6 by maintainers)

Top Related StackOverflow Question
@dirkf: yes, that works! I’ve adapted my example with your help, thank you!
Sorry, I should have seen the problem before: use an OUTPUT TEMPLATE, not a filename, with
-o, and end it with.%(ext)s. The first download will be the native audio (opus or aac) and the extracted file will be the .mp3.