
Recherche avancée
Autres articles (65)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (8927)
-
Python ThreadedTCPServer : "Name or service not known"
11 avril 2014, par HalI was developing a ThreadedTCPServer to communicate with a PHP application also residing in this same machine. This is suppose to receive requests from this PHP app and to convert some videos locally using ffmpeg.
Here's the code :
# -*- coding: utf-8 -*-
import os
import socket
import threading
import logging.config
import SocketServer, time
from queuev2 import QueueServer
logging.basicConfig(format='[%(asctime)s.%(msecs).03d] %(message)s', datefmt='%Y-%m-%d %H:%M:%S', filename=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'converter.log'), level=logging.INFO)
class ThreadedTCPRequestHandler(SocketServer.BaseRequestHandler):
def handle(self):
data = self.request.recv(1024)
cur_thread = threading.current_thread()
response = "{}: {}".format(cur_thread.name, data)
videoPool.add(data)
print "Output! %s" % data
self.request.sendall(response)
class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
pass
if __name__ == "__main__":
logging.info("Initializing...")
videoPool = QueueServer()
HOST, PORT = "localhost", 6666
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
ip, port = server.server_address
# Start a thread with the server -- that thread will then start one
# more thread for each request
server_thread = threading.Thread(target=server.serve_forever)
# Exit the server thread when the main thread terminates
server_thread.daemon = True
server_thread.start()
print("Server loop running in thread: %s" % server_thread.name)
# "Groundhog day" time
while True:
time.sleep(999)
pass
#server.shutdown()This works well in my development laptop, but on the server i'm getting the following error :
Traceback (most recent call last):
File "server.py", line 31, in <module>
server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler)
File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
self.server_bind()
File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known
</module>I'm guessing it has to do with the port I'm using (6666), but I've tried others and it hasn't been working. Would Unix Domain Sockets be of use here ? Can you give me an example ?
-
Thumbnail is not generated while uploading a video which is downloaded from the same server
16 avril 2014, par nit3chI am using
drupal 7
video module andffmpeg
together to upload video on my site.
My problem :- Upload a video, everything works fine, thumbnail is generated and video is uploaded successfully
- Now download the above uploaded video.
- Now Try to upload the same video, on same drupal site.
Thumbnail is not generating and also I am not able to play the newly uploaded video.
In all other cases video upload is working fine, I am able to upload same video again and again with no fuss,but when I try to upload the downloaded video , everything goes wrong even if I change the file name after downloading the video and uploading again.Please let me know if I am not clear, will try to explain more.
-
Retranslating video stream using ffmpeg
6 mai 2014, par zdimon77I want to redirect video stream from rtmp to hls format using nginx rtmp-module.
This my nginx config
server {
exec_options on;
listen 1936;
chunk_size 4000;
application myapp {
live on;
exec /usr/bin/avconv -loglevel verbose -re -i rtmp://localhost:1936/myapp/$name -vcodec libx264 -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/$name;
}
}
server {
listen 1935;
chunk_size 4000;
application hls {
live on;
hls on;
hls_path /tmp/hls;
}
}But it doesnt work.
When I try to publish my stream in console (without exec command in nginx.conf)ffmpeg -loglevel debug -re -i rtmp://localhost:1936/myapp/test -vcodec libx264 -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/test
I see this in console
root@dcv23 :/usr/share/nginx/html# avconv -i rtmp ://localhost:1935/myapp/testname -vcodec copy -an -f flv rtmp ://localhost:1936/hls/testname
avconv version 0.8.10-6:0.8.10-1, Copyright (c) 2000-2013 the Libav developers
built on Feb 5 2014 17:15:30 with gcc 4.7.2
[flv @ 0x98a3800] invalid stream
[flv @ 0x98a3800] Estimating duration from bitrate, this may be inaccurate
Input #0, flv, from ’rtmp ://localhost:1935/myapp/testname’ :
Duration : N/A, start : 448.536000, bitrate : N/A
Stream #0.0: Audio: nellymoser, 8000 Hz, mono, s16
Stream #0.1: Video: flv, yuv420p, 800x600, 1k tbr, 1k tbnOutput #0, flv, to ’rtmp ://localhost:1936/hls/testname’ :
Metadata :
encoder : Lavf53.21.1
Stream #0.0: Video: flv, yuv420p, 800x600, q=2-31, 1k tbn, 1k tbcStream mapping :
Stream #0:1 -> #0:0 (copy)
Press ctrl-c to stop encoding
^Cframe= 200 fps= 7 q=-1.0 Lsize= 1031kB time=35.44 bitrate= 238.2kbits/s
And process going but m3u8 files dont create.
Can someone help me please ?
Thank you.