
Recherche avancée
Autres articles (21)
-
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 (...) -
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (4638)
-
Getting know how much progress has ffmpeg done in C#
29 décembre 2022, par Aenye_CerbinI'm writing an app that uses ffmpeg to convert audio/video files.
I can call ffmpeg and specify it's options, I can see that it's working.
I want to be able to check how much of the job is done, so I can present it to user.
As I've read ffmpeg doesn't support any progress bar or percentage and ffmpeg console output is not very friendly, so I cannot simply show it's output to user, because it will look awful. I am not using any wrapper and do not plan to use any because I need to write my own backend that call ffmpeg and frontend to communicate with user.


I'm using System.Threading to start ffmpeg in new process, I can say if the process is running, or get it's exit code, but I don't see any way to get info about how much of the job is done. I thought I can simply measure input file size and check periodically output file size, but it won't be any accurate, because the output file will have different size depending on what codec and container we use.
I've read I can also use frame progress, but the way of obtaining it is still not clear to me. I also need to do it for audio files.


Is there any reasonable way to do so ?


-
Failed to convert web-saved .wemb audio to .wav by using php "shell_exec" and javascript
30 mai 2022, par AnirbasgnawI'm working on an online experimenter which could record participants' audio from the browser. The audio data I get has an extension of .wemb, so I plan to use ffmpeg to convert it to .wav while I save the data.


I tried to use PHP's
shell_exec
but nothing happens when I run the scripts. Then I found that myecho
andprint_r
also did not work. I'm new to PHP and javascript, so I''m really confused now.

Below are the relevant codes, I really appreciate it if you could help !


write_data.php
:

<?php
 $post_data = json_decode(file_get_contents('php://input'), true); 
 // the directory "data" must be writable by the server
 $name = "../".$post_data['filename'];
 $data = $post_data['filedata'];
 // write the file to disk
 file_put_contents($name, $data);
 
 $INPUT = trim($name) . ".webm";
 $OUTPUT = trim($name) . ".wav";
 echo "start converting...";

 // check if ffmprg is available
 $ffmpeg = trim(shell_exec('which ffmpeg'));
 print_r($ffmpeg);
 // call ffmpeg
 shell_exec("ffmpeg -i '$INPUT' -ac 1 -f wav '$OUTPUT' 2>&1 ");
?>



javascript
:

saveData: function(fileName,format){
 // save as json by default
 if (!format){ format = 'json';}
 // add extension to filename
 fileName = `${fileName}.${format}`
 // create saveData object using fetch
 let saveData = [];
 if (format == 'json') {
 saveData = {
 type: 'call-function',
 async: true,
 func: async function(done) {
 let data = jsPsych.data.get().json();
 const response = await fetch("../write_data.php", {
 method: "POST",
 headers: {
 "content-type": "application/json"
 },
 body: JSON.stringify({ filename: fileName, filedata: data })
 });
 if (response.ok) {
 const responseBody = await response.text();
 done(responseBody);
 }
 }
 }
 } else {
 saveData = {
 type: 'call-function',
 async: true,
 func: async function(done) {
 let data = jsPsych.data.get().csv();
 const response = await fetch("../write_data.php", {
 method: "POST",
 headers: {
 "content-type": "application/json"
 },
 body: JSON.stringify({ filename: fileName, filedata: data })
 });
 if (response.ok) {
 const responseBody = await response.text();
 done(responseBody);
 }
 }
 }
 }
 return saveData;
 },



-
How can I stream then play YUV format with/without VLC/FFMPEG ?
13 janvier 2023, par orfruitI'm able to play a local YUV file through VLC (as expected)


.\vlc.exe --demux rawvideo --rawvid-fps 25 --rawvid-width 480 --rawvid-height 360 --rawvid-chroma I420 out.yuv



Also FFPLAY is playing well


.\ffplay.exe -f rawvideo -pixel_format yuv420p -video_size 480x360 out.yuv



Conversion to YUV was done with FFMPEG


.\ffmpeg.exe -i "video.mp4" -c:v rawvideo -pixel_format yuv420p out.yuv



However, I'm not able o stream it and play'it over local network.
I know, it sounds crazy :) but I plan to use VLC as a monitor/debugger for some YUV data.


The original MP4 file is streamed/played fine with VLC (test on the same computer)


.\vlc.exe "video.mp4" --sout="#std{access=http, mux=ts, dst=:55555/}"
.\vlc.exe http://192.168.0.174:55555/



So the big question !
How can I stream the YUV format and VLC recognise an play it as well ?


All that I tried with VLC is not playable.


Thanks for any hints !