ffmpeg-python

How to gracefully terminate ffmpeg process alongside with ffprobe process?

How to gracefully terminate ffmpeg process alongside with ffprobe process? Question: I was able to terminate ffmpeg process gracefully when it’s the only ongoing process. Now I also have ffprobe process alongside with ffmpeg process that tracks the progress of the ffmpeg process. It throws the following exception when I try to cancel the process. …

Total answers: 1

How to multithread ffmpeg-python process?

How to multithread ffmpeg-python process? Question: I’m working on a cancel button that cancels the ffmpeg video & audio merging process when pressed. But while loop doesn’t keep looping once ffmpeg starts execution, while loop continues to loop after ffmpeg finished the process. I couldn’t really figure it out, sorry if it’s duplicate. I know …

Total answers: 1

Concatenate a video, image and audio using ffmpeg

Concatenate a video, image and audio using ffmpeg Question: I am trying to concatenate a group of images with associated audio with a video clip at the start and front of the video. Whenever I concatenate the image with the associated audio it dosen’t playback correctly in VLC media player and only displays the image …

Total answers: 1

ffmpeg-python: Test if video clip has audio

ffmpeg-python: Test if video clip has audio Question: Im using ffmpeg-python to do some video transformations. If I have the following: infiles = [] infile = ffmpeg.input(“/tmp/xxx.mp4”) infiles.append( infile[‘v’] .filter(‘scale’, size=’1920×1080′, force_original_aspect_ratio=’decrease’) .filter(‘pad’, ‘1920’, ‘1080’, ‘(ow-iw)/2’, ‘(oh-ih)/2’) ) infiles.append(infile[‘a’]) ( ffmpeg .concat( *infiles, v=1, a=1, unsafe=True) .output(out_tmp_file) .run() ) When I run it, I get …

Total answers: 1

How to combine The video and audio files in ffmpeg-python

How to combine The video and audio files in ffmpeg-python Question: I’m trying to combine a video(with no sound) and its separate audio file I’ve tried ffmpeg ffmpeg -i video.mp4 -i audio.mp4 -c copy output.mp4 and it works fine. i’m trying to achieve the same output from ffmpeg-python but with no luck. Any help on …

Total answers: 4

ffmpeg Python command only runs once in PM2 environment

ffmpeg Python command only runs once in PM2 environment Question: PM2 is running as a web user. ffmpeg was installed native to Ubuntu 16.04 LTS using sudo apt install ffmpeg. The Python version is 3.6. The software uses [email protected]. The applications spawned produce no errors. When the ffmpeg code executes for the first time, we …

Total answers: 3

Python ffmpeg: overlaying videos is dropping all audio

Python ffmpeg: overlaying videos is dropping all audio Question: I am using ffmpeg-python (source) to create the effect where you add a blurred background to fill in the sides of a tall vertical video as shown below: The problem is that the output has no audio attached. Since the clips are the same, I want …

Total answers: 2