
Recherche avancée
Médias (1)
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
Autres articles (60)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Installation en mode ferme
4 février 2011, parLe mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
C’est la méthode que nous utilisons sur cette même plateforme.
L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...) -
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 (...)
Sur d’autres sites (8010)
-
find the timestamp of a sound sample of an mp3 with linux or python
23 juin 2020, par cardamomI am slowly working on a project which where it would be very useful if the computer could find where in an mp3 file a certain sample occurs. I would restrict this problem to meaning a fairly exact snippet of the audio, not just for example the chorus in a song on a different recording by the same band where it would become more some kind of machine learning problem. Am thinking if it has no noise added and comes from the same file, it should somehow be possible to locate the time at which it occurs without machine learning, just like grep can find the lines in a textfile where a word occurs.


In case you don't have an mp3 lying around, can set up the problem with some music available on the net which is in the public domain, so nobody complains :


curl https://web.archive.org/web/20041019004300/http://www.navyband.navy.mil/anthems/ANTHEMS/United%20Kingdom.mp3 --output godsavethequeen.mp3



It's a minute long :


exiftool godsavethequeen.mp3 | grep Duration
Duration : 0:01:03 (approx)



Now cut out a bit between 30 and 33 seconds (the bit which goes la la la la..) :


ffmpeg -ss 30 -to 33 -i godsavethequeen.mp3 gstq_sample.mp3



both files in the folder :


$ ls -la
-rw-r--r-- 1 cardamom cardamom 48736 Jun 23 00:08 gstq_sample.mp3
-rw-r--r-- 1 cardamom cardamom 1007055 Jun 22 23:57 godsavethequeen.mp3



This is what am after :


$ findsoundsample gstq_sample.mp3 godsavethequeen.mp3
start 30 end 33



Am happy if it is a bash script or a python solution, even using some kind of python library. Sometimes if you use the wrong tool, the solution might work but look horrible, so whichever tool is more suitable. This is a one minute mp3, have not thought yet about performance just about getting it done at all, but would like some scalability, eg find ten seconds somewhere in half an hour.


-
How to Bulk Speed UP and Crop Videos FFMPEG
6 septembre 2023, par Usemo ShankI have videos in (input) folder that is located on the root of the script, I also have output folder on the root, The input folder has several videos that i want to speed up in bulk by 1.1 percent, I also want to cropt the videos by 90 percent (Meaning 90 Percent of original video is visible).


I have a code that does not function well. Here is the code I have


import os
import subprocess

# Define input and output directories
input_folder = "input"
output_folder = "output"

# Create the output directory if it doesn't exist
if not os.path.exists(output_folder):
 os.makedirs(output_folder)

# List all video files in the input directory
input_files = [f for f in os.listdir(input_folder) if f.endswith(('.mp4', '.avi', '.mkv'))]

# Speed up and crop each video
for input_file in input_files:
 input_path = os.path.join(input_folder, input_file)
 output_file = os.path.splitext(input_file)[0] + "_speed_crop.mp4"
 output_path = os.path.join(output_folder, output_file)

 # FFmpeg command to speed up video by 1.1x and crop to 90%
 ffmpeg_command = [
 "ffmpeg",
 "-i", input_path,
 "-vf", "setpts=1.1*PTS,crop=in_w*0.9:in_h*0.9",
 "-c:v", "libx264",
 "-crf", "20",
 "-c:a", "aac",
 "-strict", "experimental",
 output_path
 ]

 # Run FFmpeg command
 subprocess.run(ffmpeg_command)

print("Conversion complete.")



-
wrap h.264 stream in mp.4 container and stream it with nodejs
30 mars 2017, par idoshI have a stream of h.264 data from a remote webcam. If i save it to a file i’m able to play it in VLC (meaning that the data arrives intact).
The final goal is to turn this stream into a virtual webcam. After looking around I found manyCam as a possible solution - therefor i want to serve the h.264 data on a local IP in MP4 format.
Two questions :
first, I’m trying to wrap the h.264 with the mp4 container using ffmpeg (using fluent-ffmpeg npm library that exposes the ffmpeg API to Nodejs).
Everything works well when i’m handling static files (not streams). e.g.`
var ffmpeg = rquire('fluent-ffmpeg')
var readH264 = fs.createReadStream('./vid.h264')
var proc = ffmpeg(readH264).clone().toFormat('mp4').output('./vid.mp4').run()`
But when I’m trying to feed a stream - it throws an error "ffmpeg exited with code 1 : could not write header for output file.."
`var wrtieMp4 = fs.createWriteStream('./vid.mp4')
var proc = ffmpeg(readH264).clone().toFormat('mp4').output(wrtieMp4).run()`How can i add it a header..?
Second, I’m a bit confused about the transport layer (rtp, rtsp, etc.). After creating the mp4 stream - wouldn’t it be sufficient to serve the stream with MIME type video/mp4 ? It seem to work fine with static file.
`let read = fs.createReadStream('./vid.mp4')
let server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-type': "video/mp4"})
read.pipe(res)
}).listen(9000)`