Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (66)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP 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 (6848)

  • running ffmpeg.exe from inside bash file [duplicate]

    3 février 2023, par Martin

    Hello I am trying to run ffmpeg from inside a track_cmd.sh file which I run inside command prompt using the command bash track_cmd.sh
My file looks like this :

    


    echo "try1"
C:\Users\marti\Documents\projects\jan2023-rendertune\RenderTune\node_modules\ffmpeg-ffprobe-static\ffmpeg.exe
echo "try2"
# start /d "path" file.exe
start /d "C:\Users\marti\Documents\projects\jan2023-rendertune\RenderTune\node_modules\ffmpeg-ffprobe-static" ffmpeg.exe
echo "try3"
# start "c:\windows\system32" notepad.exe   
start "C:\Users\marti\Documents\projects\jan2023-rendertune\RenderTune\node_modules\ffmpeg-ffprobe-static" ffmpeg.exe   
echo "try4"
#start "" fullPath/file.exe
start "" C:\\Users\\marti\\Documents\\projects\\jan2023-rendertune\\RenderTune\\node_modules\\ffmpeg-ffprobe-static\\ffmpeg.exe
echo "done"


    


    But none of these lines work :

    


    >bash track_cmd.sh
try1
track_cmd.sh: line 2: C:UsersmartiDocumentsprojectsjan2023-rendertuneRenderTunenode_modulesffmpeg-ffprobe-staticffmpeg.exe: command not found
try2
track_cmd.sh: line 5: start: command not found
try3
track_cmd.sh: line 8: start: command not found
try4
track_cmd.sh: line 11: start: command not found
done


    


    I have tried the examples posted in this question :
Bat file to run a .exe at the command prompt

    


    But none work. If I run the command C:\Users\marti\Documents\projects\jan2023-rendertune\RenderTune\node_modules\ffmpeg-ffprobe-static\ffmpeg.exe inside command prompt, I get ffmpeg, so I know the path works.

    


  • Using ffmpeg, extract audio streams from video file and output to single stereo wav file

    8 décembre 2016, par Quantum_Kernel

    I’ve been trying for a few hours to get the right arguments to do the below operation with ffmpeg, but i’m a bit out of my depth. If anyone can give me some guidance, that would be very helpful.

    Input file is MXF with one video track and two separate 48k 24b PCM audio tracks.
    I want to extract just the audio, map first track to left, second track to right and output as a stereo wave file.

    I am trying variations on the below command, but it seems to be unhappy about the video stream, giving the error

    "mapchan : stream #0.0 is not an audio stream."

    ffmpeg -i test2.mxf -vn -map_channel 0.0.1 output.wav_CH0 -map_channel 0.0.2 output.wav_CH1

    Here is ffmpeg’s analysis of the streams in case it is helpful :

       Stream #1:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Stream #1:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:2: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:3: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:4: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:5: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:6: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:7: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
    Stream #1:8: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
  • Can not find file with ffmpeg

    3 août 2018, par P.Ung

    I am programming a server in node.js to process a audio file.
    I save the file with this code :

    app.use(upload());
    app.get("/", function (req, res) {
    res.sendFile("index.html")
    });
    //Uploaded files will be saved
    app.post("/", function (req, res) {
    if (req.files) {
       var file = req.files.filename,
           filename = file.name;
       file.mv("./upload/" + filename, function (err) {
           if (err) {
               console.log("err");
           }
           else {
               res.send("Done");
               console.log(filename);
               convert(filename);

           }
       })
    }
    })

    I save the file in my upload directory. There everthing works great but now comes the problem.
    I convert the file with ffmpeg

    function convert(filename) {    
    var realName = "./upload/" + filename;
    var newName = "./output/" + filename.substr(0, filename.length - 4) + ".flac";
    ffmpegN = ffmpeg(realName);
    ffmpegN.audioBitrate(16).audioFrequency(16000).withAudioCodec('flac').format("flac").save(outputFile);

    ffmpeg(realName)
       .toFormat('flac')
       .on('error', (err) => {
           console.log('An error occurred: ' + err.message);
       })
       .on('progress', (progress) => {
           // console.log(JSON.stringify(progress));
           console.log('Processing: ' + progress.targetSize + ' KB converted');
       })
       .on('end', () => {
           console.log('Processing finished !');
       })
       .save(newName);//path where you want to save your file    
    SpeechToText(newName);
    }

    Then I want to pass this file to the google speech api. But then I get the error that the file is not found
    Here is the code for the Speech Api :

    function SpeechToText(path) {
    // The name of the audio file to transcribe
    const fileName = path;

    // Reads a local audio file and converts it to base64
    const file = fs.readFileSync(fileName);
    const audioBytes = file.toString('base64');

    // The audio file's encoding, sample rate in hertz, and BCP-47 language code
    const audio = {
       content: audioBytes,
    };
    const config = {
       encoding: 'FLAC',        
       languageCode: 'de-DE',
    };
    const request = {
       audio: audio,
       config: config,
    };

    // Detects speech in the audio file
    client
       .recognize(request)
       .then(data => {
           const response = data[0];
           const transcription = response.results
               .map(result => result.alternatives[0].transcript)
               .join('\n');
           console.log(`Transcription: ${transcription}`);
       })
       .catch(err => {
           console.error('ERROR:', err);
       });
    }

    The thing is that if I upload a file everything works. But if I try it for a second time the error occurs :

    fs.js:646
    return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                ^

    Error: ENOENT: no such file or directory, open                
    'C:\Users\paulu\desktop\API\output\sample.flac'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at SpeechToText (C:\Users\paulu\desktop\API\server.js:68:21)
    at convert (C:\Users\paulu\desktop\API\server.js:121:5)
    at C:\Users\paulu\desktop\API\server.js:50:17
    at doMove (C:\Users\paulu\desktop\API\node_modules\express-
    fileupload\lib\index.js:152:17)
    at WriteStream.<anonymous> (C:\Users\paulu\desktop\API\node_modules\express-
    fileupload\lib\in                             dex.js:182:15)
    at emitNone (events.js:106:13)
    at WriteStream.emit (events.js:208:7)
    at fs.close (fs.js:2094:12)
    </anonymous>

    Thank you for all answers !