
Recherche avancée
Médias (2)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (103)
-
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 (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (11857)
-
Empty output when extracting frames with FFMPEG at specific timestamps taken from FFPROBE
9 octobre 2023, par Andrew McDowellI am trying to extract frames from a video as close as possible to specific timestamps, but for some timestamps I'm getting no output.


I'm first using ffprobe to get a list of all frames along with their time values :


ffprobe -select_streams v -show_frames -show_entries frame=pts_time,pkt_pts_time,pict_type <input video="video" />


Which gives me an output like :


[FRAME]
pts_time=11.950000
pict_type=I
[/FRAME]
[FRAME]
pts_time=11.966667
pict_type=B
[/FRAME]
[FRAME]
pts_time=11.983333
pict_type=P
[/FRAME]



I'm then parsing this and determining which frame is the closest to the time I want and using FFmpeg to extract frames which match the chosen times like so :


ffmpeg -i <input video="video" /> -filter:v "select='eq(t, 11.950000)+eq(t, 11.983333)'" -vsync drop -start_number 0 <output path="path">/frame-%08d.png</output>


This mostly works but I've noticed for some frames I get no output. From some testing it always seems to work for I frames and works occasionally for P or B frames but not always.


I can't see any pattern to which frames it works for or not and would love an insight into whether I'm doing something wrong in the extraction, or whether there's a way to determine which frames can be extracted or not.


-
Python Av encode result is empty always
19 septembre 2023, par Emir evcilI'm quite a newbie when it comes to ffmpeg and av, I was trying to do a simple encode - decode example but the encode result always returns an empty list. I don't understand the reason for this, I don't know how it can be solved.


import av
import numpy as np
import cv2 

container = av.open(file = "video=PC Camera",format = "dshow",options = {"video_size":"640x480"},mode = "r")

def getFrame():
 # open camera
 for frame in container.decode(video=0):
 yield frame
 
def encode(frame):
 encoder = av.CodecContext.create('h264', 'w')
 encoder.width = frame.width
 encoder.height = frame.height
 encoder.pix_fmt = frame.format.name
 encoder.bit_rate = 5000000
 encoder.framerate = 30
 encoder.open()
 frames = encoder.encode(frame)
 encoder.close()
 return frames
 
 
if __name__ == "__main__":
 while 1:
 frame = next(getFrame())
 frame_encoded = encode(frame)
 print(frame_encoded) // always empty
 if len(frame_encoded) == 0:
 continue
 #cv2.imshow("frame",frame.to_ndarray(format = "bgr24"))
 #cv2.waitKey(1)



-
Empty error object produced by ffprobe in Google Cloud Function
20 septembre 2023, par willbattelUpdate : After more digging I found an open GitHub issue where others appear to be encountering the same behavior.



I have a Google Cloud Function (2nd gen) in which I am trying to use
ffprobe
to get metadata from a video file stored in a Google Cloud Storage bucket. It is my understanding that I can generate a signed url and, by passing that directly to ffprobe, avoid loading the entire video file into memory. I generate a signed url and pass it toffprobe
, and then parse the output like so :

import ffmpeg from 'fluent-ffmpeg'
import ffprobeStatic from 'ffprobe-static'

async function getVideoData(srcFile: File) {
 const [signedUrl] = await srcFile.getSignedUrl({
 action: 'read',
 expires: (new Date()).getMilliseconds() + 60_000,
 })

 const videoData: ffmpeg.FfprobeData = await new Promise((resolve, reject) => {
 ffmpeg.setFfprobePath(ffprobeStatic.path)
 ffmpeg.ffprobe(signedUrl, (err, data) => {
 if (err) {
 reject(err)
 }
 else {
 resolve(data)
 }
 })
 })

 return videoData
}



This code works (with the same signed URL) locally on my macOS machine, but does not when deployed in a 2nd generation Google Cloud Function. In the latter case,
data
isundefined
anderr
is{}
.

My main question is how to properly use
ffprobe
in 2nd gen Google Cloud Functions. I have tried to research this but documentation on ffmpeg/ffprobe on GCP is sparse. I'm also trying to figure out exactly why the error objecterr
is empty...it's not very helpful 😅

Additional info :


- 

- Environment : Google Cloud Functions 2nd Gen
- Runtime : Node 20
- "ffprobe-static" : "3.1.0",
- "fluent-ffmpeg" : "2.1.2"










Thanks in advance.