Skip to content

Commit

Permalink
change codec settings for instagram
Browse files Browse the repository at this point in the history
  • Loading branch information
gpchelkin committed May 5, 2024
1 parent f2a1a53 commit 80db49b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scdlbot/__main__.py
Expand Up @@ -982,16 +982,17 @@ def run_async(coro):
# Instagram gives VP9 cideo codec (when downloading with cookies) and it doesn't play in Telegram iOS client.
# We need AVC (x264/h264) or HEVC (x265/h265) video (+ AAC audio) from Instagram videos.
# "FFmpegVideoConvertor" doesn't work here since the original file is already mp4.
# We don't touch audio and just copy it here since it's probably OK in original. But we can change copy to aac.
# --use-postprocessor FFmpegCopyStream --ppa copystream:"-codec:v libx264 -crf 27 -preset veryfast -codec:a copy -f mp4"
# We don't touch audio and just copy it here since it's probably OK in original. But we can change 'copy' to 'aac'.
# --use-postprocessor FFmpegCopyStream --ppa copystream:"-codec:v libx264 -crf 22 -preset ultrafast -codec:a copy -f mp4"
# https://github.com/yt-dlp/yt-dlp/issues/7607
# https://github.com/yt-dlp/yt-dlp/issues/5859
# https://github.com/yt-dlp/yt-dlp/issues/8904
# https://github.com/yt-dlp/yt-dlp/blob/master/devscripts/cli_to_api.py
# {"key": "FFmpegVideoConvertor", "preferedformat": "mp4"},
{"key": "FFmpegCopyStream"},
],
"postprocessor_args": {
"copystream": ["-codec:v", "libx264", "-crf", "35", "-preset", "ultrafast", "-codec:a", "copy", "-f", "mp4"],
"copystream": ["-codec:v", "libx264", "-crf", "22", "-preset", "ultrafast", "-codec:a", "copy", "-f", "mp4"],
},
}
)
Expand Down

0 comments on commit 80db49b

Please sign in to comment.