Questions tagged [ffmpeg-python]

Python FFmpeg wrapper wiith complex filter support. ffmpeg-python works well for simple as well as complex signal graphs.

Python FFmpeg wrapper with complex filter support. ffmpeg-python works well for simple as well as complex signal graphs.

113 questions
0
votes
1 answer

ffmpeg error: AttributeError: 'FilterableStream' object has no attribute 'global_args'

I got the error while using ffmpeg. Error: Traceback (most recent call last): File "D:\\1. OTH\\NOWWW\\DDDD\\main.py", line 593, in confirmExecute self.execute() File "D:\\1. OTH\\NOWWW\\DDDD\\main.py", line 652, in…
vothana
  • 1
  • 1
0
votes
1 answer

ffmpeg-python selecting every nth frame

I don't have much experience with ffmpeg and the somewhat not-so-beginner-friendly ffmpeg-python package's documentation has left me kind of confused. I'm trying to trim a video from second s to second e and then grab one frame for every second (the…
0
votes
0 answers

FFMpeg overlay videos freezing with consecutive overlays

I'm making a program that loops through a list of mp4 videos, and one by one overlays them onto an mp4 for a given duration. The first overlay works fine and has no freezing, however all of the overlays after the first are frozen. Here is my code: `…
0
votes
0 answers

How to pipe each bitrate of ffmpeg output to a third party program?

My requirement is very simple. Any one can understand from below example, fmpeg -i ../original.mkv -c:v h264 -c:a aac -f mpegts - | myprogam \ -c:v h264 -c:a aac -vf "scale=1280:720" -f mpegts - | myprogam \ -c:v h264 -c:a aac -vf "scale=854:480"…
0
votes
0 answers

How can I convert an FFmpeg command line to python code

I'm trying to combine an image with an audio file and convert them to mp4. I found this command line and I used it. It works perfectly. ffmpeg -loop 1 -i 01_Prologue.png -i 01_Prologue.wav -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt…
0
votes
1 answer

delay audio stream in ffmpeg python

objective: I have separate audio and video streams. Audio stream length varies but video length is same around 60 seconds. For the first 34 seconds the audio should be empty and after 34 seconds i should play the audio according to its length and…
0
votes
0 answers

how to merge video and audio without cmd?

hi I want combine video and audio together I tested packages ffmpeg-python and pymkvbut both use cmd and I dont want that. from host I don't have permission to use cmd also I used moviepy, it's worked but it's very slow and I can't use that. Do you…
Judge
  • 1
  • 2
0
votes
0 answers

Unable To Get Frame Count Using ffmpeg To Stich To Beginning

I am using Python to make a script with ffmpeg where the script exports the middle frame into a jpg file and then stitches it back into beginning of the video. This is my script video_filename = "test_video.webm" import ffmpeg # Open the input…
SopMe
  • 57
  • 4
0
votes
0 answers

ffmpeg command for overlaying a video onto am image with blend

I have these requirements but cant seem to get this even close : ffmpeg to produce a mp4 video inputs : an image of varying size, an audio wav of X length, a video for the overlay such as particles or dust create an mp4 with the image as the final…
0
votes
1 answer

Concat audiofiles using ffmpeg-python

I'm trying to concat two audiofiles using ffmpeg-python. I've got the proper result with the direct use of ffmpeg in the CLI. The following command gave the proper result .\ffmpeg -f concat -safe 0 -i input.txt -codec copy output.mp4 But now I'm…
0
votes
0 answers

ffmpeg-python to extract multiple video segments

I need to extract multiple segments based on TS from a video using ffmpeg-python. def trim(input_path, output_path, start, end): input_stream = ffmpeg.input(input_path) vid = ( input_stream.video .trim(start=start, end=end) …
Mauro Gentile
  • 1,463
  • 6
  • 26
  • 37
0
votes
1 answer

How can I take a user input in python3 and use it for the file name of ffmpeg-python file output?

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…
0
votes
0 answers

My python script using ffmpeg captures video content, but the captured content freezes in the middle and jumps frames

I am new to ffmpeg and I am trying to use it through a python script. The python functions that captures the video content is given below. The problem I am facing is that the captured content freezes at (uneven) intervals and skips a few frames…
0
votes
2 answers

Ffmpeg Python - Why "filter" makes the output muted?

Normally my input has an audio. When I convert my input with following code, the output is muted. ffmpeg.input("input.webm").filter("scale", force_original_aspect_ratio="decrease", force_divisible_by=2).output(("out.mp4"), vcodec="libx264", r=60,…
muzak
  • 33
  • 4
0
votes
0 answers

scipy.io.wavfile.read() fails to read ffmpeg-python's output

I followed the top answer in this StackOverflow post to use ffmpeg-python extract a .wav file from a YouTube URL (into the pcm_s16le codec), which was played successfully by my local audio player (Mac's Music). However, as I tried to read it using…