
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (40)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)
Sur d’autres sites (5861)
-
Read H264 streaming from Elp H264 with OpenCV + Pyhton
15 janvier 2017, par Francesco PaissanI’m trying to read an udp streaming of a H264 encoded image. The software structure is like follows :
On a BeagleBoneBlack (Ubuntu 16.04) I’ve an Elp H264 cam (see here : https://www.amazon.com/ELP-Support-Android-Windows-Surveillance/dp/B00VDSBH9G ). I stream frames with ffmpeg on a Unicast UDP Stream.
I want to read this images from python and opencv to be able to process them.
I tried with this simple code to see if the cap is opened or not :
import cv2
try:
cap = cv2.VideoCapture("udp://localhost:1234/")
cap.set(CV_CAP_PROP_FOURCC, CV_FOURCC('H', '2', '6', '4'));
except Exception, e:
print str(e)But when I run this script python says :
DtsGetHWFeatures : Create File Failed DtsGetHWFeatures : Create File
Failed Running DIL (3.22.0) Version DtsDeviceOpen : Opening HW in mode
0 DtsDeviceOpen : Create File Failed libva info : VA-API version 0.38.1
libva info : va_getDriverName() returns -1 libva error :
va_getDriverName() failed with unknown libva error,driver_name=(null)
libva info : VA-API version 0.38.1 libva info : va_getDriverName()
returns -1 libva error : va_getDriverName() failed with unknown libva
error,driver_name=(null) libva info : VA-API version 0.38.1 libva info :
va_getDriverName() returns -1 libva error : va_getDriverName() failed
with unknown libva error,driver_name=(null) libva info : VA-API version
0.38.1 libva info : va_getDriverName() returns -1 libva error : va_getDriverName() failed with unknown libva error,driver_name=(null)
GStreamer Plugin : Embedded video playback halted ; module vaapidecode
reported : Could not initialize supporting library. OpenCV
Error : Unspecified error (GStreamer : unable to start pipeline ) in
cvCaptureFromCAM_GStreamer, file /builddir/build/BUILD/opencv-
2.4.12.3/modules/highgui/src/cap_gstreamer.cpp, line 816 /builddir/build/BUILD/opencv-2.4.12.3/modules/highgui/src/cap_gstreamer.cpp:816 :
error : (-2) GStreamer : unable to start pipeline in function
cvCaptureFromCAM_GStreamerCan anybody help me ?
Thanks,
Francesco.
-
In my django app, celery task converts uploaded video w/ ffmpeg, but converted video won't save to s3 ?
29 janvier 2013, par GetItDoneI use Heroku to host my website, and Amazon s3 to store my static and media files. I have a celery task that converts the video file to flv, but the flv doesn't store anywhere. There isn't any error, just there is no file uploaded to my s3 bucket. How can I force the file to save to my s3 bucket after the conversion ? I'm still pretty new web development in general, and I have been stuck trying to get my video conversion working properly for weeks. To be honest, I'm not even sure that I'm doing the right thing with my task. Here is the code in my celery task :
@task(name='celeryfiles.tasks.convert_flv')
def convert_flv(video_id):
video = VideoUpload.objects.get(pk=video_id)
filename = video.video_upload
sourcefile = "%s%s" % (settings.MEDIA_URL, filename)
vidfilename = "%s.flv" % video.id
targetfile = "%svideos/flv/%s" % (settings.MEDIA_URL, vidfilename)
ffmpeg = "ffmpeg -i %s -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
#The next lines are code that I couldn't get to work in place of the line above, and are left commented out.
#I am open to suggestions or alternatives for this also.
#ffmpeg = "ffmpeg -i %s -acodec libmp3lame -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
#ffmpeg = "ffmpeg -i %s -acodec mp3 -ar 22050 -f flv -s 320x240 %s" % (sourcefile, targetfile)
try:
ffmpegresult = commands.getoutput(ffmpeg)
print "---------------FFMPEG---------------"
print "FFMPEGRESULT: %s" % ffmpegresult
except Exception as e:
ffmpegresult = None
print("Failed to convert video file %s to %s" % (sourcefile, targetfile))
print(traceback.format_exc())
video.flvfilename = vidfilename
video.save()My view :
def upload_video(request):
if request.method == 'POST':
form = VideoUploadForm(request.POST, request.FILES)
if form.is_valid():
video_upload=form.save()
video_id=video_upload.id
video_conversion = convert_flv.delay(video_id)
return HttpResponseRedirect('/current_classes/')
else:
...Any advice, insight, or ideas in general would be greatly appreciated. Obviously I am missing something, but I can't figure out what. I have been stuck with different aspects of getting my video conversion to work with ffmpeg using a celery task for weeks. Thanks in advance.
-
PipedInputStream / PipedOutputStream, ImageIO and ffmpeg
19 avril 2015, par jdevelopI have the following code in Scala :
val pos = new PipedOutputStream()
val pis = new PipedInputStream(pos)
Future {
LOG.trace("Start rendering")
generateFrames(videoRenderParams.length) {
img ⇒ ImageIO.write(img, "PNG", pos)
}
pos.flush()
IOUtils.closeQuietly(pos)
LOG.trace("Finished rendering")
} onComplete {
case Success(_) ⇒
LOG.trace("Complete successfully")
case Failure(err) ⇒
LOG.error("Can't render stuff", err)
IOUtils.closeQuietly(pis)
IOUtils.closeQuietly(pos)
}
val prc = (ffmpegCli #< pis).!(logger)the Future simply writes the generated images one by one to the OutputStream. Now the ffmpeg process reads the input images from stdin and converts them to MP4 file.
That works pretty well, but for some reason sometimes I’m getting the following stacktraces :
I/O error Pipe closed for process: <input stream="stream" />
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:260)
at java.io.PipedInputStream.receive(PipedInputStream.java:226)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at scala.sys.process.BasicIO$.loop$1(BasicIO.scala:236)
at scala.sys.process.BasicIO$.transferFullyImpl(BasicIO.scala:242)
at scala.sys.process.BasicIO$.transferFully(BasicIO.scala:223)
at scala.sys.process.ProcessImpl$PipeThread.runloop(ProcessImpl.scala:159)
at scala.sys.process.ProcessImpl$PipeSource.run(ProcessImpl.scala:179)At the same time I’m getting the following error from another stream :
javax.imageio.IIOException: I/O error writing PNG file!
at com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1168)
at javax.imageio.ImageWriter.write(ImageWriter.java:615)
at javax.imageio.ImageIO.doWrite(ImageIO.java:1612)
at javax.imageio.ImageIO.write(ImageIO.java:1578)
atSo it seems that the streams were broken somewhere in between, so ffmpeg can not read the data, and ImageIO can not write the data.
What is even more interesting - the problem is reproducible only on certain Linux server (Amazon). It works flawlessly on other Linux boxes. So I wonder if somebody could point me out to the possible causes of this error.
What I’ve tried so far :
- use Oracle JDK 8 and OpenJDK
- use different versions of FFMPEG
Nothing worked by the moment.