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

[FR] Support multiple input files and split options #18

Open
F-park opened this issue Dec 3, 2023 · 2 comments
Open

[FR] Support multiple input files and split options #18

F-park opened this issue Dec 3, 2023 · 2 comments
Labels
feature request New feature or request

Comments

@F-park
Copy link

F-park commented Dec 3, 2023

Future Request Reason

Currently, the script just calls self._set_file_info() once, so we can only get one input file durations.

By the way, ffmpeg support spilt file by these options, we should support -ss, -t and -to, it is common to use.
image

Solution

I will work in #17

@CrypticSignal
Copy link
Owner

CrypticSignal commented Dec 3, 2023

We can try to support multiple input files, but remember that the progress bar uses the duration of the input file to calculate the percentage progress. If there are multiple input files with different durations, you will need to make sure that the correct duration is set as the total when creating the progress bar.

If -t is in the FFmpeg command , this is simple as the total value for the progress bar should be set to the value after -t.

@CrypticSignal CrypticSignal changed the title [FR] Support multiple input durations get [FR] Support multiple input files Dec 3, 2023
@F-park
Copy link
Author

F-park commented Dec 3, 2023

We can try to support multiple input files, but remember that the progress bar uses the duration of the input file to calculate the percentage progress. If there are multiple input files with different durations, you will need to make sure that the correct duration is set as the total when creating the progress bar.

I would say in most use cases the transcoding length is the duration of the shorter file, so this would be a good default to set when setting the total for the progress bar, but if you can think of any situations where the transcoding length will be equal to the length of the larger file, add logic to set the total to the length of the longer file in these situations.

If -t is in the FFmpeg command , this is simple as the total value for the progress bar should be set to the value after -t.

Thanks for your suggestion. BTW, there is a new situation when ffmpeg -f concat -i filelist.txt -c copy output.mkv

  • filelist.txt:
file 'input1.mkv'
file 'input2.mkv'
file 'input3.mkv'

I consider I should learn how to use shlex, we should write a simple lexical analysis for ffmpeg

@F-park F-park changed the title [FR] Support multiple input files [FR] Support multiple input files and split options Dec 9, 2023
@CrypticSignal CrypticSignal added the feature request New feature or request label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants