Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ffprobe as an additional metadata filter option #4928

Open
Skaronator opened this issue Dec 14, 2023 · 1 comment · May be fixed by #6246
Open

Implement ffprobe as an additional metadata filter option #4928

Skaronator opened this issue Dec 14, 2023 · 1 comment · May be fixed by #6246

Comments

@Skaronator
Copy link

Skaronator commented Dec 14, 2023

Filtering out videos based on video format, resolution, or duration is currently not possible without downloading the full video file and doing the filtering in the postprocessor/output stage.

I recently learned that you can use ffprobe to figure out the metadata of a video without actually downloading the full thing. That's how your browser also knows how long a video (for the video timeline) is without downloading it completely.

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'https://c5.coomer.su/data/xy.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 00:08:23.59, start: 0.000000, bitrate: 1212 kb/s
  Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 1013 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : Core Media Video
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      handler_name    : Core Media Audio
      vendor_id       : [0][0][0][0]

This gives us: Duration, Resolution, Framerate, Video-Ratio, Bitrate, Video and Audio format, Audio channel (stereo) and much more.

Similar to extractor.*.image-filter we could have a extractor.*.video-filter that does ffprobe in the background and provides all these fields for the filter string.

What do you think?

@Skaronator
Copy link
Author

I'll drop a 75€ bounty for whoever implements this in gallery-dl and get merged within the next 6 months.

@Skaronator Skaronator changed the title Implement ffprobe as an additional metadata filter option [75€ Bounty] Implement ffprobe as an additional metadata filter option Dec 18, 2023
@Skaronator Skaronator linked a pull request Sep 28, 2024 that will close this issue
@Skaronator Skaronator changed the title [75€ Bounty] Implement ffprobe as an additional metadata filter option Implement ffprobe as an additional metadata filter option Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants