
Recherche avancée
Autres articles (24)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (2942)
-
Stream video from ffmpeg and capture with OpenCV
10 décembre 2014, par chembradI have a video stream coming in on rtp to ffmpeg and I want to pipe this to my OpenCV tools for live streaming processing. The rtp linkage is working because I am able to send the incoming data to a file and play it (or play if via ffplay). My OpenCV implementation is functional as well because I am able to capture video from a file and also a webcam.
The problem is the streaming to OpenCV. I have heard that this may be done using a named pipe. First I could stream the ffmpeg output to the pipe and then have OpenCV open this pipe and begin processing.
What I’ve tried :
I make a named-pipe in my cygwin bash by :
$ mkfifo stream_pipe
Next I use my ffmpeg command to pull the stream from rtp and send it to the pipe :
$ ffmpeg -f avi -i rtp://xxx.xxx.xxx.xxx:1234 -f avi -y out.avi > stream_pipe
I am not sure if this is the right way to go about sending the stream to the named pipe but it seems to be accepting the command and work because of the output from ffmpeg gives me bitrates, fps, and such.
Next I use the named pipe in my OpenCV capture function :
$ ./cvcap.exe stream_pipe
where the code for cvcap.cpp boils down to this :
cv::VideoCapture *pIns = new cv::VideoCapture(argv[1]);
The program seems to hang when reaching this one line, so, I am wondering if this is the right way of going about this. I have never used named pipes before and I am not sure if this is the correct usage. In addition, I don’t know if I need to handle the named pipe differently in OpenCV—change code around to accept this kind of input. Like I said, my code already accepts files and camera inputs, I am just hung up on a stream coming in. I have only heard that named pipes can be used for OpenCV—I haven’t seen any actual code or commands !
Any help or insights are appreciated !
UPDATE :
I believe named pipes may not be working in the way I intended. As seen on this cygwin forum post :
The problem is that Cygwin’s implementation of fifos is very buggy. I wouldn’t recommend using fifos for anything but the simplest of applications.
I may need to find another way to do this. I have tried to pipe the ffmpeg output into a normal file and then have OpenCV read it at the same time. This works to some extent, but I imagine in can be dangerous to read and write from a file concurrently—who knows what would happen !
-
mpeg4audio : Make avpriv_copy_pce_data() inline
16 mars 2017, par Anton Khirnovmpeg4audio : Make avpriv_copy_pce_data() inline
The function currently accepts a PutBitContext and a GetBitContext,
which hardcodes their sizes into the lavc ABI. Since the function is
quite small and only called in a few places, the simplest solution is
making it inline, thus avoiding a runtime dependency completely.Signed-off-by : Diego Biurrun <diego@biurrun.de>
-
Creating multiple subclips from a video with unixtime from a json ?
10 mars 2016, par DynamicProblem :
I want to trim a video file based on start-time and end-time from json data. There are multiple start & end times and the video needs to be trimmed and then the final parts appended.I tried using MoviePy by assigning the unix timestamps to a var and then converting to MM:SS using datetime.
How can i do this for multiple values as such the script goes thru all the dicts and trims the video as per the data ?
Is MoviePY good enough for this job or is there any other efficient lib / way out there ?
What i tried :
from moviepy.editor import *
import datetime
start_time = int(datetime.datetime.fromtimestamp(int("1456229360")).strftime('%S'))
end_time = int(datetime.datetime.fromtimestamp(int("1456229334")).strftime('%S'))
print start_time
print end_time
my_clip = VideoFileClip("sample.mp4")
#Trims the video as per the processed timestamps
clip1 = my_clip.subclip(start_time,end_time) #and select the subclip 00:00:00 - 00:00:00
#Append the trimmed parts.
#final_video = concatenate([clip1,clip2,clip3]) #How to do this ?
processed_vid = clip1.write_videofile("final_sample.mp4")
with open('output.json', 'r') as f:
timestamps = json.load(f)Sample Json Data :
[
{
"accl": 1.5899999999999999,
"duration": 19,
"end_time": 1434367730,
"start_time": 1434367711
},
{
"accl": 0.7670000000000012,
"duration": 14,
"end_time": 1434368618,
"start_time": 1434368604
},
{
"accl": 0.7129999999999992,
"duration": 11,
"end_time": 1434368692,
"start_time": 1434368681
},
{
"accl": 0.5970000000000013,
"duration": 13,
"end_time": 1434367605,
"start_time": 1434367592
}
]Update :
I tried doing something else, i am getting there but i need help in mass conversion of these timestamps as moviepy accepts only HH:MM:SS and not unixtime, and with creating subclips on basis of this.from moviepy.editor import *
import datetime
import json
clips_array = []
video= VideoFileClip('sample.mov')
with open('output.json', 'r') as f:
timestamps = json.load(f)
for timestamps in f:
clip = full_vid.subclip(start_time, end_time)
clips_array.append(clip)