question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way to pass arbitrary arguments to ffmpeg.run()

See original GitHub issue

Great work!

I’d like to pass -loglevel quiet to ffmpeg.run. I’ve tried this but it fails:

>>> stream = ffmpeg.nodes.GlobalNode(stream, 'loglevel', 'quiet')
>>> ffmpeg.run(stream)
AssertionError: Unsupported global node: loglevel(quiet)

I’ve used ffmpeg.run(stream, cmd=['ffmpeg', '-loglevel', 'quiet']) as a workaround, but it looks like GlobalNode is very restricted. Also multiple GlobalNode can’t be chained.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

47reactions
roman-kucommented, Dec 3, 2018

For anybody that needs an example (like I did):

(
    ffmpeg
    .input(in_filename, ss=time)
    .output(out_filename, vframes=1)
    .global_args('-loglevel', 'error')
    .global_args('-y')
    .run()
)

4reactions
Hodapp87commented, Sep 17, 2020

I’m likewise running into the issue that I can’t use this when I need an argument to be before all else, e.g. -hwaccel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to pass arguments using FFMPEG - Stack Overflow
I can't understand the reason. Can you help me? public void Func() { string FFMPEG_PATH = Path.Combine( Path.GetDirectoryName ...
Read more >
ffmpeg Documentation
ffmpeg reads from an arbitrary number of input "files" (which can be regular files, pipes, network streams, grabbing devices, etc.), specified by the...
Read more >
ffmpeg-python documentation - GitHub Pages
Build command-line arguments to be passed to ffmpeg. Invoke ffmpeg for the supplied node graph. capture_stdout – if True, capture stdout (to be...
Read more >
How can I pass arguments to ffmpeg to use on youtube-dl opts ...
Hi, I'm making a code where it would use youtube-dl and ffmpeg but I want to add some arguments to ffmpeg also, how...
Read more >
Own arguments - Xabe.FFmpeg
This code adds 3 parameters to conversion: -ss (start position), -t (duration) and -s (size). bool conversionResult = FFmpeg.Conversions.New() .SetInput( ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found