Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (12)

  • Other interesting software

    13 avril 2011, par

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website : http://videopress.com/
    License : GNU/GPL v2
    Source code : (...)

  • Emballe médias : à quoi cela sert ?

    4 février 2011, par

    Ce plugin vise à gérer des sites de mise en ligne de documents de tous types.
    Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;

  • Prérequis à l’installation

    31 janvier 2010, par

    Préambule
    Cet article n’a pas pour but de détailler les installations de ces logiciels mais plutôt de donner des informations sur leur configuration spécifique.
    Avant toute chose SPIPMotion tout comme MediaSPIP est fait pour tourner sur des distributions Linux de type Debian ou dérivées (Ubuntu...). Les documentations de ce site se réfèrent donc à ces distributions. Il est également possible de l’utiliser sur d’autres distributions Linux mais aucune garantie de bon fonctionnement n’est possible.
    Il (...)

Sur d’autres sites (4123)

  • Synchronize video subtitle with text-to-speech voice

    8 décembre 2015, par Ahmad

    I try to create a video of a text in which the text is narrated by text-to-speech.

    To create the video file, I use the VideoFileWriter of Aforge.Net as the following :

    VideoWriter = new VideoFileWriter();

    VideoWriter.Open(CurVideoFile, (int)(Properties.Settings.Default.VideoWidth),
       (int)(Properties.Settings.Default.VideoHeight), 25, VideoCodec.MPEG4, 800000);

    To read aloud the text I use SpeechSynthesizer class and write the output to a wave stream

    AudioStream = new FileStream(CurAudioFile, FileMode.Create);
    synth.SetOutputToWaveStream(AudioStream);

    I want to highlight the word is spoken in the video, so I synchronize them by the SpeakProgress event :

       void synth_SpeakProgress(object sender, SpeakProgressEventArgs e)
       {

           curAuidoPosition = e.AudioPosition;
           using (Graphics g = Graphics.FromImage(Screen))
           {
                g.DrawString(e.Text,....);
           }                    
           VideoWriter.WriteVideoFrame(Screen, curAuidoPosition);
       }

    And finally, I merge the video and audio using ffmpeg

    using (Process process = new Process())
    {
             process.StartInfo.FileName = exe_path;
             process.StartInfo.Arguments = string.Format(@"-i ""{0}"" -i ""{1}"" -y -acodec copy -vcodec copy ""{2}""",
                                              avi_path, mp3_path, output_file);
    ......

    The problem is that for some voices like Microsoft Hazel, Zira and David, the video is not synchronized with the audio, and the audio is much faster than the shown subtitle. In windows 7, it works for Mircrosoft Sam

    How can I synchronize them so that it works for any text-to-speech voices ?

  • sending variables to subprocess call with spaces - python 2.7

    24 novembre 2015, par Tandy Freeman

    I want to add ffmpeg options to a variable and later use it in a subprocess call. If the variable contains one word, all is well, but if it contains more than one, I get errors. I am working on a larger script and I will need to have extra options such as this for certain codecs. How can I get this working ?

    The following works perfectly for me :

    import subprocess
    import sys

    video_codec = 'libx264'
    output = sys.argv[1] + '.mkv'
    subprocess.call(['ffmpeg',
               '-i',sys.argv[1],
               '-c:v',video_codec,
               '-c:a','copy',        
               output])    

    Once I introduce new options/spaces to video_options as such :

    video_codec = "'libx264', '-pix_fmt', 'yuv420p'"

    I get an ffmpeg error :

    Unknown encoder ''libx264', '-pix_fmt', 'yuv420p''

    If I remove the double quotes and just use
    video_codec = ’libx264’, ’-pix_fmt’, ’yuv420p’

    I get a python error :

    Traceback (most recent call last):
     File "testo.py", line 10, in <module>
       output])<br />
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 524, in call
       return Popen(*popenargs, **kwargs).wait()
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
       errread, errwrite)
     File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
       raise child_exception
    TypeError: execv() arg 2 must contain only strings
    </module>
  • Correct ffmpeg scale command syntax

    10 novembre 2015, par user3132858

    I am new to ffmpeg and need some help with the correct syntax for a scale command I found here.

    Below is my code :

    $width=300;
    $height=200;
    $aspect=$width/$height;


    $command = "/usr/local/bin/ffmpeg -y -i 1.mp4 -vf scale=min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")) * (gte(a\,".$aspect.")*".$width." + \
    lt(a\,".$aspect.")*((".$height."*iw)/ih)) + not(min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")))*iw : \
    min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")) * (lte(a\,".$aspect.")*".$height." + \
    gt(a\,".$aspect.")*((".$width."*ih)/iw)) + not(min(1\,gt(iw\,".$width.")+gt(ih\,".$height.")))*ih  -b 1200k -acodec aac -strict -2 2.mp4 ";

    Video is successfully converted however, the scaling does not go trough.

    The code is copied word for word, I only make two changes :

    • removed the " before scale word and from the end
    • replaced the $FW with $width, $FH with $height and $FA with $aspect.

    Any suggestion at what might be wrong ?