Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How to download ffmpeg utilities into Python venv with pip or manual way for torchaudio

torchaudio requiring avutil and other binary dll files Source : https://pytorch.org/audio/2.3.0/installation.html However they given example only for Anaconda I am not using Anaconda but I am using ...
Furkan Gözükara's user avatar
-3 votes
0 answers
71 views

How to Turn image A + audio + A into Video A with the exact same attributes of Video B so both can be concatenated without encoding [closed]

I have image A and it is PNG I have audio A and it is MP3 I have video B that can be any format, resolution, encoding, audio, etc Now I want to turn image A + audio A into video A with the exact ...
Furkan Gözükara's user avatar
1 vote
0 answers
37 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 ...
Hriday NS's user avatar
0 votes
1 answer
33 views

How to automate ffmpeg to split and merge parts of video, and keep the audio in sync?

I have a Python script that automates trimming a large video (2 hours) into smaller segments and then concatenating them without re-encoding, to keep the process fast. The script runs these ffmpeg ...
Tree's user avatar
  • 31.3k
1 vote
1 answer
63 views

ffmpeg piped output producing incorrect metadata frame count

The short version: Using piped output from ffmpeg produces a file with incorrect metadata. ffmpeg -y -i .\test_mp4.mp4 -f avi -c:v libx264 - > output.avi to make an AVI file using the pipe output. ...
Xorgon's user avatar
  • 520
0 votes
0 answers
46 views

How can I make an rtsp stream as correct as possible in a Django application? [closed]

I am writing a mini video surveillance system on Django. I want the stream to be output to the tag. now I have output to the img tag using a stream and jpeg images (using OpenCV)how to make a stream ...
user25336067's user avatar
-1 votes
1 answer
59 views

Python code to download hls stream to mp4

I wrote the following code to download a video from a website. Chrome extensions can detect the video and download it. However, my code gets the following errors. Any help? from bs4 import ...
Maad A.Galil's user avatar
0 votes
0 answers
70 views

Python Discord Music Bot: Playing next song while current song is playing

I've been working on a discord bot for me and my friends and I got it working 90% of the time. I noticed that, on some occasions the bot will be playing a song and it will stop playing the song and ...
Deltrac's user avatar
-1 votes
0 answers
32 views

Python ffmpeg: [WinError 2] The system cannot find the file specified [duplicate]

#what i did to install pip install ffmpeg-python #code import ffmpeg crop_dimensions = "640:480:0:0" input_file = "input.mp4" output_file = "output.mp4" ( ...
PeppersONLY's user avatar
-1 votes
0 answers
30 views

Can I keep a persistent RTP connection in Python3 which forwards incoming mpegts segment files?

I've been experimenting with ways to implement an live-streaming HTTP server in Python 3.13 (GIL-disabled) which gradually receives .ts segment files every 1 second in order through PUT requests, ...
Eric Liang's user avatar
0 votes
0 answers
18 views

Open cv.VideoCapture(index) - ffmpeg list camera names - How to match?

def fetch_camera_input_settings(self): try: self.database_functions = database_functions self.camera_input_device_name = database_functions.read_setting("...
Chris P's user avatar
  • 2,353
-1 votes
1 answer
63 views

Frames took with ELP camera has unknown pixel format at FHD?

I'm trying to take a one frame ever x seconds from my usb camera. Name of the camera is: ELP-USBFHD06H-SFV(5-50). Code is not 100% done yet, but I'm using it this way right now ↓ (shot fn is called ...
Marcel Kopera's user avatar
0 votes
1 answer
32 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 ...
Dolev Shapira's user avatar
2 votes
0 answers
44 views

Playback / recording problems

The code I'm working on gives me some errors. This results in frame lost when recording. The overview: A video is paused in the first frame. When the motion sensor is detected the video is playing a ...
Wessiez's user avatar
  • 39
1 vote
1 answer
40 views

Video Frame-by-Frame Deraining with MFDNet in Python

As this CodeReview question mentioned, I am trying to modify the code to process frame-by-frame rain streaks removal in a video. FFmpeg package is used in this code. import argparse import os import ...
JimmyHu's user avatar
  • 509
0 votes
1 answer
128 views

Getting Error while trying to download youtube video by using python

Code I'm working on a script that allows users to manually select and download separate video and audio streams from YouTube using yt-dlp. The script lists the available video and audio formats, lets ...
Aditya Kumar's user avatar
0 votes
3 answers
109 views

Why can't my python project find ffmpeg even though it's installed in the Python library?

I am encountering an issue where my project cannot find ffmpeg, even though it is installed in the Python library. Here are the details: When running the script, I get the following error message: D:\...
Jieyu Zhang's user avatar
5 votes
2 answers
229 views

Moviepy is unable to load video

Using python 3.11.10 and moviepy 1.0.3 on ubuntu 24.04.1 (in a VirtualBox 7.1.3 on windows 10) I have problems to load a video clip. The test code is just from moviepy.editor import VideoFileClip clip ...
Alex's user avatar
  • 44k
0 votes
1 answer
60 views

How to improve random access of a video frame with Python?

I'm using pims library (https://github.com/soft-matter/pims) to access frames from .MOV file with over 25K frames, 3840 × 2160, H.264 (High Profile), 60fps. import pims from time import perf_counter ...
Paul Jurczak's user avatar
  • 8,041
0 votes
0 answers
41 views

Main process is held by ffmpeg command

I created a python program for handling my Arlo Camera. To do that I have been using the pyaarlo library (https://github.com/twrecked/pyaarlo) to catch camera's events. The goal is to monitor if there ...
Michael Lopez's user avatar
1 vote
0 answers
89 views

How to efficiently keep a stable frame rate video stream in a PyQt application?

I am developing a PyQt (PySide6) application that needs to display and store multiple camera streams at the same time. The display of the camera streams goes well; however, storing these streams seems ...
Jeroen De Geeter's user avatar
0 votes
0 answers
100 views

FFMPEG unable to stream videos frame by frame to RTMP Youtube Live stream using Python

I need to open a locally stored video, process it frame by frame and send it to YouTube live RTMP stream. I am able to do it using FFMPEG in command line terminal but unable to do it using Python. In ...
YadneshD's user avatar
  • 552
0 votes
1 answer
151 views

Why does OpenAI Whisper return "None"?

I'm trying to transcribe an MP3 file using OpenAI’s Whisper model, but the transcriptions.create() method consistently returns None. I’ve tried different MP3 files, converted them to WAV, updated the ...
SHDDSFFDSDSAF's user avatar
1 vote
2 answers
114 views

Slightly wrong color in MP4 videos written by PyAV

I am writing MP4 video files with the following PyAV-based code (getting input frames represented as numpy arrays - the sort produced by imageio.imread - as input): class MP4: def __init__(self, ...
Yossi Kreinin's user avatar
0 votes
1 answer
131 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 ...
Karolek's user avatar
0 votes
0 answers
37 views

Having issues making an app with py2app ffmpeg and ffprobe

I have made an app in OSX Python, that uses FFMEG and ffprobe. It runs fine in my VS Code. I want to make a self sustained app, that others can use, without needed to install anything themselves. So, ...
Nuno Mesquita's user avatar
1 vote
1 answer
138 views

Python PyAV how to flush to disk regularly

I am using PyAV for encoding a video stream from a camera and saving it to disk. This works in general, but I have one problem left: the file on the disk stays at 0kb regardless of how long i record. ...
Jojo71's user avatar
  • 89
1 vote
0 answers
68 views

how to resolve pixel jittering in javacv generated video

I am trying to generate video using images, where image have some overlays text and png icons. I am using javacv library for this. Final output video seems pixelated, i don't understand what is it ...
Vikram's user avatar
  • 70
-1 votes
1 answer
83 views

On the fly video conversion in django during upload

I an making a backend in django rest where user will be uploading videos in multiple formats such as mp4, avi, etc. I want to convert these videos to a single h264 format while storing them but rather ...
Illucious's user avatar
0 votes
0 answers
87 views

The problem with pydub.AudioSegment.from_file (ffmpeg)

I'm trying to make a normal voice recording discord. When I try to convert an Audio Data object, an error occurs. I've already tried everything I can, I can't solve the problem. Here is the code, the ...
akkoolda's user avatar
0 votes
0 answers
92 views

why can't I access rtsp camera in python?

I'm trying to access an RTSP camera in Python and get frame information from it. One of the camera options is RTSP authentication, and when I include it, VLC asks for login information. ('[rtsp @ ] ...
Come Oh's user avatar
0 votes
0 answers
60 views

Write buffer to ffmpeg stdin and send websocket message after that

I am working on a streaming application in which user can stream videos in real time to my server usig websocket and media recorder. I have written my backend code using fastapi python and I setup a ...
alpecca's user avatar
0 votes
1 answer
124 views

ffmpeg command problem in python to remove silences at the beggining and end. error: returned non-zero exit status 4294967274

I have a problem regarding ffmpeg use in jupyter notebooks. I'm trying to use this funcion for an audio, but I get the below error, I have tried changing the file to wav and different specifications ...
Teko JR's user avatar
  • 21
0 votes
0 answers
98 views

Combining Video and Audio Buffers in Memory Using FFmpeg and Python

I need to combine video and audio streams into a single MP4 file. My goal is to handle this entirely in memory and then send the resulting file directly to the user without storing any files on disk. ...
RUBICK's user avatar
  • 1
0 votes
0 answers
32 views

ffmpeg doesn't work, when starting up it doesn't play music, it gives errors

import discord from discord import FFmpegPCMAudio import os import random from gtts import gTTS import asyncio TOKEN="***" VOICE_CHANNEL_ID=11122224444 class Voice_Bot(discord.Client): ...
Оля Михеева's user avatar
0 votes
0 answers
84 views

How to extract a small segment of H264 stream from a complete H264 stream?

I cut a large image into many tiles (150,000), and then encoded it into a .h264 file with FFmpeg at one frame per second and put it on the server. Now I want to randomly decode a picture from the ....
ttyyyyyyyy's user avatar
4 votes
2 answers
132 views

Pyinstaller Hidden import 'ffmpeg-python' not found

Trying to convert Python scripts to exe with PyInstaller. In my code, I use ffmpeg-python: import ffmpeg .... def ffmpeg_save_clip(self,output_video: str, clip_start: str, clip_end: str): (ffmpeg ...
petunia rose's user avatar
0 votes
0 answers
70 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('...
sa_penguin's user avatar
0 votes
0 answers
3k views

How to Download YouTube Videos in 1080p with English Subtitles Using yt-dlp with Python 3

I am trying to download YouTube videos using yt-dlp in Python 3.9. I want to download videos in 1080p quality and if 1080p is not available, it should download the best available quality. The audio ...
edge selcuk's user avatar
0 votes
1 answer
344 views

nvenc for ffmpeg hardware acceleration with moviepy producing corrupted mp4

I've been trying to create a Python app that takes an mp4 file, an mp3 file, and a dictionary of captions to produce an output mp4 file. I got it to work well but I found the libx264 codec to be quite ...
six's user avatar
  • 23
0 votes
0 answers
60 views

.exe file, works different than .py file

I've made the YouTube Dowbloader App. Everything is working properly (run in PyCharm), but when I try to make it into an executable with pyinstaller, it does not work. This is the link to the repo: ...
r_b's user avatar
  • 1
0 votes
0 answers
149 views

How to combine many m3u8 hls playlists into one using python

I have several videos of mp4 formats. I created HLS (playlists and segments) from them using this code import ffmpeg input_file_path = "D:/Projects/test2.mp4" output_playlist = "'D:/...
Дмитрий Кравчук's user avatar
-1 votes
1 answer
84 views

How Do I Get Python To Capture My Screen At The Right Frame Rate

I have this python script that is supposed to record my screen, on mac os. import cv2 import numpy as np from PIL import ImageGrab import subprocess import time def record_screen(): # Define the ...
John Thesaurus's user avatar
-1 votes
1 answer
97 views

Split a video with ffmpeg, without reencoding, at timestamps given in a txt file

Let's say we have a video input.mp4, and a file split.csv containing: start;end;name 00:00:27.132;00:07:42:422;"Part A.mp4" 00:07:48.400;00:17:17.921;"Part B.mp4" (or I could ...
Basj's user avatar
  • 46k
0 votes
1 answer
31 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. ...
Bruno Hawkins's user avatar
0 votes
0 answers
103 views

Error Running MoviePy in a Frozen Python Application with cx_Freeze

I'm encountering a persistent issue when trying to run a Python application that uses moviepy, which has been frozen using cx_Freeze. The application throws an error related to ffmpeg when I attempt ...
Selmanc's user avatar
  • 56
0 votes
0 answers
107 views

While using skvideo.io.FFmpegReader and skvideo.io.FFmpegWriter for video throughput the input video and output video length differ

I have an h264 encoded mp4 video of about 27.5 minutes length and I am trying to create a copy of the video which excludes the first 5 frames. I am using scikit-video and ffmpeg in python for this ...
Kaesebrotus Anonymous's user avatar
0 votes
0 answers
112 views

I can't compile Whisper Ai into EXE file with Pyinstaller

i'm not sure if its a ffmpeg issue or a whisper ai issue but after compiling my .py file with pyinstaller into one exe file using this command pyinstaller --onefile --add-binary="ffmpeg.exe;.&...
das saew's user avatar
1 vote
0 answers
160 views

the "non-monotonic DTS in output stream " error while concatenation even after reencoded input files

hi I am trying to write a Python program that is trying to first edit different videos separately under the heading "intro" "story" and "byte" with the help of FFmpeg and ...
nish's user avatar
  • 21
0 votes
0 answers
106 views

Previewing mp4 video of cv2s VideoWriter not possible

I am writing a machine learning football analysis system, and I want to store the result video as seen in the code block. I can see the video normally under Windows' media player, but in VSCode and ...
user avatar

1
2 3 4 5
45