0

I am trying to do something like this:

import ffmpeg

user_input =input("give your output file a name: ")

(
    ffmpeg
    .input('input.mp4')
    .vflip()
    .output('(user_input).mp4')
    .run()
)

I am wondering how I can take the string input from the user and make it the filename. So if they input "tester" the resulting output file would be "tester.mp4".

I am running it on an ubuntu 20.04 WSL. I'm new to here and doing my best to learn python3 and ffmpeg so please be gentle with me if I broke any community rules. I'll improve as I go.

I don't know what to search for to find the answer to this problem.

1 Answers1

0

I don't really use ffmpeg package. But if what you are looking for is string concatenation, something like this will work

first_name = "John"

print(f"Hello, {first_name}!")

Some example https://www.freecodecamp.org/news/python-print-variable-how-to-print-a-string-and-variable/

Opay Hero
  • 53
  • 6