jonghwanhyeon / python-ffmpeg

A python binding for FFmpeg which provides sync and async APIs
MIT License
302 stars 52 forks source link

Error splitting the argument list: Option not found #64

Closed empz closed 2 months ago

empz commented 2 months ago

I'm having an issue with this library and I have no idea what am I doing wrong.

My code is very simple:

ffmpeg = (
        FFmpeg()
        .option("y")
        .input(input_file)
        .output("/tmp/output.mp3", {"acodec": "libmp3lame", "audio_bitrate": "320k"})
    )

ffmpeg.execute()

This throws an error: Error splitting the argument list: Option not found.

What am I missing?

empz commented 2 months ago

The kwargs option also throws the same error

ffmpeg = (
    FFmpeg()
    .option("y")
    .input(input_file)
    .output("/tmp/output.mp3", acodec="libmp3lame", audio_bitrate="320k")
)
empz commented 2 months ago

Nevermind. I don't know where I got that audio_bitrate thing from.

The right way:

ffmpeg = (
        FFmpeg()
        .option("y")
        .input(input_file)
        .output("/tmp/output.mp3", {"acodec": "libmp3lame", "b:a": "320k"})
    )

ffmpeg.execute()