-postprocessor-args Applied Multiple Times #21835

Closed
opened 2026-02-21 11:52:41 -05:00 by deekerman · 3 comments
Owner

Originally created by @antgiant on GitHub (Oct 10, 2020).

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.09.20
  • 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

Verbose log

youtube-dl -f bestaudio --extract-audio --audio-format mp3 -o "Testing.%(ext)s"  --embed-thumbnail --add-metadata --postprocessor-args "-ss 46:01 " "https://vimeo.com/464541793" --verbose
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', 'bestaudio', '--extract-audio', '--audio-format', 'mp3', '-o', 'Testing.%(ext)s', '--embed-thumbnail', '--add-metadata', '--postprocessor-args', '-ss 46:01 ', 'https://vimeo.com/464541793', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763
[debug] exe versions: ffmpeg 2020-10-07-git-a086b73e1f-essentials_build-www.gyan.dev, ffprobe 2020-10-07-git-a086b73e1f-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[vimeo] 464541793: Downloading webpage
[vimeo] 464541793: Extracting information
[vimeo] 464541793: Downloading JSON metadata
[vimeo] 464541793: Downloading JSON metadata
WARNING: Unable to download JSON metadata: HTTP Error 403: Forbidden
[vimeo] 464541793: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 464541793: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 464541793: Downloading fastly_skyfire m3u8 information
[vimeo] 464541793: Downloading fastly_skyfire m3u8 information
[vimeo] 464541793: Downloading akfire_interconnect_quic MPD information
[vimeo] 464541793: Downloading akfire_interconnect_quic MPD information
[vimeo] 464541793: Downloading fastly_skyfire MPD information
[vimeo] 464541793: Downloading fastly_skyfire MPD information
[vimeo] 464541793: Downloading thumbnail ...
[vimeo] 464541793: Writing thumbnail to: Testing.jpg
[debug] Invoking downloader on 'https://skyfire.vimeocdn.com/1602399887-0x309c3f8c9348306fbccb28e57078997b9fafbfec/3d60fe57-3444-49d0-b21d-ab5e3fc42b85/sep/video/7ce39f59,a390af55,b05423e8,c49277e9,620496d1/master.mpd?base64_init=1'
[dashsegments] Total fragments: 909
[download] Destination: Testing.m4a
[download] 100% of 165.86MiB in 04:45
[ffmpeg] Correcting container in "Testing.m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -c copy -f mp4 -ss "46:01" "file:Testing.temp.m4a"
[debug] ffmpeg command line: ffprobe -show_streams "file:Testing.m4a"
[ffmpeg] Destination: Testing.mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -vn -acodec libmp3lame "-q:a" 5 -ss "46:01" "file:Testing.mp3"
Deleting original file Testing.m4a (pass -k to keep)
[ffmpeg] Adding metadata to 'Testing.mp3'
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.mp3" -c copy -metadata "date=20201003" -metadata "title=2020-10-10 - Tabernacling with God by Pastor Chandler Tarbox" -metadata "comment=The weekly Livestream of the Spring Meadows SDA church." -metadata "purl=https://vimeo.com/464541793" -metadata "description=The weekly Livestream of the Spring Meadows SDA church." -metadata "artist=Spring Meadows SDA" -ss "46:01" "file:Testing.temp.mp3"
ERROR: file:Testing.mp3: Invalid argument
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 2065, in post_process
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\postprocessor\ffmpeg.py", line 509, in run
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\postprocessor\ffmpeg.py", line 235, in run_ffmpeg_multiple_files
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: file:Testing.mp3: Invalid argument

Description

I am attempting to accomplish downloading a part of a video. Since #622 makes it clear there is not currently support for that I have attempted to use the -postprocessor-args option to pass in a start time (-ss). However, that command is then applied twice completely breaking it as it doubles the amount cut off the front and just breaks the the -to command completely.
Here is the relevant part of the full log

[ffmpeg] Correcting container in "Testing.m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -c copy -f mp4 -ss "46:01" "file:Testing.temp.m4a"
[debug] ffmpeg command line: ffprobe -show_streams "file:Testing.m4a"
[ffmpeg] Destination: Testing.mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -vn -acodec libmp3lame "-q:a" 5 -ss "46:01" "file:Testing.mp3"

I also tried the --external-downloader-args method described in #12347 and those args were completely ignored, resulting in full length download.

While for me this breaks trimming it would also break a number of other uses for -postprocessor-args as it will double up any processing done via -postprocessor-args.

Originally created by @antgiant on GitHub (Oct 10, 2020). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.09.20. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Read bugs section in FAQ: http://yt-dl.org/reporting - Finally, put x into all relevant boxes (like this [x]) --> - [ ] I'm reporting a broken site support issue - [x] I've verified that I'm running youtube-dl version **2020.09.20** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar bug reports including closed ones - [x] I've read bugs section in FAQ ## Verbose log <!-- Provide the complete verbose output of youtube-dl that clearly demonstrates the problem. Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this: [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2020.09.20 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} <more lines> --> ``` youtube-dl -f bestaudio --extract-audio --audio-format mp3 -o "Testing.%(ext)s" --embed-thumbnail --add-metadata --postprocessor-args "-ss 46:01 " "https://vimeo.com/464541793" --verbose [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-f', 'bestaudio', '--extract-audio', '--audio-format', 'mp3', '-o', 'Testing.%(ext)s', '--embed-thumbnail', '--add-metadata', '--postprocessor-args', '-ss 46:01 ', 'https://vimeo.com/464541793', '--verbose'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2020.09.20 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17763 [debug] exe versions: ffmpeg 2020-10-07-git-a086b73e1f-essentials_build-www.gyan.dev, ffprobe 2020-10-07-git-a086b73e1f-essentials_build-www.gyan.dev [debug] Proxy map: {} [vimeo] 464541793: Downloading webpage [vimeo] 464541793: Extracting information [vimeo] 464541793: Downloading JSON metadata [vimeo] 464541793: Downloading JSON metadata WARNING: Unable to download JSON metadata: HTTP Error 403: Forbidden [vimeo] 464541793: Downloading akfire_interconnect_quic m3u8 information [vimeo] 464541793: Downloading akfire_interconnect_quic m3u8 information [vimeo] 464541793: Downloading fastly_skyfire m3u8 information [vimeo] 464541793: Downloading fastly_skyfire m3u8 information [vimeo] 464541793: Downloading akfire_interconnect_quic MPD information [vimeo] 464541793: Downloading akfire_interconnect_quic MPD information [vimeo] 464541793: Downloading fastly_skyfire MPD information [vimeo] 464541793: Downloading fastly_skyfire MPD information [vimeo] 464541793: Downloading thumbnail ... [vimeo] 464541793: Writing thumbnail to: Testing.jpg [debug] Invoking downloader on 'https://skyfire.vimeocdn.com/1602399887-0x309c3f8c9348306fbccb28e57078997b9fafbfec/3d60fe57-3444-49d0-b21d-ab5e3fc42b85/sep/video/7ce39f59,a390af55,b05423e8,c49277e9,620496d1/master.mpd?base64_init=1' [dashsegments] Total fragments: 909 [download] Destination: Testing.m4a [download] 100% of 165.86MiB in 04:45 [ffmpeg] Correcting container in "Testing.m4a" [debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -c copy -f mp4 -ss "46:01" "file:Testing.temp.m4a" [debug] ffmpeg command line: ffprobe -show_streams "file:Testing.m4a" [ffmpeg] Destination: Testing.mp3 [debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -vn -acodec libmp3lame "-q:a" 5 -ss "46:01" "file:Testing.mp3" Deleting original file Testing.m4a (pass -k to keep) [ffmpeg] Adding metadata to 'Testing.mp3' [debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.mp3" -c copy -metadata "date=20201003" -metadata "title=2020-10-10 - Tabernacling with God by Pastor Chandler Tarbox" -metadata "comment=The weekly Livestream of the Spring Meadows SDA church." -metadata "purl=https://vimeo.com/464541793" -metadata "description=The weekly Livestream of the Spring Meadows SDA church." -metadata "artist=Spring Meadows SDA" -ss "46:01" "file:Testing.temp.mp3" ERROR: file:Testing.mp3: Invalid argument Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\YoutubeDL.py", line 2065, in post_process File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\postprocessor\ffmpeg.py", line 509, in run File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1r1\build\youtube_dl\postprocessor\ffmpeg.py", line 235, in run_ffmpeg_multiple_files youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: file:Testing.mp3: Invalid argument ``` ## Description <!-- Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them. --> I am attempting to accomplish downloading a part of a video. Since #622 makes it clear there is not currently support for that I have attempted to use the `-postprocessor-args` option to pass in a start time (`-ss`). However, that command is then applied twice completely breaking it as it doubles the amount cut off the front and just breaks the the `-to` command completely. Here is the relevant part of the full log ``` [ffmpeg] Correcting container in "Testing.m4a" [debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -c copy -f mp4 -ss "46:01" "file:Testing.temp.m4a" [debug] ffmpeg command line: ffprobe -show_streams "file:Testing.m4a" [ffmpeg] Destination: Testing.mp3 [debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Testing.m4a" -vn -acodec libmp3lame "-q:a" 5 -ss "46:01" "file:Testing.mp3" ``` I also tried the `--external-downloader-args` method described in #12347 and those args were completely ignored, resulting in full length download. While for me this breaks trimming it would also break a number of other uses for `-postprocessor-args` as it will double up any processing done via `-postprocessor-args`.
deekerman 2026-02-21 11:52:41 -05:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner
@october262 commented on GitHub (Oct 11, 2020): see this thread - https://unix.stackexchange.com/questions/230481/how-to-download-portion-of-video-with-youtube-dl-command
Author
Owner

@antgiant commented on GitHub (Oct 11, 2020):

see this thread - https://unix.stackexchange.com/questions/230481/how-to-download-portion-of-video-with-youtube-dl-command

I did. In fact my command is pretty much a directly this answer from that thread. I also mentioned trying --external-downloader-args. That was me trying to turn the first several answers on the thread you mentioned into a single command. but it seems that is broken in youtube-dl at the moment as well.

Either way I consider it a bug that -postprocessor-args are applied twice. Far more that just my particular use case will be negatively impacted by that.

@antgiant commented on GitHub (Oct 11, 2020): > > > see this thread - https://unix.stackexchange.com/questions/230481/how-to-download-portion-of-video-with-youtube-dl-command I did. In fact my command is pretty much a directly [this answer](https://unix.stackexchange.com/a/406246) from that thread. I also mentioned trying `--external-downloader-args`. That was me trying to turn the first several answers on the thread you mentioned into a single command. but it seems that is broken in youtube-dl at the moment as well. Either way I consider it a bug that `-postprocessor-args` are applied twice. Far more that just my particular use case will be negatively impacted by that.
Author
Owner

@dstftw commented on GitHub (Oct 17, 2020):

This is expected behavior, --postprocessor-args is applied to each post processor.

@dstftw commented on GitHub (Oct 17, 2020): This is expected behavior, `--postprocessor-args` is applied to each post processor.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#21835
No description provided.