
Recherche avancée
Autres articles (45)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, 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 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 (...)
Sur d’autres sites (6301)
-
PHP-FFMPEG On Progress doesn't display until process is finished when encoding a video
10 août 2022, par Ryan DIm running PHP-FFmpeg to encode videos which works great.


https://github.com/PHP-FFMpeg/PHP-FFMpeg



Using their example to get the current progress


$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('test.mp4');

$format = new FFMpeg\Format\Video\X264();
$format->on('progress', function ($video, $format, $percentage) {
 echo "$percentage % transcoded";
});

$video->save($format, 'encoded.mp4');



The issue is the progress percentage doesn't display until the encoding is finished which doesn't really help out much. Id like to get the current percentage of encoding as it goes. Im just running this PHP file standalone, maybe I need to do an AJAX call or something to return the data ?


-
Download billboard hot 100 (but only 50) mp3 files
4 mars 2021, par AtlasYo yo yo. I got this insane idea to get 50 of the billboard hot 100 songs, download them into mp3 files, and then put them on private online radio.


Problem is, the way I do it doesn't download each file one by one, it puts all the music together in one mp3 file. Here's my code so far (terrible, I know... I just wanna throw this together really quickly)


const { getChart } = require("billboard-top-100");
const ffmpeg = require("fluent-ffmpeg");
const { mkdir } = require("fs");
const ytdl = require("ytdl-core");
const YT = require("scrape-youtube").default;

getChart('hot-100', (err, chart) => {
 if(err) console.log(err);
 chart.songs.length = 50;
 for (var i = 0; i < chart.songs.length; i++) {
 var song = chart.songs[i];
 song.artist = song.artist.replace("Featuring", "feat.");
 var name = `${song.artist} - ${song.title}`;
 YT.search(name).then(res => {
 downloadVideo(res.videos[0].link, name).then(_ => { console.log(""); }).catch(console.log);
 }).catch(err => console.log(err));
 };
});

function downloadVideo(url, name) {
 return new Promise((resolve, reject) => {
 var stream = ytdl(url, { filter: "audioonly", quality: "highestaudio" });
 var start = Date.now();

 ffmpeg(stream)
 .audioBitrate(128)
 .save(`${__dirname}/${new Date().getWeek()}/${name}.mp3`)
 .on("end", _ => {
 console.log(`Downloaded "${name}.mp3" - Took ${(Date.now() - start) / 1000} seconds.`);
 resolve(`${name}.mp3`);
 })
 .on("error", _ => reject("something went wong"));
 });
}

Date.prototype.getWeek = function() {
 var onejan = new Date(this.getFullYear(),0,1);
 return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
}



-
Unable to use Multithread for librosa melspectrogram
15 avril 2019, par Raven CheukI have over 1000 audio files (it’s just a initial development, in the future, there will be even more audio files), and would like to convert them to melspectrogram.
Since my workstation has a Intel® Xeon® Processor E5-2698 v3, which has 32 threads, I would like to use multithread to do my job.
My code
import os
import librosa
from librosa.display import specshow
from natsort import natsorted
import numpy as np
import sys
# Libraries for multi thread
from multiprocessing.dummy import Pool as ThreadPool
import subprocess
pool = ThreadPool(20)
songlist = os.listdir('../opensmile/devset_2015/')
songlist= natsorted(songlist)
def get_spectrogram(song):
print("start")
y, sr = librosa.load('../opensmile/devset_2015/' + song)
## Add some function to cut y
y_list = y
##
for i, y_i in enumerate([y_list]): # can remove for loop if no audio is cut
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000)
try:
np.save('./Test/' + song + '/' + str(i), S)
except:
os.makedirs('./Test/' + song)
np.save('./Test/' + song + '/' + str(i), S)
print("done saving")
pool.map(get_spectrogram, songlist)My Problem
However, my script freezes after finished the first conversion.
To debug what’s going on, I commented out
S = librosa.feature.melspectrogram(y=y, sr=sr, n_mels=128,fmax=8000)
and replace it byS=0
.
Then the multi-thread code works fine.What’s wrong with the
librosa.feature.melspectrogram
function ? Does it not support multi-thread ? Or is it a problem of ffmpeg ? (When using librosa, it asks me to install ffmpeg before.)