
Recherche avancée
Autres articles (111)
-
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 (...) -
Utilisation et configuration du script
19 janvier 2011, parInformations spécifiques à la distribution Debian
Si vous utilisez cette distribution, vous devrez activer les dépôts "debian-multimedia" comme expliqué ici :
Depuis la version 0.3.1 du script, le dépôt peut être automatiquement activé à la suite d’une question.
Récupération du script
Le script d’installation peut être récupéré de deux manières différentes.
Via svn en utilisant la commande pour récupérer le code source à jour :
svn co (...) -
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)
Sur d’autres sites (5991)
-
Extract specific frames of youtube video without downloading video
22 janvier 2023, par Kashish AroraI need to extract specific frames of an online video to work on an algorithm but I don't want to download the whole video because that would make it highly inefficient.


For starters, I tried working with youtube videos. I can download whole of the video using
youtube-dl
in this way :

ydl_opts = {'outtmpl': r'OUTPUT_DIRECTORY_HERE',}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
 ydl.download([url])



And then I can capture individual frames.


I need to avoid downloading the whole video. After some research, I have found that
ffmpeg
might help me do this. I found no way to download just the frames so if this is not possible, the second option is that I can download specific portions of the video. One such example in linux is here but I couldn't find any solution for python.

What is a good way to download just the frames, or portions of videos (in python) without downloading the entire thing ?


-
Python : How to use ffmpeg to read videos(video file or rtsp) and display them using OpenCV ?
22 août 2019, par ToughMindI know that if we want to read video file or USB camera or rtsp stream, we can use
cv2.VideoCapture
.
But for some reason, I want to use ffmpeg to do the thing and process obtained images using opencv. So the pseudocode would be :import cv2
import ffmpeg
videoFile = 'XXX.mp4'
video = ffmpeg.XXX(videoFile)
while True:
frame = video.read() # this read() function is made up by me
frameCV = ffmpeg2cv(frame) # this ffmpeg2cv() function is made up by me
cv2.imshow('frame', frameCV)I have searched a something like https://github.com/kkroening/ffmpeg-python. But I still not know how to do this. I think ffmpeg is too hard and there are few online docs unlike opencv. So please help.
-
How to change ffmpeg -threads settings [migrated]
5 août 2014, par JacobWorking on a tube site. I’m running videos through ffmpeg on a linux dedicated server to convert to mp4.
The server specs :
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Stepping: 3
CPU MHz: 3491.749
BogoMIPS: 6983.49
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 8192K
NUMA node0 CPU(s): 0-7Issue during testing is that even only doing 4-5 at once, the server load skyrockets to an average of around 36. This is just a single person. I imagine when it opens, many people will be uploading at once.
It seems ffmpeg tries to use all the resources available per conversion.
I’ve heard there’s a -threads setting you can change, but I cannot find it. I have an 8 cpu server. It’s only used for conversions, so I’ve heard the best setting would be between 2 and 4. I can test it out.
But how do I change this setting ? Everything I see online discusses this setting, but not the steps to change it.