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

How exactly do you use the --extra-encoder-option #1340

Closed
dhow opened this issue Feb 21, 2025 · 3 comments
Closed

How exactly do you use the --extra-encoder-option #1340

dhow opened this issue Feb 21, 2025 · 3 comments
Labels
state:Done This issue has been resolved/dismissed

Comments

@dhow
Copy link

dhow commented Feb 21, 2025

Hello!

Recently I've been playing with video2x to convert some of my favorite shows -- very impressive results btw 👍 -- and now I'm looking to do more with it, in particular, feeding custom ffmpeg options to it, for example, vbr encoding using the the hevc_nvenc encoder.

However, not sure if I've read the documentation right or if I understand correctly, I don't seem to get it right -- my options seem to have no effect to the output. In following example, If I were to feed ffmpeg with theese options:

  • -rc vbr -b:v 2M -maxrate 4M -bufsize 8M -vf "crop=w:h-2*164:0:164"

I would think that I need to feed video2x with theese options:

  • --extra-encoder-option rc=vbr --extra-encoder-option b:v=2M --extra-encoder-option maxrate=4M --extra-encoder-option bufsize=8M --extra-encoder-option 'vf=crop=w:h-2*164:0:164'

But from the log it says [warning] Failed to set encoder option xxx: Option not found -- this is weird, because if it's extra encoder options that we're trying to give ffmpeg, video2x really shouldn't care what options are given anyway.

Also noted that I tried to crop input using the -vf "crop=w:h-2*164:0:164" option. As there's already an = sign in this option, how do you pass this kind of options over to video2x? I was imagine there must be some ways to escpae characters, but no joy after several guesses.

If someone could point out how exactly should we use the --extra-encoder-option option, that would be great!

Q:\work>"C:\Program Files\Video2X Qt6\video2x.exe" -i "Q:\work\input.mkv" -o "Q:\work\output.rife.mkv"  -m 4 -p rife --rife-model rife-v4.6 -c hevc_nvenc --extra-encoder-option rc=vbr --extra-encoder-option b:v=2M --extra-encoder-option maxrate=4M --extra-encoder-option bufsize=8M --extra-encoder-option 'vf=crop=w:h-2*164:0:164'
[2025-02-21 19:43:14] [info] Video2X version 6.4.0
[2025-02-21 19:43:14] [info] Processing file: Q:\work\input.mkv
[2025-02-21 19:43:14] [info] Using Vulkan device: NVIDIA GeForce RTX 3060 Ti (0x2486)
[2025-02-21 19:43:14] [info] Press [space] to pause/resume, [q] to abort.
[2025-02-21 19:43:14] [warning] Failed to set encoder option 'b:v' to '2M': Option not found
[2025-02-21 19:43:14] [warning] Failed to set encoder option 'maxrate' to '4M': Option not found
[2025-02-21 19:43:14] [warning] Failed to set encoder option 'bufsize' to '8M': Option not found
[2025-02-21 19:43:14] [warning] Failed to set encoder option ''vf' to 'crop=w:h-2*164:0:164'': Option not found
[2025-02-21 19:43:15] [warning] Skipping unsupported stream type at index: 4
[0 NVIDIA GeForce RTX 3060 Ti]  queueC=2[8]  queueG=0[16]  queueT=1[2]
[0 NVIDIA GeForce RTX 3060 Ti]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 NVIDIA GeForce RTX 3060 Ti]  fp16-p/s/u/a=1/1/1/1  int8-p/s/u/a=1/1/1/1
[0 NVIDIA GeForce RTX 3060 Ti]  subgroup=32  basic/vote/ballot/shuffle=1/1/1/1
[0 NVIDIA GeForce RTX 3060 Ti]  fp16-8x8x16/16x8x8/16x8x16/16x16x16=0/1/1/1
[2025-02-21 19:43:15] [warning] Estimating the total number of frames using duration * fps
frame=39/735284 (0.01%); fps=19.50; elapsed=00:00:02; remaining=10:28:24
@github-actions github-actions bot added the state:Backlog This issue will be worked on in the future label Feb 21, 2025
@k4yt3x
Copy link
Owner

k4yt3x commented Feb 22, 2025

I'll write a guide on this either today or tomorrow. I think this is currently under-explained.

@k4yt3x k4yt3x added state:InProgress This issue is being worked on and removed state:Backlog This issue will be worked on in the future labels Feb 22, 2025
@dhow
Copy link
Author

dhow commented Feb 22, 2025

Thanks so much @k4yt3x !!

@k4yt3x
Copy link
Owner

k4yt3x commented Feb 24, 2025

Take a look at: https://docs.video2x.org/running/command-line.html#encoder-options

Feel free to keep adding comments here if you still have questions.

@k4yt3x k4yt3x closed this as completed Feb 24, 2025
@github-actions github-actions bot added state:Done This issue has been resolved/dismissed and removed state:InProgress This issue is being worked on labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:Done This issue has been resolved/dismissed
Projects
None yet
Development

No branches or pull requests

2 participants