mira-space / MiraData

Official repo for paper "MiraData: A Large-Scale Video Dataset with Long Durations and Structured Captions"
https://mira-space.github.io/
GNU General Public License v3.0
339 stars 9 forks source link

[youtube-dl] ERROR: requested format not available #12

Open DarrenZhaoFR opened 1 month ago

DarrenZhaoFR commented 1 month ago

Hi, many thanks for sharing this dataset. I'm getting this same error when try to download videos, after some digging, I think its because the video format 22 is not supported, e.g. when I select a link from csv and check the available formats:

- youtube-dl -F https://www.youtube.com/watch\?v\=XzQ3QgZZ1DM
[youtube] XzQ3QgZZ1DM: Downloading webpage
[info] Available formats for XzQ3QgZZ1DM:
format code  extension  resolution note
249          webm       audio only audio_quality_low   45k , webm_dash container, opus  (48000Hz), 3.61MiB
249-drc      webm       audio only audio_quality_low   46k , webm_dash container, opus  (48000Hz), 3.61MiB
250          webm       audio only audio_quality_low   60k , webm_dash container, opus  (48000Hz), 4.78MiB
250-drc      webm       audio only audio_quality_low   60k , webm_dash container, opus  (48000Hz), 4.79MiB
251          webm       audio only audio_quality_medium  121k , webm_dash container, opus  (48000Hz), 9.55MiB
251-drc      webm       audio only audio_quality_medium  121k , webm_dash container, opus  (48000Hz), 9.55MiB
140          m4a        audio only audio_quality_medium  129k , m4a_dash container, mp4a.40.2 (44100Hz), 10.17MiB
140-drc      m4a        audio only audio_quality_medium  129k , m4a_dash container, mp4a.40.2 (44100Hz), 10.17MiB
394          mp4        256x144    144p  101k , mp4_dash container, av01.0.00M.08, 30fps, video only, 7.97MiB
160          mp4        256x144    144p  109k , mp4_dash container, avc1.4d400c, 30fps, video only, 8.60MiB
278          webm       256x144    144p  120k , webm_dash container, vp9, 30fps, video only, 9.44MiB
395          mp4        426x240    240p  223k , mp4_dash container, av01.0.00M.08, 30fps, video only, 17.55MiB
133          mp4        426x240    240p  242k , mp4_dash container, avc1.4d4015, 30fps, video only, 19.08MiB
242          webm       426x240    240p  260k , webm_dash container, vp9, 30fps, video only, 20.49MiB
243          webm       640x360    360p  457k , webm_dash container, vp9, 30fps, video only, 35.96MiB
396          mp4        640x360    360p  533k , mp4_dash container, av01.0.01M.08, 30fps, video only, 41.94MiB
134          mp4        640x360    360p  545k , mp4_dash container, avc1.4d401e, 30fps, video only, 42.84MiB
244          webm       854x480    480p  846k , webm_dash container, vp9, 30fps, video only, 66.47MiB
397          mp4        854x480    480p  871k , mp4_dash container, av01.0.04M.08, 30fps, video only, 68.46MiB
135          mp4        854x480    480p 1062k , mp4_dash container, avc1.4d401f, 30fps, video only, 83.45MiB
247          webm       1280x720   720p 1569k , webm_dash container, vp9, 30fps, video only, 123.27MiB
136          mp4        1280x720   720p 2110k , mp4_dash container, avc1.64001f, 30fps, video only, 165.78MiB
302          webm       1280x720   720p60 2875k , webm_dash container, vp9, 60fps, video only, 225.86MiB
398          mp4        1280x720   720p60 3055k , mp4_dash container, av01.0.08M.08, 60fps, video only, 240.00MiB
298          mp4        1280x720   720p60 3440k , mp4_dash container, avc1.640020, 60fps, video only, 270.21MiB
303          webm       1920x1080  1080p60 4628k , webm_dash container, vp9, 60fps, video only, 363.56MiB
399          mp4        1920x1080  1080p60 4890k , mp4_dash container, av01.0.09M.08, 60fps, video only, 384.11MiB
299          mp4        1920x1080  1080p60 5977k , mp4_dash container, avc1.64002a, 60fps, video only, 469.47MiB
400          mp4        2560x1440  1440p60 11038k , mp4_dash container, av01.0.12M.08, 60fps, video only, 866.94MiB
308          webm       2560x1440  1440p60 12229k , webm_dash container, vp9, 60fps, video only, 960.49MiB
315          webm       3840x2160  2160p60 24915k , webm_dash container, vp9, 60fps, video only, 1.91GiB
401          mp4        3840x2160  2160p60 30011k , mp4_dash container, av01.0.13M.08, 60fps, video only, 2.30GiB
571          mp4        7680x4320  4320p60 37938k , mp4_dash container, av01.0.17M.08, 60fps, video only, 2.91GiB
18           mp4        640x360    360p  643k , avc1.42001E, 30fps, mp4a.40.2 (44100Hz), 50.53MiB (best)

There are actually no format 22, and by setting format to 18(best) I'm getting 360p videos, which are very blurry. So which format should I use?

linzhiqiu commented 1 month ago

Getting the same errors here

juxuan27 commented 1 month ago

Hi! I think this may be due to modifications made on the YouTube website. Format 18 has a resolution of 360p, which may result in videos with suboptimal visual quality. You can try a format with a resolution no less than 720p, and I believe this will lead to much better download visual quality.

linzhiqiu commented 1 month ago

@juxuan27 Is there a recommended format code? Or is there a way to dynamically select the format code for each video?

DarrenZhaoFR commented 1 month ago

I changed this line to 'format': '136/247' and it works.