Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (37)

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

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

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (8513)

  • Use ffmpeg to add text subtitles [closed]

    9 octobre 2024, par 0-alpha

    I am trying to add text subtitles to an .mp4 container using ffmpeg :

    



    ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mp4


    



    When I am trying to run this line, it gives me an error :

    



    


    Nmber of stream maps must match number of output streams.

    


    



    If I try to change the mp4 to mkv (although mp4 supports text subtitles), like this :

    



    ffmpeg -i input.mp4 -i input.srt -map 0.0 -map 0.1 -map 1.0 output.mkv


    



    It correctly maps the streams, but gives an error :

    



    


    Encoder (codec id 94210) not found for output stream #0.2

    


    



    When I launch

    



    ffmpeg -codecs


    



    I can see that srt codec is supported as decoder and encoder, however I am not sure what is used for mp4 and mkv subs encoding, and whether I need to switch it on or compile separately.

    


  • ffmpeg - error when overlay text animation and video

    14 novembre 2017, par Abc123

    I’m using this ffmpeg command to generate a video with fading text animation, this command is running fine with older version of ffmpeg - 2.8.11, but when I try to run the same command in another machine with ffmpeg version - 3.3.3, error occured :

    ffmpeg command :

    ffmpeg -i ./based_video/720/clip3.mp4 -filter_complex \
    "color=black:100x100[c]; \
    [c][0]scale2ref[ct][mv]; \
    [ct]setsar=1,split=3[t1][t2][t3]; \
    [t1]drawtext=fontfile=../../public/fonts/Roboto-Regular-webfont.ttf: \
    text='Test Text 1':fontsize=36:fontcolor=white,split[text1][alpha1]; \
    [text1][alpha1]alphamerge,fade=t=in:st=2:d=2:alpha=1,fade=t=out:st=7:d=2:alpha=1[txta1]; \
    [t2]drawtext=fontfile=../../public/fonts/Roboto-Regular-webfont.ttf: \
    text='Test Text 2':fontsize=36:fontcolor=white,split[text2][alpha2]; \
    [text2][alpha2]alphamerge,fade=t=in:st=2:d=2:alpha=1,fade=t=out:st=7:d=2:alpha=1[txta2]; \
    [t3]drawtext=fontfile=../../public/fonts/Roboto-Regular-webfont.ttf: \
    text='Test Text 3':fontsize=36:fontcolor=white,split[text3][alpha3]; \
    [text3][alpha3]alphamerge,fade=t=in:st=2:d=2:alpha=1,fade=t=out:st=7:d=2:alpha=1[txta3]; \
    [mv][txta1]overlay=x='300':y='300':shortest=1[mv1]; \
    [mv1][txta2]overlay=x='300':y='400':shortest=1[mv2]; \
    [mv2][txta3]overlay=x='300':y='500':shortest=1" \
    -c:v libx264 -c:a copy output.mp4

    Error : Error marking filter as finished, Conversion failed

  • Watson NarrowBand Speech to Text not accepting ogg file

    19 janvier 2017, par Bob Dill

    NodeJS app using ffmpeg to create ogg files from mp3 & mp4. If the source file is broadband, Watson Speech to Text accepts the file with no issues. If the source file is narrow band, Watson Speech to Text fails to read the ogg file. I’ve tested the output from ffmpeg and the narrowband ogg file has the same audio content (e.g. I can listen to it and hear the same people) as the mp3 file. Yes, in advance, I am changing the call to Watson to correctly specify the model and content_type. Code follows :

    exports.createTranscript = function(req, res, next)
    { var _name = getNameBase(req.body.movie);
     var _type = getType(req.body.movie);
     var _voice = (_type == "mp4") ? "en-US_BroadbandModel" : "en-US_NarrowbandModel" ;
     var _contentType = (_type == "mp4") ? "audio/ogg" : "audio/basic" ;
     var _audio = process.cwd()+"/HTML/movies/"+_name+'ogg';
     var transcriptFile = process.cwd()+"/HTML/movies/"+_name+'json';

     speech_to_text.createSession({model: _voice}, function(error, session) {
       if (error) {console.log('error:', error);}
       else
         {
           var params = { content_type: _contentType, continuous: true,
            audio: fs.createReadStream(_audio),
             session_id: session.session_id
             };
             speech_to_text.recognize(params, function(error, transcript) {
               if (error) {console.log('error:', error);}
               else
                 { fs.writeFile(transcriptFile, JSON.stringify(transcript), function(err) {if (err) {console.log(err);}});
                   res.send(transcript);
                 }
             });
         }
     });
    }

    _type is either mp3 (narrowband from phone recording) or mp4 (broadband)
    model: _voice has been traced to ensure correct setting
    content_type: _contentType has been traced to ensure correct setting

    Any ogg file submitted to Speech to Text with narrowband settings fails with Error: No speech detected for 30s. Tested with both real narrowband files and asking Watson to read a broadband ogg file (created from mp4) as narrowband. Same error message. What am I missing ?