125 questions
-1
votes
0
answers
61
views
Matplotlib ffmpeg libopenh264 error in FFMpegWriter
When I try to use matplotlib's ``FFMpegWriter```.
import matplotlib.animation as animation
FFwriter = animation.FFMpegWriter(fps=10)
...
ani.save('./temp/animation.mp4', writer = FFwriter)
I get the ...
0
votes
1
answer
162
views
Discord Music Bot FFMPEG Troubleshooting
I am trying to create a Python Cog for a Discord.py bot on Windows 10 that allows the bot to join a voice channel to play music or funny audio. It is just something for me and my friends to goof off ...
-1
votes
1
answer
557
views
How to fix the ffmpeg python issue "Error applying option 'original_size' to filter 'ass': Invalid argument"?
ENVIRONMENT:
Python 3.10
Windows 11
ffmpeg-python==0.2.0
CONTEXT:
I am trying to add hardcoded subtitles on a video with ffmpeg and Pyton.
PROBLEM:
ffmpeg is not able to find the path of my ass ...
2
votes
0
answers
123
views
Automate removing segments of a video using ffmpeg-python
I'm very new to ffmpeg and unable to wrap my head around the concepts entirely. My goal for this little script I've been working on all day is to:
Step 1: Read a list of timestamps from a text file ...
0
votes
1
answer
68
views
Saving frames for mov file with multiple streams using python-ffmpeg
I have a mov file with multiple video streams, and I'm trying to use ffmpeg python bindings to read each stream and save all of its frames.
To do so, I've made a code similar to this one:
import numpy ...
0
votes
1
answer
440
views
AttributeError: 'FilterableStream' object has no attribute 'input' - ffmpeg-python
I am a fresh programmer and I am learning the Python language.
I have been trying to design a graphical application (using tkinter and ffmpeg-python libraries) that converts an image file along with ...
0
votes
0
answers
106
views
ffmpeg python causing deadlock
I am facing issues using ffmpeg python to process camera frames. My first approach with process.communicate() worked well, but has latency issues.
process = (
ffmpeg
.input('...
-1
votes
1
answer
56
views
Trying to convert code to be compatible with macOS by not using the .exe version of FFmpeg and FFmprobe. Cant open the .mp4 file when i go to run code
I am attempting to edit some code in python for extracting frames from a video (using parallel processing to make it faster) a friend created that works on windows, so that it can be used on macOS. ...
0
votes
1
answer
88
views
TypeError: source must be an AudioSource not FFmpegOpusAudio
async def play(ctx, *, link):
try:
voice_client = await ctx.author.voice.channel.connect()
voice_clients[voice_client.guild.id] = voice_client
except Exception as e:
...
1
vote
1
answer
1k
views
Coordinates with file format .ASS
I'm grabbing my text coordinates that I want to use for the file format .ASS and for centering on a 1080 by 1920 video, I have an application that displays where the text is on the video and can ...
-1
votes
1
answer
159
views
ffmpeg subtitles filter defaults to Helvetica instead of specified font
I am trying to use a custom font in the subtitles of a video using ffmpeg, but despite my efforts, the font defaults to Helvetica. Here is the code I am using:
import ffmpeg
import os
import tempfile
...
0
votes
0
answers
182
views
ffmpeg python error when adding subtitles
When I run it I think there is an error with the subtitle path, but I can't solve it.
The error in terminal:
[Parsed_subtitles_0 @ 0000019bcc509780] Unable to parse option value
"...
-1
votes
1
answer
112
views
define the input FPS of a stream using ffmpeg-python
Im creating an HLS playlist using ffmpeg, reading my input from an RTSP stream.
When probing the RTSP stream, i get an FPS which is not the true FPS, and i want to "tell" ffmpeg the actual ...
-1
votes
1
answer
131
views
edit a video in python [closed]
I'm trying edit a MP4 video using ffmpeg-python library but I get
TypeError: 'ffmpeg' has no attribute 'input'
Here is my code, directly copied from the official repository):
import ffmpeg
x=ffmpeg....
0
votes
1
answer
1k
views
Play a video with ffmpeg and SDL2 on a Raspberry Pi 5
I want to create a python script that decodes a h264 1080p video and outputs it via SDL2 on a Raspberry Pi 5. The Raspberry Pi 5 is able to play a h264 1080p video without problem using VLC. Total CPU ...
2
votes
0
answers
214
views
How to interpret ndarray in a pyAV AudioFrame?
I want to process streaming audio (coming in from a person speaking on the peer of a webRTC peer connection) to detect when the person is done talking. I have got the audio track and access to ...
1
vote
0
answers
814
views
Python - Extracting audio from video files to numpy array using ffmpeg
I want to use python & ffmpeg-python to extract the audio from a video directly into numpy array.
Currently, I first dump the audio as a wav file using ffmpeg through CLI and read it back to ...
-1
votes
1
answer
320
views
How to edit metadata using ffmpeg-python?
import ffmpeg
input= "input.mkv"
output = "output.mkv"
title = "Clinton Abraham"
try:
datas = 'title=' + title
mains = ffmpeg.input(input)
nemos = mains....
1
vote
1
answer
350
views
ffmpeg mp3 chunk to wav chunk adds gap in the start of the audio
I have an mp3 streaming from a URL, I save the chunks in 1024 byes buffer size.
After I get all the chunks, I'm using ffmpeg to convert the incoming mp3 chunk (22050 mono) to a wav chunk.
When I open/...
0
votes
1
answer
115
views
FFMPEG: How to add transparency to watermark logo? Getting error: "Filter scale2ref has an unconnected output"
Hey guys I am new to Ffmpeg, I want to resize a watermark logo according to the video size and add transparency to it. The code I have is not working as expected.
This is the code
ffmpeg -i $...
-1
votes
1
answer
148
views
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 ...
2
votes
1
answer
316
views
Timeline editing with ffmpeg-python
I'm trying to draw a box on one part of the screen at a specific instance in time. I've tried looking through the documentation for ffmpeg-python, but am unable to locate any instance of support for ...
1
vote
1
answer
430
views
How to use argument with dash in name in ffmpeg-python?
Following is a simple ffmpeg command line for encoding an input video into a AV1 output with CRF 30:
ffmpeg -i input.mkv -c:v libsvtav1 -crf 30 output.mkv
Converting that command line into the syntax ...
0
votes
1
answer
58
views
How to translate ffmpeg linux comand into python
I'm using this to join screenshots into a movie
ffmpeg -hide_banner -loglevel error -framerate 1 -pattern_type glob -i "$1" -c:v libx264 -pix_fmt yuv420p $2
But is there a way to translate ...
0
votes
0
answers
61
views
How to merge two videos, so that the scale of the video takes up 50% of the size of the output video
How to merge two videos, so that the scale of the video takes up 50% of the size of the output video.
For example I need to merge two videos so that one half of the video takes up 50% of the output ...