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

Frame rate change in 2 pass mode ("Bitrate" mode) results in error for AVC x264 encoder #494

Closed
ivan-gorin opened this issue Jun 4, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ivan-gorin
Copy link

FastFlix Version: 5,5,5

Operating System: Windows 10

Describe the bug
When using AVC x264 encoder in 2 pass mode, changing the output frame rate results in error after first pass.
To Reproduce

  1. Choose the AVC x264 encoder.
  2. Choose the "Bitrate" mode in the "Quality" tab (This will use the 2 pass encoding method, where the first pass generates a log file and the second pass uses it to closely match the desired bitrate).
  3. In the "Advanced" tab, uncheck the "Same as Source" option to the right of "Output FPS" and then enter fps number into the box to the box. Choose a number different to the source file frame rate.
  4. Start the encoding. Wait until the first pass finishes, right after that the error will happen.

Screenshots
error

Logs
The problem is that FastFlix applies the -r frame rate option only to the second pass. Here you can see the command FastFlix runs for the first pass:

Running command: "C:\Ffmpeg\bin\ffmpeg.exe"   -y  -to 605.2    -i "<input_file>"   -max_muxing_queue_size 1024 -map 0:0   -c:v libx264 -pix_fmt yuv420p      -color_primaries bt709 -color_trc bt709 -colorspace bt709  -pass 1 -passlogfile "C:\Users\<username>\AppData\Roaming\FastFlix\temp_527689e7bd50dcfbb96cf489\pass_log_file_04347fffe2c2ab34e06f" -b:v 5000k -preset:v ultrafast  -an -sn -dn -f mp4 NUL

The bug can be worked around by putting the option -r <desired frame rate> in the "Custom ffmpeg options" box in the "Quality" tab, however that is not ideal since it puts the option twice in the second pass, and in general the frame rate selection field should work without this.

@ivan-gorin ivan-gorin added the bug Something isn't working label Jun 4, 2023
@ivan-gorin
Copy link
Author

I think the bug is here, the output_fps information is part of the ending string generated by generate_all function but it is not concatenated to the first pass command.

cdgriffith added a commit that referenced this issue Jun 7, 2023
* Fixing #491 Can't open Setting in Chinese upgraded from old version (thanks to 谈天才)
* Fixing #494 frame rate change in 2 pass mode ("Bitrate" mode) results in error for AVC x264 encoder (thanks to Ivan Gorin)
cdgriffith added a commit that referenced this issue Jun 15, 2023
* Fixing #485 Cannot Restore Queue Containing HDR10+ Entries (thanks to Maddie Davis)
* Fixing #487 Filename corrupted on path change (thanks to Maddie Davis)
* Fixing #491 Can't open Setting in Chinese upgraded from old version (thanks to 谈天才)
* Fixing #493 Profiles did not load config for remove hdr, remove metadata or copy chapter toggles (thanks to micron888)
* Fixing #494 frame rate change in 2 pass mode ("Bitrate" mode) results in error for AVC x264 encoder (thanks to Ivan Gorin)
@cdgriffith
Copy link
Owner

Good call on the fix! Re-did that logic hopefully everwhere it was used https://github.com/cdgriffith/FastFlix/releases/tag/5.5.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants