Open Jarboer opened 1 month ago
Here's my logs, it does show the quality is best_ios
I don't think best_ios
is a valid value https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#format-selection
@PikuZheng Thanks for the reply and link. I believe it should be valid though. It was added here: https://github.com/alexta69/metube/pull/455
Here's some examples of me using the different quality settings:
Using these settings:
This is the relevant logs:
2024-07-13 00:20:04.871689-04:00INFO:ytdl:adding https://www.instagram.com/reel/C8MCIaDIJjV/?igsh=MWhodHRwcHQzdHkzeQ==: quality='best_ios' format='mp4' already=None folder=None custom_name_prefix='' 2024-07-13 00:20:07.732477-04:00INFO:ytdl:downloading Video by j.o.herbert
If I use these settings:
I get this:
2024-07-13 00:23:10.197243-04:00INFO:ytdl:adding https://www.instagram.com/reel/C8MCIaDIJjV/?igsh=MWhodHRwcHQzdHkzeQ==: quality='best' format='mp4' already=None folder=None custom_name_prefix='' 2024-07-13 00:23:13.770840-04:00INFO:ytdl:downloading Video by j.o.herbert
I never used it. Sorry.
However, I also faced the problem of the annoying vp9 encoding format. I chose to make av01 the preferred format by setting "format_sort":["codec:avc:m4a"]
in YTDL_OPTIONS
. It works fine with youtube.
But wait... Does Instagram provide videos in the corresponding format?
/ # yt-dlp --list-formats https://www.instagram.com/reel/C8MCIaDIJjV/?igsh=MWhodHRwcHQzdHkzeQ== --cookies /downloads/.metube/cookies.txt
[Instagram] Extracting URL: https://www.instagram.com/reel/C8MCIaDIJjV/?igsh=MWhodHRwcHQzdHkzeQ==
[Instagram] C8MCIaDIJjV: Downloading video info
[info] Available formats for C8MCIaDIJjV:
ID EXT RESOLUTION │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC ABR ASR MORE INFO
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
dash-794956116038447ad m4a audio only │ ≈ 72.15KiB 56k https │ audio only mp4a.40.5 56k 44k DASH audio, m4a_dash
385501297831617v-0 mp4 540x960 │ https │ unknown unknown
385501297831617v-1 mp4 540x960 │ https │ unknown unknown
dash-1661688841233207vd mp4 720x1280 │ ≈276.61KiB 214k https │ vp09.00.31.08 214k video only DASH video, mp4_dash
443611441717854v mp4 1080x1920 │ https │ unknown unknown
dash-1887139295033561v mp4 1080x1920 │ ≈395.29KiB 306k https │ vp09.00.40.08 306k video only DASH video, mp4_dash
The "unknown" is actually AVC1, which may be because Instagram did not provide the correct information. So yt-dlp will not select it, but only vp09. https://github.com/yt-dlp/yt-dlp/issues/4390 fyi
For some reason Instagram videos/reals are the only videos I download that aren't compatible with iOS since they download as VP9 instead of h.264. Videos from Twitter work fine for me.
I've tried using the Quality: Best (iOS) and Format: MP4 options but it doesn't work. I also tried setting the environment variable YTDL_OPTIONS to {"format": "mp4", "quality": "best_ios"} but that also doesn't change anything.
I'm running this in a TrueNAS app as the "apps" user (ID = 568). Here's an example reel that downloads in VP9 despite my settings: https://www.instagram.com/reel/C8MCIaDIJjV/?igsh=MWhodHRwcHQzdHkzeQ==.
Any help would be appericated if I'm missing something. And I can provide more details if needed.