
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (38)
-
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 -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...) -
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 (4723)
-
Tensorflow Video Parsing : ValueError : Convert None with Unsupported Type of class 'NoneType
17 février 2024, par John SiddarthI am trying to learn how to use classifications on video data. I try to run an example from Tensorflow.


I installed related tools using this command :


# The way this tutorial uses the `TimeDistributed` layer requires TF>=2.10
pip install -U "tensorflow>=2.10.0"

pip install remotezip tqdm opencv-python
pip install -q git+https://github.com/tensorflow/docs



Download the video file by
curl -O https://upload.wikimedia.org/wikipedia/commons/8/86/End_of_a_jam.ogv
.

The code :


import tqdm
import random
import pathlib
import itertools
import collections

import os
import cv2
import numpy as np
import remotezip as rz

import tensorflow as tf

# Some modules to display an animation using imageio.
import imageio
from IPython import display
from urllib import request
from tensorflow_docs.vis import embed

def format_frames(frame, output_size):
 """
 Pad and resize an image from a video.

 Args:
 frame: Image that needs to resized and padded. 
 output_size: Pixel size of the output frame image.

 Return:
 Formatted frame with padding of specified output size.
 """
 frame = tf.image.convert_image_dtype(frame, tf.float32)
 frame = tf.image.resize_with_pad(frame, *output_size)
 return frame

def frames_from_video_file(video_path, n_frames, output_size = (224,224), frame_step = 15):
 """
 Creates frames from each video file present for each category.

 Args:
 video_path: File path to the video.
 n_frames: Number of frames to be created per video file.
 output_size: Pixel size of the output frame image.

 Return:
 An NumPy array of frames in the shape of (n_frames, height, width, channels).
 """
 # Read each video frame by frame
 result = []
 src = cv2.VideoCapture(str(video_path)) 

 video_length = src.get(cv2.CAP_PROP_FRAME_COUNT)

 need_length = 1 + (n_frames - 1) * frame_step

 if need_length > video_length:
 start = 0
 else:
 max_start = video_length - need_length
 start = random.randint(0, max_start + 1)

 src.set(cv2.CAP_PROP_POS_FRAMES, start)
 # ret is a boolean indicating whether read was successful, frame is the image itself
 ret, frame = src.read()
 result.append(format_frames(frame, output_size))

 for _ in range(n_frames - 1):
 for _ in range(frame_step):
 ret, frame = src.read()
 if ret:
 frame = format_frames(frame, output_size)
 result.append(frame)
 else:
 result.append(np.zeros_like(result[0]))
 src.release()
 result = np.array(result)[..., [2, 1, 0]]

 return result

video_path = "End_of_a_jam.ogv"

sample_video = frames_from_video_file(video_path, n_frames = 10)
sample_video.shape



Here are the summary of the troubleshooting I did :


- 

-
Check File Path : I verified that the file path to the video was correct and accessible from the Python environment.


-
Verify File Permissions : I ensured that the video file had the necessary permissions to be read by the Python code.


-
Test with Absolute Path : I attempted to use an absolute file path to access the video file to eliminate any ambiguity in the file's location.


-
Check File Format and Encoding : I examined the video file to ensure it was in a supported format and encoded properly for reading by OpenCV.












What could be a cause ?


-
-
FFPMEG command to record screen works only from cmd on windows but not from my Java class
21 mars 2024, par Youssef Hammoumai have a JUNIT test that uses a Java class called ScreenRecordingWatcher where i specified my ffpmeg command to record the computer when my test fails.


But unfortunately, my command only works from my cmd and not from my class, On both sides it generates successfully my file, but when it is generated from my Java class, the file is not readable from my windows player (0xc10100be error).


Here is the command i am using :


C:\outils\ffmpeg-master-latest-win64-gpl\bin\ffmpeg.exe -f gdigrab -framerate 30 -i desktop -c:v h264_nvenc -qp 0 C:\outils\video\output.mkv



Here is the same command from my class :


public class ScreenRecordingWatcher extends TestWatcher {

private static final String FFMPEG_PATH = "C:\\outils\\ffmpeg-master-latest-win64-gpl\\bin\\ffmpeg.exe";
private static final String OUTPUT_FILE = "C:\\outils\\video\\fichier.mkv";
private boolean testFailed = false;

@Override
protected void failed(Throwable e, Description description) {

 super.failed(e, description);
 testFailed = true;
}

@Override
protected void finished(Description description) {
 super.finished(description);
 if (testFailed) {
 startRecording();

 try {
 Thread.sleep(5000);

 } catch (InterruptedException e) {
 throw new RuntimeException(e);
 }
 stopRecording();
 }
}

private void startRecording() {
 String[] command = { FFMPEG_PATH, "-f", "gdigrab", "-framerate", "30", "-i", "desktop", "-c:v", "h264_nvenc", "-qp", "0", OUTPUT_FILE };

 System.out.println(Arrays.toString(command));
 ProcessBuilder builder = new ProcessBuilder(command);
 try {
 builder.start();
 } catch (IOException e) {
 e.printStackTrace();
 }
}

private void stopRecording() {
 String[] command = { "tskill", "ffmpeg" };
 ProcessBuilder builder = new ProcessBuilder(command);
 try {
 builder.start();
 } catch (IOException e) {
 throw new RuntimeException(e);
 }
}



}


Does someone have an idea of why it executes well from my cmd but not from my class ?


Thank you in advance


-
Class "FFMpeg\FFMpeg" not found
16 août 2024, par Saeed EisakhaniI installed ffmpeg on xampp by COMPOSER. I installed FFMPEG on windows before.



Then with the command
composer require php-ffmpeg/php-ffmpeg
installed php-ffmpeg


I use code below (from php-ffmpeg github) for a test but this does not work


<?php

require '../../phpMyAdmin/vendor/autoload.php';

$ffmpeg = FFMpeg\FFMpeg::create(); // line 5 that error referees to 
$video = $ffmpeg->open('video.mpg');
$video
 ->filters()
 ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
 ->synchronize();
$video
 ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
 ->save('frame.jpg');
$video
 ->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4')
 ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
 ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');

?>



This is the error I encounter.



I read many and many similar questions but almost all of them suggest
require '../../phpMyAdmin/vendor/autoload.php';
that I have it in my code.