
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (103)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
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 (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (15773)
-
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;
 },



-
While converting MP4 to MP3, I am getting "Moviepy - Command returned an error" ?
15 juin 2022, par raj sharmaMoviepy - Command returned an error Internal Server Error : /api/aws/transcribe Traceback (most recent call last) : File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/home/web_admin_WT/video_transcript/wtvideo_transcript/aws_transcript/views.py", line 13, in post transcribe_id, success_status = aws_transcribe(urls) File "/home/web_admin_WT/video_transcript/wtvideo_transcript/aws_transcript/helper.py", line 26, in aws_transcribe s3_url = upload_file_s3(url) File "/home/web_admin_WT/video_transcript/wtvideo_transcript/aws_transcript/helper.py", line 133, in upload_file_s3 moviepy.video.io.ffmpeg_tools.ffmpeg_extract_audio(url, download_path) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/moviepy/video/io/ffmpeg_tools.py", line 59, in ffmpeg_extract_audio subprocess_call(cmd) File "/home/web_admin_WT/video_transcript/env/lib/python3.6/site-packages/moviepy/tools.py", line 56, in subprocess_call raise IOError(err.decode('utf8')) OSError : ffmpeg version 4.2.2-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration : —enable-gpl —enable-version3 —enable-static —disable-debug —disable-ffplay —disable-indev=sndio —disable-outdev=sndio —cc=gcc —enable-fontconfig —enable-frei0r —enable-gnutls —enable-gmp —enable-libgme —enable-gray —enable-libaom —enable-libfribidi —enable-libass —enable-libvmaf —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-librubberband —enable-libsoxr —enable-libspeex —enable-libsrt —enable-libvorbis —enable-libopus —enable-libtheora —enable-libvidstab —enable-libvo-amrwbenc —enable-libvpx —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libdav1d —enable-libxvid —enable-libzvbi —enable-libzimg libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 h : No such file or directory


I getting this error when i am trying to convert MP4 to MP3 using Moviepy library of python. Can someone please tell me how can i solve it


-
FFmpeg "Could not open file" error message when processing with PHP
22 juin 2022, par FlyingCatI am using
ffmpeg
to get the image from several video files. I got myffmpeg
codes ready but I got the following error when Iexec
my codes.


ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3

*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
//files info...
//files info...
Incompatible pixel format 'yuv420p' for codec 'mjpeg', auto-selecting format 'yuvj420p'
//file info...
[buffer @ 0x1513c40] Buffering several frames is not supported. Please consume all available frames before adding a new one.
 Last message repeated 75 times
[image2 @ 0x1513460] Could not open file : /test/project
av_interleaved_write_frame(): Input/output error




I only show the error messages that have color highlighted. 
My code :



$ffmpeg ="/usr/bin/ffmpeg";

 $image_source_path = '/test/project/test.mp4';
 $ALL_PLACE_WIDTH = 300;
 $ALL_PLACE_HEIGHT = 300;

 $image_cmd = " -r 1 -ss 00:00:10 -t 00:00:01 -s ".$ALL_PLACE_WIDTH."x".$ALL_PLACE_HEIGHT." -f image2 " ;

 $dest_image_path = '/test/project';

 $str_command= $ffmpeg ." -i " . $image_source_path . $image_cmd .$dest_image_path;
 shell_exec($str_command);




It seems my Linux wants to me to switch to
avconv
. I am not sure how to fix these errors. Can someone give me a hint about it ?