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

Set ffmpeg log level via environment variable or VideoDecoder kwarg #490

Open
tonyf opened this issue Feb 1, 2025 · 4 comments
Open

Set ffmpeg log level via environment variable or VideoDecoder kwarg #490

tonyf opened this issue Feb 1, 2025 · 4 comments

Comments

@tonyf
Copy link

tonyf commented Feb 1, 2025

🚀 The feature

Ffmpeg logs can be fairly verbose, clogging up other important logs while training. With the latest ffmpeg built from source, I'm getting lots of the following logs

[out @ 0x1fd6d440] Option 'pix_fmts' is not a runtime option and so cannot be set after the object has been initialized
[out @ 0x1fd6d440] The "pix_fmts" option is deprecated: set the supported pixel formats

Is there any way to suppress these logs as a flag to the VideoDecoder or via environment variables?

Motivation, pitch

No response

@scotts
Copy link
Contributor

scotts commented Feb 6, 2025

@tonyf, not at the moment, and that is a good callout. I assume that you expect the default behavior to be that these logs are suppressed by default?

@hanchchch
Copy link

this feature is desperately needed especially if you're using cuda as device. Using current CUDA context. logs are covering all the terminal like this:

[AVHWDeviceContext @ 0x1484ec0e4280] Using current CUDA context.
[AVHWDeviceContext @ 0x1484d400a800] Using current CUDA context.
[AVHWDeviceContext @ 0x1484e4257a40] Using current CUDA context.
[AVHWDeviceContext @ 0x1484f5457600] Using current CUDA context.
[AVHWDeviceContext @ 0x1484e001ff40] Using current CUDA context.
[AVHWDeviceContext @ 0x1484f011a300] Using current CUDA context.
[AVHWDeviceContext @ 0x1466fc1a5c00] Using current CUDA context.
[AVHWDeviceContext @ 0x146714036340] Using current CUDA context.
[AVHWDeviceContext @ 0x146718007ac0] Using current CUDA context.
[AVHWDeviceContext @ 0x1467102f5e40] Using current CUDA context.
[AVHWDeviceContext @ 0x14670c00eac0] Using current CUDA context.
[AVHWDeviceContext @ 0x152dc4fc4800] Using current CUDA context.
[AVHWDeviceContext @ 0x152dc8119540] Using current CUDA context.
[AVHWDeviceContext @ 0x152db82e1900] Using current CUDA context.
[AVHWDeviceContext @ 0x152dd00da0c0] Using current CUDA context.
[AVHWDeviceContext @ 0x152db400c080] Using current CUDA context.
[AVHWDeviceContext @ 0x152dcc00af00] Using current CUDA context.
[AVHWDeviceContext @ 0x152dbc117840] Using current CUDA context.
[AVHWDeviceContext @ 0x152dd42e7b40] Using current CUDA context.
...

@scotts
Copy link
Contributor

scotts commented Feb 7, 2025

PR #504 just turns the logging off, which I think is the real desired behavior. If folks want the ability to control the logging level, we can explore exposing that through a VideoDecoder parameter.

@hanchchch
Copy link

thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants