Recherche avancée

Médias (0)

Mot : - Tags -/formulaire

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

Autres articles (55)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans 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 (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (6235)

  • Pyinstaller exe works halfway on another computer

    21 octobre 2022, par At Bay

    I created an exe using pyinstaller. I did this by doing the following :

    


    pyinstaller cliptranscript.py


    


    When I run it on another computer, it's works partially. The code starts by asking the user for some arguments, after those inputs I get this error :

    


    Enter directory of wav files: C:\Users\myname\Downloads\&#xA;Enter clip start (seconds): 0&#xA;Enter desired clip length (seconds): 5&#xA;Traceback (most recent call last):&#xA;  File "cliptranscript.py", line 134, in <module>&#xA;  File "cliptranscript.py", line 47, in ffmpeg&#xA;  File "subprocess.py", line 503, in run&#xA;  File "subprocess.py", line 971, in __init__&#xA;  File "subprocess.py", line 1440, in _execute_child&#xA;FileNotFoundError: [WinError 2] The system cannot find the file specified&#xA;[13304] Failed to execute script &#x27;cliptranscript&#x27; due to unhandled exception!&#xA;</module>

    &#xA;

    I'm using ffmpeg and the libraries os, subprocess, datetime, speech_recognition, and xlsx writer.

    &#xA;

  • Trying to get property of non-object while uploading to database

    26 novembre 2017, par Programmmereg

    I have a script when user can clip video, then that video uploads to public folder, and now I want to upload all video data to database. But i get error like in title. Here’s my code :

    Controller :

    public function clip($id)
       {
           $video = Video::where('id', $id)->first();

           $oldId = $video->id;
           $originalName = $video->original_name;
           $newName = str_random(50) . '.' . 'mp4';

           FFMpeg::fromDisk('public')
           ->open('/uploads/videos/' .$video->file_name)
           ->addFilter(function ($filters) {
           $filters->clip(FFMpeg\Coordinate\TimeCode::fromSeconds(5), FFMpeg\Coordinate\TimeCode::fromSeconds(2));
           })
           ->export()
           ->toDisk('public')
           ->inFormat(new \FFMpeg\Format\Video\X264)
           ->save('/uploads/videos/' . $newName);



           $data = ['user_id'=>Auth::user()->id,
               'file_name'=>$newName,
               'original_name'=> $originalName,
               'old_id' => $oldId,
           ];

            $video = Video::edit($data);
       }

    Model :

    public static function edit($request)
       {
           $video = new Video;
           $video->user_id = $request->user_id;
           $video->file_name = $request->file_name;
           $video->original_name = $request->original_name;
           $video->save();

           $old = $file = Video::where('id', $request->old_id)->delete();
           //$old_file = unlink($request->file('file'));

           return $video;
       }

    What should I edit ?

  • How to record/trim/combine audio seamlessly in a React/Node web app

    16 mai 2021, par Rayhan Memon

    I've developed a digital audio workstation for the browser that you can check out here. Essentially it helps authors narrate their own audiobooks themselves at home.

    &#xA;

    I'm looking to dramatically improve the speed at which audio files are combined or trimmed.

    &#xA;

    Right now, the user records some variable amount of audio (a line, paragraph, or entire passage). When the user stops recording, this clip is added to the main audio file for the section using ffmpeg.wasm like so :

    &#xA;

            if (duration === 0) {&#xA;            //concatenate the two files (they should already be written to memory)&#xA;            await ffmpeg.run(&#x27;-i&#x27;, &#x27;concat:fullAudio.mp3|clip.mp3&#x27;, &#x27;-c&#x27;, &#x27;copy&#x27;, &#x27;fullAudio.mp3&#x27;);&#xA;&#xA;        } else {&#xA;            //Set the insert time to wherever the user&#x27;s cursor is positioned&#xA;            let insertTime = duration;&#xA;            if (selectedObj) {&#xA;                insertTime = selectedObj.endTime;&#xA;            }&#xA;&#xA;            //split the audio file into two parts at the point we want to insert the audio&#xA;            await ffmpeg.run(&#x27;-i&#x27;, &#x27;fullAudio.mp3&#x27;, &#x27;-t&#x27;, `${insertTime}`, &#x27;-c&#x27;, &#x27;copy&#x27;, &#x27;part1.mp3&#x27;, &#x27;-ss&#x27;,  `${insertTime}`, &#x27;-codec&#x27;, &#x27;copy&#x27;, &#x27;part2.mp3&#x27;);&#xA;&#xA;            //concatenate the three files&#xA;            await ffmpeg.run(&#x27;-i&#x27;, &#x27;concat:part1.mp3|clip.mp3&#x27;, &#x27;-acodec&#x27;, &#x27;copy&#x27;, &#x27;intermediate.mp3&#x27;);&#xA;            await ffmpeg.run(&#x27;-i&#x27;, &#x27;concat:intermediate.mp3|part2.mp3&#x27;, &#x27;-acodec&#x27;, &#x27;copy&#x27;, &#x27;fullAudio.mp3&#x27;);&#xA;        }&#xA;&#xA;        //Read the result from memory&#xA;        const data = ffmpeg.FS(&#x27;readFile&#x27;, &#x27;fullAudio.mp3&#x27;);&#xA;&#xA;        //Create URL so it can be used in the browser&#xA;        const url = URL.createObjectURL(new Blob([data.buffer], { type: &#x27;audio/mp3&#x27; }));&#xA;        globalDispatch({ type: "setFullAudioURL", payload: url });&#xA;

    &#xA;

    After every recorded clip, the user is forced to wait a few seconds for this concatenation process to finish up - and the longer the main file or recorded clip gets, the longer the user has to wait. Looking at other browser-based audio editors such as AudioMass, it clearly seems possible to make a seamless recording and editing experience with zero wait time, but I can't seem to figure out how to do the same within my react app.

    &#xA;

    Is it possible to seamlessly combine or trim audio data within a React app ? Is FFMPEG the best way to go about it, or are there simpler ways using pure javascript ?

    &#xA;