
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (100)
-
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...)
Sur d’autres sites (6729)
-
How to use the video datastreaming I get from nginx server ?
31 janvier, par Jennie TsaiI have three nodes in my network :

dataServer --- node1 --- node2
.
My video data "friends.mp4" is saved on dataServer. I started both dataServer and node2 as rtmp-nginx servers. I use ffmpeg on node1 to pull datastreaming on dataServerand and push the converted datastreaming to the application "live" on node2.
Here's my configuration of nginx.conf for node2.

worker_processes 1;
events {
 worker_connections 1024;
}

rtmp {
 server {

 listen 1935;

 chunk_size 4000;

application play {
 play /usr/local/nginx/html/play;
 }

application hls {
 live on;
 hls on;
 hls_path /usr/local/nginx/html/hls;
 hls_fragment 1s;
 hls_playlist_length 4s;
 }

application live 
 {
 live on; 
 allow play all;
 }
}
}



I want to run this python code to recognize the faces in friends.mp4 :


import cv2

vid_capture=cv2.VideoCapture("rtmp://127.0.0.1:1935/live")
face_detect = cv2.CascadeClassifier('./haarcascade_frontalface_default.xml')
if (vid_capture.isOpened() == False):
 print("Error opening the video file")
else:
 fps = vid_capture.get(5)
 print("Frames per second : ", fps,'FPS')
 frame_count = vid_capture.get(7)
 print('Frame count : ', frame_count)

while(vid_capture.isOpened()):
 ret, frame = vid_capture.read()
 if ret == True:
 gray = cv2.cvtColor(frame, code=cv2.COLOR_BGR2GRAY)
 face_zone = face_detect.detectMultiScale(gray, scaleFactor=1.1, minNeighbors=3)
 for x, y, w, h in face_zone:
 cv2.rectangle(frame, pt1 = (x, y), pt2 = (x+w, y+h), color = [0,0,255], thickness=2)
 cv2.circle(frame, center = (x + w//2, y + h//2), radius = w//2, color = [0,255,0], thickness = 2)
 cv2.imshow('Frame', frame)
 key = cv2.waitKey(50)
 if key == ord('q'):
 break
 else:
 break
vid_capture.release()
cv2.destoryAllWindows()



But I can't do it because
cv2.VideoCapture
can not get the data streaming fromrtmp://127.0.0.1:1935/live
. Maybe it is because this path is not a file. How can I get the video streaming received by the nginx server and put it to my openCV model ? Is there a way that I just access the dataStreaming received by the nginx server and make it a python object that openCV can use ?

-
I am trying to extract video file using below code i'm getting an 500 internal server error ?
17 octobre 2014, par RameshThe problem is that I get a "500 internal server error" the first time I execute the script, but it works as I expect if I reload the page.
I am using below code.
exec(FFMPEG_PATH." -i $uploadedfile -vcodec copy -acodec copy $path/webservice/ovideos/$thumb_name.mp4 > ".NULL_FILE);
exec(FFMPEG_PATH." -itsoffset $jpegFrameTime -i $path/webservice/ovideos/$thumb_name.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 120x110 $path/webservice/images/thumbs/$thumb_name.jpg > ".NULL_FILE); -
Http server live streaming in python
8 juillet 2015, par George SubiI want to send the live output of ffmpeg command to every GET request, but I’m novice in python and can’t solve it. This is my code :
import subprocess # for piping
from http.server import HTTPServer, BaseHTTPRequestHandler
class RequestHandler(BaseHTTPRequestHandler):
def _writeheaders(self):
self.send_response(200) # 200 OK http response
self.send_header('Connection', 'keep-alive')
self.send_header('Content-Type', 'video/mp4')
self.send_header('Accept-Ranges', 'bytes')
self.end_headers()
def do_GET(self):
self._writeheaders()
global p
DataChunkSize = 10000
print("starting polling loop.")
while(p.poll() is None):
print("looping... ")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
print("Done Looping")
print("dumping last data, if any")
stdoutdata = p.stdout.read(DataChunkSize)
self.wfile.write(stdoutdata)
if __name__ == '__main__':
command = 'ffmpeg -re -i video.avi -an -vcodec libx264 -vb 448k -f mp4 -movflags dash -'
print("running command: %s" % (command, ))
p = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=-1, shell=True)
print("Server in port 8080...")
serveraddr = ('', 8080) # connect to port 8080
srvr = HTTPServer(serveraddr, RequestHandler)
srvr.serve_forever()This is a prove of concept with a video.avi but the real application is with a live signal video.
When connect to html5 video tag, play the video well, but when open another connection then play the video from the begining and not from the live moment. Also, when close the web, the server print an error :
BrokenPipeError: [Errno 32] Broken pipe
Yes, the pipe is broken when cut the connection is obvious. I think that maybe do it with pipes is not correct, but I don’t know how to do it.
The goal is to run only one ffmpeg command and the output send to every client connected or will do it. Anybody can help me please ?