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
1
vote
1 answer

FFmpeg crashing on drawtext filter (ffmpeg-python)

Hey guys so im trying to use ffmpeg-python to add text to a video but its crashing at [Parsed_drawtext_0 @ 0000012ea115ee80] Setting 'text' to value 'hi' and I'm not sure what I can do to fix this problem. I tried pure FFmpeg command-line style and…
DeadSec
  • 808
  • 1
  • 12
  • 38
1
vote
1 answer

Getting Error message Unknown encoder 'libx264' , any help appreciated

I am trying to compress videos files to a target size within python using ffmpeg-python for an A level project as part of my coursework, I keep getting this error saying it doesn't know the encoder. Not sure what I'm meant to do as this is literally…
1
vote
1 answer

ffmpeg-python take input from x11grab

I am using FFmpeg-python bindings for using FFmpeg. I have to take input from x11grab, for which I already have an equivalent command in shell i.e, ffmpeg -nostdin -hide_banner -nostats -loglevel panic -video_size 1920x1080 -r 60 -framerate 30 -f…
код е
  • 196
  • 2
  • 11
1
vote
0 answers

Master m3u8 file does not list streams

I have a video and I want to transcode it into hls using ffmpeg-python. It works well with a video which has an audio stream. But does not list stream playlists in master.m3u8 when I give a video file without audio as an input. problem: master.m3u8…
kamoloff
  • 118
  • 1
  • 9
1
vote
0 answers

How can I create a side-by-side horizontally stacked video with a delay in video and audio using ffmpeg-python?

I am trying to create a video from two videos that will be stacked horizontally, but the resulting video is not what I expected. The same video is appearing on both sides (left and right). How can that be achieved? The ffmpeg command I tried, which…
kup
  • 731
  • 5
  • 18
1
vote
2 answers

How can I cut a video to a certain length and add an intro video to it using ffmpeg-python?

How can I cut a video to a certain length and add an intro video to it using ffmpeg-python? I am doing this: intro = ffmpeg.input(intro) mainvid = ffmpeg.input(mainvid) v1 = intro.video a1 = intro.audio v2 = mainvid.video a2 = mainvid.audio joined…
kup
  • 731
  • 5
  • 18
1
vote
1 answer

Add multiple subtitles to video with ffmpeg-python

I am trying to add multiple subtitles (not burned) to a video file with ffmpeg-python. I have this ffmpeg command: ffmpeg -i input.mp4 -f srt \ -i "subs/en/en_srt_sub.srt" \ -i "subs/fr/fr_srt_sub" \ -map 0:0 -map 0:1 -map 1:0 -map 2:0 \ -c:v copy…
ScottBot10
  • 153
  • 2
  • 10
1
vote
1 answer

NumPy array of a video changes from the original after writing into the same video

I have a video (test.mkv) that I have converted into a 4D NumPy array - (frame, height, width, color_channel). I have even managed to convert that array back into the same video (test_2.mkv) without altering anything. However, after reading this…
Rashiq
  • 317
  • 1
  • 4
  • 13
0
votes
1 answer

Add subtitles starting at a specific timestamp using Ffmpeg-Python

I want to add a .srt file (subtitles) to a .mp4 video. How can I add the subtitles at a specific timestamp? As an example, my .mp4 video starts the talking part at 00:00:25, so thats there where I want to have the subtitles appearing with the…
grilo13
  • 1
  • 2
0
votes
1 answer

Discord Python Music Bot Not Playing Music

I am new to making discord bots and while I was making a music bot and run on my ubuntu server with python Venv I receive some random number while I tried to play music and the music didn't start. But when I run my program in my Windows PC it works…
Yuhari
  • 1
0
votes
0 answers

Python code mutes whole video instead of sliding a song. What shall I do?

I am trying to separate a song into 4 parts and slide the parts in random parts of a video. The problem with my code is that the final output video is muted. I want to play parts of the song at random intervals and while the song is playing the…
0
votes
1 answer

Running command Subprocess python failed but the same exact command runs well in Terminal

As the title says: weird problem. I've been struggling to make this work for a whole day but to no avail. Any help would be deeply appreciated. # I've tried every one of the below path but still errors: Fontconfig error: Cannot load default config…
will
  • 1
  • 1
0
votes
0 answers

ffmpeg: a way to write to a temp file and rename when finished writing?

i am using ffmpeg to split a video into frames and wondering if there any flags i can set so that ffmpeg will start writing the frame to a file and only rename it when its finished writing to it. for context this is the current ffmpeg command im…
0
votes
0 answers

path specifications with ffmpge under Windows and python

i have a ffmpge command that should write me textfiles in videos that works fine until the point where i specify path then i get an error message [Parsed_drawtext_0 @ 0000029cffbedd40] Both text and text file provided. Please provide only…
marv
  • 19
  • 3
0
votes
0 answers

How can I use the 'afade' parameter in ffmpeg-python without getting an 'option not found' error?

I am using the ffmpeg library with python to add subtitles and a video as an overlay to a background still image. This code is working fine, but I want to use the afade parameter. The code without the afade parameter works fine. However, when I…
user3324136
  • 415
  • 5
  • 20