yt-dlp icon indicating copy to clipboard operation
yt-dlp copied to clipboard

Instagram - Missing Codec Metadata

Open adanvdo opened this issue 1 year ago • 2 comments

Checklist

  • [X] I'm reporting a broken site
  • [X] I've verified that I'm running yt-dlp version 2022.07.18 (update instructions) or later (specify commit)
  • [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
  • [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 issues including closed ones. DO NOT post duplicates
  • [X] I've read the guidelines for opening an issue
  • [X] I've read about sharing account credentials and I'm willing to share it if required

Region

US

Provide a description that is worded well enough to be understood

YT-DLP does not return complete meta-data information for available Instagram formats. I am guessing it is just lacking implementation? No codec information is returned when fetching a list of formats.

This is also the case for a group of Vimeo audio formats.

After extracting the url of the available format, ffmpeg -i is able to retrieve complete metadata shown below

ffmpeg -i "https://scontent.cdninstagram.com/v/t50.2886-16/10000000_169320745608052_1409223155077090813_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5pZ3R2LmRlZmF1bHQiLCJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSJ9&_nc_ht=scontent.cdninstagram.com&_nc_cat=1&_nc_ohc=XKJfbsd6B0kAX_UQEf-&edm=AJBgZrYBAAAA&vs=17984608312544513_972912941&_nc_vs=HBksFQAYJEdJQ1dtQUIwSV9VTy01a0FBUDBOb0QtX2tJNFRicUNCQUFBRhUAAsgBABUAGCRHUEpWakJGUEJidEhZYXNBQVBNTWFqdllwTW83YnFDQkFBQUYVAgLIAQAoABgAGwGIB3VzZV9vaWwBMRUAACbSkZvG8pznPxUCKAJDMywXQHUvQ5WBBiUYEmRhc2hfYmFzZWxpbmVfMV92MREAdewHAA%3D%3D&_nc_rid=01b94eb4e1&ccb=7-5&oe=62D88748&oh=00_AT86K6pkNW4JACrBVnhrFLA5QujMZPgCvS91E6dwKDs-sw&_nc_sid=78c662" -f ffmetadata out.txt
ffmpeg version 4.3.1-2020-11-19-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://scontent.cdninstagram.com/v/t50.2886-16/10000000_169320745608052_1409223155077090813_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InZ0c192b2RfdXJsZ2VuLjcyMC5pZ3R2LmRlZmF1bHQiLCJxZV9ncm91cHMiOiJbXCJpZ193ZWJfZGVsaXZlcnlfdnRzX290ZlwiXSJ9&_nc_ht=scontent.cdninstagram.com&_nc_cat=1&_nc_ohc=XKJfbsd6B0kAX_UQEf-&edm=AJBgZrYBAAAA&vs=17984608312544513_972912941&_nc_vs=HBksFQAYJEdJQ1dtQUIwSV9VTy01a0FBUDBOb0QtX2tJNFRicUNCQUFBRhUAAsgBABUAGCRHUEpWakJGUEJidEhZYXNBQVBNTWFqdllwTW83YnFDQkFBQUYVAgLIAQAoABgAGwGIB3VzZV9vaWwBMRUAACbSkZvG8pznPxUCKAJDMywXQHUvQ5WBBiUYEmRhc2hfYmFzZWxpbmVfMV92MREAdewHAA%3D%3D&_nc_rid=01b94eb4e1&ccb=7-5&oe=62D88748&oh=00_AT86K6pkNW4JACrBVnhrFLA5QujMZPgCvS91E6dwKDs-sw&_nc_sid=78c662':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
  Duration: 00:05:39.08, start: 0.000000, bitrate: 1000 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 720x1280, 954 kb/s, 16.02 fps, 30 tbr, 16k tbn, 2k tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 41 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
File 'out.txt' already exists. Overwrite? [y/N] y
Output #0, ffmetadata, to 'out.txt':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
Stream mapping:
Press [q] to stop, [?] for help
size=       0kB time=-577014:32:22.77 bitrate=N/A speed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

We can see above that both the video and audio codecs are available, yet yt-dlp only returns the formatid and resolution

Provide verbose output that clearly demonstrates the problem

  • [X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • [X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', '-F', 'https://www.instagram.com/p/CgGFujiorMX/?hl=en']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.07.18 [135f05e] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.07.18, Current version: 2022.07.18
yt-dlp is up to date (2022.07.18)
[debug] [Instagram] Extracting URL: https://www.instagram.com/p/CgGFujiorMX/?hl=en
[Instagram] CgGFujiorMX: Downloading JSON metadata
WARNING: [Instagram] CgGFujiorMX: General metadata extraction failed
[Instagram] CgGFujiorMX: Downloading video info
[Instagram] CgGFujiorMX: Downloading embed webpage
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for CgGFujiorMX:
ID EXT RESOLUTION │ PROTO │ VCODEC  ACODEC
───────────────────────────────────────────
0  mp4 480x853    │ https │ unknown unknown

adanvdo avatar Jul 19 '22 10:07 adanvdo

This now fails even more because of #4394.

dirkf avatar Jul 21 '22 11:07 dirkf

You mean https://github.com/yt-dlp/yt-dlp/issues/4394

pukkandan avatar Jul 21 '22 12:07 pukkandan

Use cookies and report again. In IG for non logged in users the web api is very unstable.

pritam20ps05 avatar Aug 12 '22 03:08 pritam20ps05

IG no longer shares codec info with other video info. check #4657 for enhancements in error outputs.

pritam20ps05 avatar Aug 14 '22 13:08 pritam20ps05

IG no longer shares codec info with other video info.

is this true for both webpage and API?

pukkandan avatar Aug 14 '22 13:08 pukkandan

Yes since webpage has less info than API so if API does not have it then the webpage won't.

pritam20ps05 avatar Aug 15 '22 08:08 pritam20ps05

In that case, nothing can be done for this

pukkandan avatar Aug 15 '22 08:08 pukkandan

@pukkandan Also please check other issues regarding the same topic.

pritam20ps05 avatar Aug 15 '22 09:08 pritam20ps05

Which? There is no other issue about codec afair

pukkandan avatar Aug 15 '22 09:08 pukkandan

Ok

pritam20ps05 avatar Aug 15 '22 11:08 pritam20ps05