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

input seek in ffmpeg-python

ffmpeg -ss 00:05:20 -i input.mp4 -t 00:10:00 -c:v copy -c:a copy output3.mp4 extracts the video segment quickly because of the input seek -ss being placed before -i. Which is the equivalent expression in ffmpeg-python?
Mauro Gentile
  • 1,463
  • 6
  • 26
  • 37
0
votes
0 answers

Prepare ffmpeg command to encode in hevc x265 limiting size

I want to change the current code so that it works even when the video already is hevc but it's above the MAX_HEIGHT or above the MAX_BITRATE. I've placed some instructions, like the one to change frame rate, inside the conditionals but others…
user19924240
0
votes
2 answers

celery task unable to recongize FFmeg-python

I am writing a Flask application and using a celery task for a long-running task. Basically, that long-running task uses the ffmpeg-python module to process a video. The code is working fine when I run it normally via flask API but when I am trying…
Adil Rao
  • 1
  • 1
0
votes
0 answers

Stream specifier ':a' in filtergraph description [0:v][0:a][1:v][1:a]concat=a=1:n=2:v=1[s0][s1] matches no streams

I am using ffmpeg-python and I am trying to make a code that gets all the clips from a folder, converts all of them to the same format then merge all of them with their audio to one final video file. Here is how the python script looks like import…
Mash
  • 39
  • 5
0
votes
0 answers

how to fix ffmpeg-python outputting abnormal size after combining audio and video file

I am trying to combine audio and video using ffmpeg-python. my video file is 40mb and my audio file is 5mb but when i combine them i am getting 90mb which is abnormal. i was expecting the output file to be the size of the video file + the size of…
prince david
  • 181
  • 1
  • 5
0
votes
0 answers

ffmpeg "Stream maping" taking a long time to load

I am using ffmpeg to speed up and slow down parts where the talker is talking and being silent. To do this I run something like this(the code below[more exactly the filter part, the rest is the same] is an example, not my exact code):cmd /c ffmpeg…
Bambi2k21
  • 15
  • 7
0
votes
1 answer

Concatenate a video, image and audio using ffmpeg

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…
Santa
  • 158
  • 1
  • 9
0
votes
1 answer

I have trouble converted ffmpeg command to ffmpeg-python

I am trying convert from HDR to SDR by using the following ffmpeg command, which works ffmpeg -i input.mov -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p -c:v…
0
votes
1 answer

PyDub: ffmpeg not found

I have pip installed python-ffmpeg and am trying to play a wav file with PyDub. I get this warning: Warning (from warnings module): File "C:\Users\divel\AppData\Local\Programs\Python\Python39\lib\site-packages\pydub\utils.py", line 170 …
FulvioD 23
  • 17
  • 5
0
votes
0 answers

Rotate frames and create a viedo with ffmpeg, without re encoding

I am using the following to copy a couple of frames to a video, and I am trying to rotate the frames before copying them to a video, but I am not sure if its possible with ffmpeg. I dont want to create the video and rotate because I'll have to re…
racoon
  • 1
0
votes
1 answer

FFmpegPCMaudio doesn't work on my server but it works on my computer

I am developing a Discord bot with python that can play music. When I do the tests on my computer all work find but when I take all the files to put there in my server it stop working. So I tried to run it on an other computer and no, it still does…
Alex
  • 51
  • 4
0
votes
1 answer

FFmpeg python: different length after fps changed and interpolated

For my application I'm adapting the code from the ffmpeg-python github for tensorflow streaming. It basically decodes each frame of your input, lets you process it with python, and encodes it again. To optimize things I'm adding a fps filter at the…
0
votes
0 answers

why this thread doesnt run parelally?

Hi I have the following code: def record_video(task_id): ( ffmpeg .input('a.mp4', t=t) .output(f'{task_id}.mp4') .run() ) thread = Thread(target=record_video,…
Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84
0
votes
1 answer

use BytesIO into python-ffmpeg or other

Hello I have the following poc to develop Given two S3 paths, origin and destination, I need to download from origin apply a conversion and upload to destination. The idea is not to use a temporary local folder and use stream data ur another better…
Tlaloc-ES
  • 4,825
  • 7
  • 38
  • 84
0
votes
1 answer

set equal duration to images with ffmpeg python

Hi i want to make a video using images. Lets say i have an audio of 60 seconds and 6 images and i want my video to show images with equal durations i.e 10 second per image but i couldn't figure it out how to do it here is my code import…
Amandeep
  • 25
  • 6