Tagged Questions
0
votes
2answers
23 views
ffmpeg permission denied though the user has permission
I have installed ffmpeg in my server running ubuntu 14. my flask app project root is at /var/www/project/
i am able to upload files and my python scripts are able to write new files, but when i run ...
0
votes
1answer
15 views
Video created with ffmpeg won't play in video player
I'm using Python to create a video using ffmpeg. The following code is what I'm using...
import subprocess as sp
import Image
FFMPEG_BIN = "ffmpeg"
commandWriter = [ FFMPEG_BIN,
'-y',
...
-1
votes
0answers
9 views
GUI Development using Eclipse, PYQT , QT designer tools in Linux for the c shell scripts written in Cygwin [on hold]
I have written a c shell script that used the audio libraries such as ffmpeg and sox. In the script I have also called the python scripts. I have done this using CYGWIN and for that I had installed ...
0
votes
0answers
36 views
Bash process substitution in Python with Popen
I'm attempting to create a looped video file by calling ffmpeg from the python subprocess library. Here's the part that's giving me problems:
import subprocess as sp
sp.Popen(['ffmpeg', '-f', ...
0
votes
1answer
26 views
Python - Popen(shlex.split(command), shell=False) - not working with ffmpeg
I am using Popen(shlex.split(command) to run an ffmpeg command which saves out wav files from a quicktime mov file and also save an ffmpeg log file at the same time. if I use this:
command = ...
0
votes
1answer
30 views
How do I extract album art using pydub
I want to extract album art from a song and embed it back to the song after conversion, using Pydub. Is it possible can somebody help me with this?
0
votes
0answers
16 views
Can I digest an incoming RTMP stream in Python?
I am streaming some data from a webcam to my server using ffmpeg:
ffmpeg -re -r 25 -s 640x480 -i /dev/video0 -f flv rtmp://myserver.com
I'm interested in writing the code that can accept the ...
0
votes
2answers
37 views
Starting and stopping an ffmpeg pipeline in python
I'm trying to start and stop an ffmpeg pipeline in my Python script. I can get it to start the pipeline on command, using a subprocess, but it ties up the script, so that it no longer receives ...
2
votes
0answers
31 views
How can I read all the data from a pipe and prevent it from closing?
I'm trying to read raw YUV data from a compressed file using ffmpeg and pipes with Python.
The ffmpeg command correctly spits out frames as raw YUV data, and I'm reading it like this:
def ...
1
vote
0answers
20 views
Realitime progress output in python from ffmpeg export [duplicate]
I have a wx python application which takes any video file as input and exports each audio track as separate wav files, whilst giving me realtime output info in the status bar. I have this working ...
0
votes
4answers
57 views
subprocess call ffmpeg (command line)
I have been incorporating subprocess calls in my program. I have had no issues with subprocess calls for other commands, but I am having trouble getting the command line input
ffmpeg -r 10 -i ...
0
votes
1answer
27 views
Executing ffmpeg command using Popen
I have a strange problem trying to execute ffmpeg command using Popen.
I have the following piece of code, which I use for executing an external commands in Python:
from subprocess import Popen, PIPE
...
2
votes
0answers
46 views
Error in live mp3 ffmpeg encoder using python
I have a code like below. i want to record sound and convert each wav frame to mp3 format in
real time using ffmpeg
import pyaudio,sys
import subprocess
command = ['ffmpeg', '-y','-f','wav' , '-i', ...
0
votes
0answers
36 views
OpenCV cv2 not working in Windows 7
I have a Windows 7 SP1 64 Bit machine with open cv2.4.9 installed and python 2.7.6 installed.
I use pre compiled version of opencv
The following code works perfectly for me
import cv2.cv as cv
...
0
votes
0answers
59 views
Capturing network video using opencv
I am using ffserver and ffmpeg combination to capture web camera video and transmit it through my network.
I want to capture this video using opencv and python from another computer.
I can see the ...
-1
votes
1answer
58 views
Unable to open video from C++ in opencv. It works from python
I'm trying to use open cv (2.4.9) video support from within C++. However, when I try to open a video file with cv::VideoCapture I get
warning: Error opening file ...
3
votes
1answer
135 views
How to take screenshot (high fps) in Linux (programming)
First of all I want to say that I've been reading a lot about this and I've learnt many ways to do it, but I haven't been able to do it in linux.
My project is an ambilight with arduino, so I need to ...
1
vote
1answer
26 views
using ffmepg in python, shell and stdout
I want to run the following line in python:
ffmpeg -i test.avi -ss 0 -r 25 -vframes 100 ./out/image-%3d.jpg 2>&1 | grep output
which should, if I directly run it in shell, output:
...
0
votes
1answer
32 views
How to open&save a video file in python?
I've just started to make a ubuntu application using PyGtk. My very first object is to open, convert and then save a video file. Ignoring convert phase, I'm going to implant open-save functions. But ...
1
vote
1answer
997 views
ffmpeg hangs when run in background
If I run ffmpeg as follows:
ffmpeg -i H264-media-4.264 4.avi
It works OK (i.e. 4.avi created OK). However, if I try to run it in background:
ffmpeg -i H264-media-4.264 4.avi &
it hangs! (and ...
0
votes
0answers
37 views
Getting Flask to accept chunked encoding
Is it possible to have Python Flask reading chunked encoding sent to it?
I have a very simple routine where I want to read the output from ffmpeg -progress which sends progress updates via chunked ...
8
votes
1answer
2k views
How to convert H264 RTP stream from PCAP to a playable video file
I have captured stream of H264 in PCAP files and trying to create media files from the data. The container is not important (avi,mp4,mkv,…).
When I'm using videosnarf or rtpbreak (combined with python ...
2
votes
1answer
83 views
Recieving multiple files from ffmpeg via subprocesses.PIPE
I am using ffmpeg to convert a video into images. These images are then processed by my Python program. Originally I used ffmpeg to first save the images to disk, then reading them one by one with ...
0
votes
1answer
35 views
Running xdotool movewindow from a python script
I am writing a python script to run a movie using ffplay, and then move the ffplay window to a specific location on the screen.
The script I am basing this one is located here - ...
0
votes
0answers
43 views
matplotlib “RuntimeError: No MovieWriters available” when ffmpeg is installed
I'm using OSX Mavericks and the Enthought Canopy distribution of python. I'm trying to run any simple example script that uses matplotlib.animation to save an animation, but I always get the following ...
-1
votes
2answers
33 views
i have this code. It is supposed to classify the segment files with the ratings in sys.argv[5].But it keeps having error
I have the following code tha uses FFmpeg . It has 5 argv and it takes in filename,video,segment size, start time, end time, ratings. thats supposed to let me classify segments many times with my ...
0
votes
4answers
371 views
Running ffmpeg command through python script
I am trying to execute ffmpeg commands in python.
When the following command was executed from command line in windows cmd it worked:
C:\FFmpeg\bin\ffmpeg -rtbufsize 100000k -r 65535/2733 -f dshow -i ...
2
votes
2answers
154 views
ffmpeg Python Subprocess Error returned non-zero exit status 1
So I have a line here that is meant to dump frames from a movie via python and ffmpeg.
subprocess.check_output([ffmpeg, "-i", self.moviefile, "-ss 00:01:00.000 -t 00:00:05 -vf scale=" + ...
0
votes
0answers
47 views
How to send ctrl-c to stop ffmpeg
I have written a small function like this:
def test():
command = "ffmpeg -f mpegts -i udp://224.6.207.111:1234?multicast=1 -acodec copy -vcodec copy -sameq ff-output.ts"
os.system(command)
...
0
votes
2answers
91 views
running command line programs in background using python os or subprocess module
I am trying to run a command using os or subproccess module in python. the command prompt window briefly flickers before terminating. Is there a way of eliminating that popping up of command prompt ...
0
votes
1answer
88 views
Python PyQT: How to call a GUI function from a worker thread?
I have a pyqt gui and calling a long process (ffmpeg) which I put on a separate thread to not block the gui. I then want to update a progress bar when one command of a longer list of commands ...
-1
votes
1answer
120 views
Python Video Manipulation
I'm new with python and I want to do is receive UDP stream (streaming from VLC,H264) and make any modifications to the video and display it (python 2.7)
I used openCV (openCV 2.4.9) and I can receive ...
5
votes
3answers
5k views
Extract Video Frames In Python
I want to extract video frames and save them as image.
import os, sys
from PIL import Image
a, b, c = os.popen3("ffmpeg -i test.avi")
out = c.read()
dp = out.index("Duration: ")
duration = ...
1
vote
0answers
227 views
Pipe streaming video from FFMPEG into OpenCV
I am using a Logitech C920 webcam with the beaglebone black running debian. I have successfully written an OpenCV python script that allows me get video from the camera and track objects. ...
2
votes
0answers
289 views
Can OpenCV decode H264 - MPEG-4 AVC (part 10)
I am trying to use OpenCV (python bindings) to connect to a UDP multicast and recover individual received frames for post-processing.
I can connect to my multicast via VLC, and VLC displays the ...
-2
votes
1answer
58 views
Minutes and seconds as a variable in Python
How can I store hours/minutes/seconds as variable in python?
For example:
time = "01:30" # 1 minute and 30 seconds
time2 = time + 10 seconds
Basically a program (using FFMPEG) will decide when to ...
0
votes
1answer
3k views
Streaming ffmpeg output over HTTP
As I am trying to connect the VLC Python Bindings with ffmpeg (see Exchange data between ffmpeg and video player) I thought that making ffmpeg to output the RTSP stream to STDOUT and "catching" it ...
0
votes
0answers
30 views
FFMPEG and -crf on Android
yesterday I managed to build a newer Version of FFMPEG for Android. I directly created a binary which allows me to invoke commands per commandline. I builded the Version using NDK r9d and the 4.8 ...
2
votes
2answers
132 views
Extract the middle frame of a video in Python using ffmpeg?
I have a collection of video files for which I'd like to generate thumbnails. How can I extract the middle frame of the video in Python?
If I execute:
ffmpeg -i /tmp/0.mts
I get a line returned to ...
1
vote
2answers
138 views
Popen.write - operation on closed file | images to video using FFmpeg
I'm trying to create a video file from images from my webcam(using SimpleCV), the images are converted to PIL format and then tostring() [rawformat]
I'm using python subprocess and Popen to create ...
0
votes
1answer
53 views
Why is `subprocess.call` not invoking the command
I'm trying to run a .wav file through ffmpeg using the subprocess.call(shell=True) in the following code and it doesn't seem to run. I know this because the output_file isn't created and I'm getting ...
2
votes
2answers
3k views
Cannot open “.mp4” video files using OpenCV 2.4.3, Python 2.7 in Windows 7 machine
I am currently working on a project that involves reading mp4 video files.
The problem I encountered is that it using Python 2.7 (32 bit), OpenCV 2.4.3 (cv2.pyd) in a Windows 7 machine.
The code ...
2
votes
0answers
172 views
Python get Audio/Video frames separately from video file
What i'm trying to do:
Hi!
I'm trying to store the Video and Audio information from a video file. I would like to store video frames and audio frames separately in different variables.
My ...
1
vote
1answer
83 views
Thread in Thread
My company is working for visual effects and we set up an internal shot playback via a browser for our clients. For that we need to upload the video file to a FTP server.
I want to convert a image ...
0
votes
2answers
177 views
Can't save matplotlib animation
I am trying to get a simple animation saved using ffmpeg. I followed a tutorial to install ffmpeg, and I can now access it from the command prompt.
Now I run this piece of code:
import numpy as np
...
1
vote
3answers
69 views
Calling ffmpeg kills script in background only
I've got a python script that calls ffmpeg via subprocess to do some mp3 manipulations. It works fine in the foreground, but if I run it in the background, it gets as far as the ffmpeg command, which ...
0
votes
4answers
552 views
Can I convert a django video upload from a form using ffmpeg before storing the video?
I've been stuck for weeks trying to use ffmpeg to convert user uploaded videos to flv. I use heroku to host my website, and store my static and media files on amazon S3 with s3boto. The initial ...
1
vote
1answer
294 views
Encode Android's frame's .raw file to .png file format using ffmpeg
I used the script from source. What it does is that it reads the frame-buffer information from the mobile (android) phone and save it as a .raw file. It then uses ffmpeg encoder to create .png file. ...
0
votes
1answer
90 views
Mixing audio stream and copy video
I need to implement two features:
replace the audio in the movie
mix the current audio with a new one
Solution for 1:
ffmpeg -i music_url -i video_url -codec copy -y -shortest output_video
...
1
vote
0answers
145 views
Saving video using OpenCV
Given below is the Python script I am using for accessing an IP Camera and saving the incoming video stream:
import cv2
from cv2 import cv
writer=cv2.VideoWriter("vid.avi",cv.CV_FOURCC('X', '2', '6', ...