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

Add progress tracking to ffmpeg operations #2475

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

Kenshin9977
Copy link

@Kenshin9977 Kenshin9977 commented Jan 24, 2022

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Add progress tracking to ffmpeg operations, both downloading and postprocessing.
Some methods are marked as static because I found them to be too thematically linked to FFmpegProgressTracker to seperate them. If someone has a better idea because he thinks it needs to be changed, I'm open to suggestions.

Closes #1720, #2826, Closes #1317, Replaces #1133, #1947

@pukkandan pukkandan added the enhancement New feature or request label Jan 27, 2022
@Kenshin9977 Kenshin9977 force-pushed the master branch 3 times, most recently from 85844eb to 6da033d Compare February 15, 2022 20:02
@Kenshin9977 Kenshin9977 force-pushed the master branch 2 times, most recently from 15eee53 to 31895a1 Compare February 26, 2022 23:52
@Kenshin9977 Kenshin9977 marked this pull request as ready for review February 26, 2022 23:56
@Kenshin9977 Kenshin9977 force-pushed the master branch 5 times, most recently from 3ac6bbc to 93de570 Compare March 4, 2022 17:19
@pukkandan pukkandan self-requested a review March 5, 2022 04:33
yt_dlp/downloader/external.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Lesmiscore Lesmiscore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
@Kenshin9977 Kenshin9977 force-pushed the master branch 2 times, most recently from 6345c68 to e8ab421 Compare March 6, 2022 14:55
@pukkandan
Copy link
Member

Some of the newer commits are seriously overreaching beyond the scope of this PR. Please revert them

@pukkandan pukkandan added the pending-fixes PR has had changes requested label Mar 6, 2022
@Kenshin9977 Kenshin9977 force-pushed the master branch 5 times, most recently from feea2a8 to 76ca101 Compare March 13, 2022 14:56
@Kenshin9977 Kenshin9977 requested a review from pukkandan March 13, 2022 15:01
@Kenshin9977 Kenshin9977 force-pushed the master branch 2 times, most recently from a8c84f9 to cf1e742 Compare March 13, 2022 15:18
@pukkandan pukkandan removed the pending-fixes PR has had changes requested label Mar 13, 2022
@Kenshin9977 Kenshin9977 marked this pull request as draft March 14, 2022 09:08
@Kenshin9977 Kenshin9977 force-pushed the master branch 8 times, most recently from 74a96db to d18889c Compare October 31, 2023 22:27
@Grub4K Grub4K mentioned this pull request Dec 27, 2023
9 tasks
Add ffmpeg progress tracking to FFmpegPostProcessor

Apply changes from the code review

Fix a bug where the subprocess didn't capture any output thus an empty stdout and stderr were sent back

Add missing hooks

Revert "Add missing hooks"

This reverts commit a359c5e.

Add support of -ss=132 timestamp format

Infer filename from ffmpeg args instead of info_dic

Remove redundant parenthesis and switch from to_stodout to to_screen

Add info kwarg with multiple files and ffmpeg to track progress

Moved format progress function to util

Moved format progress function to util

Add progress tracking to postprocessing operations

Fix typing error

Handle self._downloader is None at __init__

Move format progress functions to utils

Move format progress functions to utils

Handle case where ydl passed is None

Handle case where ydl passed is None

Handle case where _multiline isn't initialized

Handle case where _multiline isn't initialized

Fix streams incorrectly returned

Fix case where ydl is nested in the downloader

Add progress_hook attribute

Fix bug after merge

Fix import bugs after merge

Catch up with upstream

Fix merge errors #1

Adapt tests and implementatation for ffmpeg progress tracking args
@coletdjnz coletdjnz added core:post-processor post-processor related core:downloader downloader related labels Nov 22, 2024
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/ffmpeg.py Outdated Show resolved Hide resolved
@wylieglover
Copy link

Please @pukkandan @Grub4K, if y'all could review this PR, that would be amazing. Would be great to have the download logger for my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core:downloader downloader related core:post-processor post-processor related enhancement New feature or request
Projects
Status: progress reporting
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Showing ffmpeg postprocessing progress [Feature Request] Improved display of download progress with ffmpeg
7 participants