
Recherche avancée
Autres articles (101)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
Contribute to translation
13 avril 2011You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
MediaSPIP is currently available in French and English (...) -
Prérequis à l’installation
31 janvier 2010, parPréambule
Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
Il (...)
Sur d’autres sites (7643)
-
Python-ffmpeg video metadata editing script - Error splitting the argument list : Option not found
16 janvier, par maric193I have been updating a simple script that allows me to mass edit video files metadata (in a specific folder) and save them with a new filename (inside the same folder). I have been bouncing around different forums and decided to try python-ffmpeg.
For some reason right now I am getting the below FFmpegInvalidCommand exception


Error splitting the argument list: Option not found


I am not quite sure what I am doing wrong here, so I am wondering if someone can give me a fresh set of eyes to determine what the problem is. Apologies in advance, there may be some leftover code that I have not cut out yet. Thanks in advance !


import os
import re
import sys
from pathlib import Path
from ffmpeg import FFmpeg, FFmpegFileNotFound, FFmpegInvalidCommand
#Project looks through a folder, checks all the files in there, then edits metadata (and filename)
#and returns a new file for each file inside the folder

video = 'Anime' #Movie/TVSeries/Anime/etc...
name = 'Sword Art Online (2012)'
extension = '.mkv'
season = '01'
episode = 1

try:
 folder = r'D:\ServerTransfer\Update Server\%s\%s\S%s\\' % (video, name, season)

 #Check current file names
 print('Current names are: ')
 res = os.listdir(folder)
 print(res)
 
 # episode increase by 1 in each iteration
 # iterate all files from a directory
 for file_name in os.listdir(folder):
 # Construct old file name
 source = folder + file_name
 try:
 title = ''
 if episode < 100:
 # Adding the season & episode #'s
 destination = folder + name + '.S' + season + 'E0' + str(episode) + extension
 title = name + '.S' + season + 'E0' + str(episode)
## elif episode < 100:
## # Adding the season & episode #'s
## destination = folder + name + '.S' + season + '.E0' + str(episode) + extension
 else:
 # Adding the season & episode #'s
 destination = folder + name + '.S' + season + 'E' + str(episode) + extension
 title = name + '.S' + season + 'E' + str(episode)
 # Renaming the file
 if file_name.endswith(extension):
 ffmpeg = FFmpeg(executable=r'c:\FFmpeg\bin\ffmpeg.exe').option("y").input(source).output(destination,codec="copy",title=title)
 ffmpeg.execute()
 except FFmpegFileNotFound as exception:
 print("An FFmpegFileNotFound exception has been occurred!")
 print("- Message from ffmpeg:", exception.message)
 print("- Arguments to execute ffmpeg:", exception.arguments)
 except FFmpegInvalidCommand as exception:
 print("An FFmpegInvalidCommand exception has been occurred!")
 print("- Message from ffmpeg:", exception.message)
 print("- Arguments to execute ffmpeg:", exception.arguments)
 except Exception as err:
 print(f'Unexptected {err=}, {type(err)=}')
 raise
 episode += 1
 print('All Files Renamed')
 print('New Names are')
 # verify the result
 res = os.listdir(folder)
 print(res)
except OSError as err:
 print('OS error:', err)
except Exception as err:
 print(f'Unexptected {err=}, {type(err)=}')
 raise



Here is what one of my print statements in the exception says is being executed


- Arguments to execute ffmpeg: ['c:\\FFmpeg\\bin\\ffmpeg.exe', '-y', '-i', 'D:\\ServerTransfer\\Update Server\\Anime\\Sword Art Online (2012)\\S01\\\\[Kosaka] Sword Art Online - 01 - The World of Swords (1080p AV1 10Bit BluRay OPUS) [73066623].mkv', '-codec', 'copy', '-title', 'Sword Art Online (2012).S01E01', 'D:\\ServerTransfer\\Update Server\\Anime\\Sword Art Online (2012)\\S01\\\\Sword Art Online (2012).S01E01.mkv']



I have tried different variations of trying to run ffmpeg via python including using subprocess and shlex libraries. I also tried moviepy, however no one has answered me back on their page.


-
React Native Expo File System : open failed : ENOENT (No such file or directory)
9 février 2023, par coloradayI'm getting this error in a bare React Native project :


Possible Unhandled Promise Rejection (id: 123):
Error: /data/user/0/com.filsufius.VisionishAItest/files/image-new-♥d.jpg: open failed: ENOENT (No such file or directory)



The same code was saving to File System with no problem yesterday, but today as you can see I am getting an ENOENT error, plus I am getting these funny heart shapes ♥d in the path. Any pointers as to what might be causing this, please ? I use npx expo run:android to builld app locally and expo start —dev-client to run on a physical Android device connected through USB.


import { Image, View, Text, StyleSheet } from "react-native";
import * as FileSystem from "expo-file-system";
import RNFFmpeg from "react-native-ffmpeg";
import * as tf from "@tensorflow/tfjs";
import * as cocossd from "@tensorflow-models/coco-ssd";
import { decodeJpeg, bundleResourceIO } from "@tensorflow/tfjs-react-native";

const Record = () => {
 const [frames, setFrames] = useState([]);
 const [currentFrame, setCurrentFrame] = useState(0);
 const [model, setModel] = useState(null);
 const [detections, setDetections] = useState([]);

 useEffect(() => {
 const fileName = "image-new-%03d.jpg";
 const outputPath = FileSystem.documentDirectory + fileName;
 RNFFmpeg.execute(
 "-y -i https://res.cloudinary.com/dannykeane/video/upload/sp_full_hd/q_80:qmax_90,ac_none/v1/dk-memoji-dark.m3u8 -vf fps=25 -f mjpeg " +
 outputPath
 )
 .then((result) => {
 console.log("Extraction succeeded:", result);
 FileSystem.readDirectoryAsync(FileSystem.documentDirectory).then(
 (files) => {
 setFrames(
 files
 .filter((file) => file.endsWith(".jpg"))
 .sort((a, b) => {
 const aNum = parseInt(a.split("-")[2].split(".")[0]);
 const bNum = parseInt(b.split("-")[2].split(".")[0]);
 return aNum - bNum;
 })
 );
 }
 );
 })
 .catch((error) => {
 console.error("Extraction failed:", error);
 });
 }, []);

 useEffect(() => {
 tf.ready().then(() => cocossd.load().then((model) => setModel(model)));
 }, []);
 useEffect(() => {
 if (frames.length && model) {
 const intervalId = setInterval(async () => {
 setCurrentFrame((currentFrame) =>
 currentFrame === frames.length - 1 ? 0 : currentFrame + 1
 );
 const path = FileSystem.documentDirectory + frames[currentFrame];
 const imageAssetPath = await FileSystem.readAsStringAsync(path, {
 encoding: FileSystem.EncodingType.Base64,
 });
 const imgBuffer = tf.util.encodeString(imageAssetPath, "base64").buffer;
 const imageData = new Uint8Array(imgBuffer);
 const imageTensor = decodeJpeg(imageData, 3);
 console.log("after decodeJpeg.");
 const detections = await model.detect(imageTensor);
 console.log(detections);
 setDetections(detections);
 }, 100);
 return () => clearInterval(intervalId);
 }
 }, [frames, model]);

 
 return (
 <view style="{styles.container}">
 
 <view style="{styles.predictions}">
 {detections.map((p, i) => (
 <text key="{i}" style="{styles.text}">
 {p.class}: {(p.score * 100).toFixed(2)}%
 </text>
 ))}
 </view>
 </view>
 );
};

const styles = StyleSheet.create({
 container: {
 flex: 1,
 alignItems: "center",
 justifyContent: "center",
 },
 image: {
 width: 300,
 height: 300,
 resizeMode: "contain",
 },
 predictions: {
 width: 300,
 height: 100,
 marginTop: 20,
 },
 text: {
 fontSize: 14,
 textAlign: "center",
 },
});

export default Record;```



-
libavfilter/vf_dnn_detect : Add yolo support
21 novembre 2023, par Wenbin Chenlibavfilter/vf_dnn_detect : Add yolo support
Add yolo support. Yolo model doesn't output final result. It outputs
candidate boxes, so we need post-process to remove overlap boxes to
get final results. Also, the box's coordinators relate to cell and
anchors, so we need these information to calculate boxes as well.Model detail please refer to : https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v2-tf
Signed-off-by : Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by : Guo Yejun <yejun.guo@intel.com>