0

Hey guys I want to add a logo to my video with ffmpeg but I am getting this error while running the below command. What is the reason? Please do help.

`Unable to find a suitable output format for 'overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01)' overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01): Invalid argument.`

I am using python subprocess to run ffmpeg commands.

subprocess.call([settings.VIDEO_ENCODING_FFMPEG_PATH, '-i', input_file_path,
                '-i', logo_path, '-filter_complex','scale=1920:1080',
                'overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01)',
                '-codec:v', 'libx264','-crf', '18',
                '-preset', 'slow', '-b:v', '1000k', '-maxrate', '2000k', '-bufsize', '2000k',
                "-pix_fmt", "yuv420p",
                '-codec:a', 'aac', '-b:a', '128k', '-strict', '-2', output_file_path])

Thanks

1

The entire filtergraph should be one argument.

'-filter_complex','scale=1920:1080[main];[main][1]overlay=x=main_w-overlay_w-(main_w*0.01):y=main_h-overlay_h-(main_h*0.01)',

2
  • Hey, thanks a lot for the response, it works well now. Is [main] a keyword like variable or just a naming one? Could you also tell me how can I decrease the size of the logo image? Thanks. May 14 at 13:43
  • 1
    It's a linklabel. See last para at superuser.com/a/1172501
    – Gyan
    May 14 at 17:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.