Recherche avancée

Médias (91)

Autres articles (31)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4772)

  • ffmpeg -var_stream_map Invalid keyval "v:0

    22 septembre 2020, par rmrf fly

    the ffmpeg command is correct,

    


    use ffmpeg command execute at command line is ok,

    


    int windows10 use java exec the command is ok ,

    


    by only in linux when i use java exec the ffmpeg command throw expection

    


    the command :

    


    ffmpeg -i /data/vsftpd/Anchor.mp4 -b:v:0 1000k -b:v:1 256k -b:a:0 64k -b:a:1 32k -map 0:v -map 0:a -map 0:v -map 0:a -f hls -var_stream_map "v:0,a:0 v:1,a:1" -hls_segment_filename 'file_%v_%03d.ts' out_%v.m3u8


    


    enter image description here

    


    [hls @ 0xd31b5c0] Invalid keyval "v:0
[hls @ 0xd31b5c0] Variant stream info update failed with status ffffffea
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument


    


    jar

    


    <dependency>&#xA;   <groupid>org.apache.commons</groupid>&#xA;   <artifactid>commons-exec</artifactid>&#xA;   <version>1.3</version>&#xA;</dependency>&#xA;

    &#xA;

    java code

    &#xA;

    public static int exeCommand(String command, OutputStream out) throws ExecuteException, IOException {&#xA;    CommandLine commandLine = CommandLine.parse(command);&#xA;    PumpStreamHandler pumpStreamHandler = null;&#xA;    if (null == out) {&#xA;        pumpStreamHandler = new PumpStreamHandler();&#xA;    } else {&#xA;        pumpStreamHandler = new PumpStreamHandler(out);&#xA;    }&#xA;&#xA;    // time out 10s&#xA;    ExecuteWatchdog watchdog = new ExecuteWatchdog(10000);&#xA;&#xA;    DefaultExecutor executor = new DefaultExecutor();&#xA;    executor.setStreamHandler(pumpStreamHandler);&#xA;    //executor.setWatchdog(watchdog);&#xA;&#xA;    return executor.execute(commandLine);&#xA;}&#xA;

    &#xA;

  • Getting "OSError : [Errno 32] Broken pipe" while saving a numpy array using imageio.mimwrite into io.BytesIO() object

    10 novembre 2020, par green_hunter434

    I am trying to save a numpy array (array of frames) as a video using imageio.mimwrite .

    &#xA;

    Operation like this works fine -

    &#xA;

    imageio.mimwrite(&#x27;./temp4.mp4&#x27;, frames, fps=fps, format=&#x27;.mp4&#x27;)&#xA;

    &#xA;

    But, when I try something like this -

    &#xA;

    fo = io.BytesIO()&#xA;imageio.mimwrite(fo, frames, fps=fps, format=&#x27;.mp4&#x27;)&#xA;

    &#xA;

    OR

    &#xA;

    writer = imageio.get_writer(fo, fps=fps, format=&#x27;.mp4&#x27;)&#xA;&#xA;for im in frames:&#xA;    writer.append_data(imageio.imread(im))&#xA;writer.close()&#xA;

    &#xA;

    I get the following error -

    &#xA;

    ---------------------------------------------------------------------------&#xA;BrokenPipeError                           Traceback (most recent call last)&#xA;c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)&#xA;    478             try:&#xA;--> 479                 p.stdin.write(bb)&#xA;    480             except Exception as err:&#xA;&#xA;BrokenPipeError: [Errno 32] Broken pipe&#xA;&#xA;During handling of the above exception, another exception occurred:&#xA;&#xA;OSError                                   Traceback (most recent call last)&#xA; in <module>&#xA;      1 for im in ret3:&#xA;----> 2     writer.append_data(im)&#xA;      3 writer.close()&#xA;&#xA;c:\program files (x86)\python38-32\lib\site-packages\imageio\core\format.py in append_data(self, im, meta)&#xA;    500             im = asarray(im)&#xA;    501             # Call&#xA;--> 502             return self._append_data(im, total_meta)&#xA;    503 &#xA;    504         def set_meta_data(self, meta):&#xA;&#xA;c:\program files (x86)\python38-32\lib\site-packages\imageio\plugins\ffmpeg.py in _append_data(self, im, meta)&#xA;    572 &#xA;    573             # Write. Yes, we can send the data in as a numpy array&#xA;--> 574             self._write_gen.send(im)&#xA;    575 &#xA;    576         def set_meta_data(self, meta):&#xA;&#xA;c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\_io.py in write_frames(path, size, pix_fmt_in, pix_fmt_out, fps, quality, bitrate, codec, macro_block_size, ffmpeg_log_level, ffmpeg_timeout, input_params, output_params)&#xA;    484                     "OUTPUT:\n".format(err, cmd_str)&#xA;    485                 )&#xA;--> 486                 raise IOError(msg)&#xA;    487 &#xA;    488             nframes &#x2B;= 1&#xA;&#xA;OSError: [Errno 32] Broken pipe&#xA;&#xA;FFMPEG COMMAND:&#xA;c:\program files (x86)\python38-32\lib\site-packages\imageio_ffmpeg\binaries\ffmpeg-win32-v4.2.2.exe -y -f rawvideo -vcodec rawvideo -s 256x256 -pix_fmt rgb24 -r 29.97 -i - -an -vcodec libx264 -pix_fmt yuv420p -crf 25 -v warning C:\Users\pramu\AppData\Local\Temp\imageio_fh1fqkgc&#xA;&#xA;FFMPEG STDERR OUTPUT:&#xA;</module>

    &#xA;

    I get the same error using anaconda ffmpeg and non-anaconda ffmpeg.

    &#xA;

    Is there a way to fix this error ?

    &#xA;

    Also, is there a better way to convert list of frames into .mp4 or serializing it for sending through an API ?.

    &#xA;

    Thank you !

    &#xA;

  • HTML mp4 Streaming / How can I automatically move the "atom moov" to the beginning of the file ?

    29 octobre 2020, par Einkornwolf

    so I am currently building a Website for School and implemented an Upload-System. Now I want People to be able to watch uploaded Videos. Currently if you try to watch a Video, lets say test.mp4 it takes over a minute to load. I know that using : ffmpeg -i inputvideo.mp4 -movflags faststart -acodec copy -vcodec copy outputvideo.mp4 moves the atom moov to the beginning of the file. And when I manually convert the mp4 using the previous command the file starts playing instantly. But now my problem is, that I don't want to convert each file manually. Is there another way of playing user-uploaded Videos instantly ? Thanks for your help in advance.

    &#xA;

    I am using this Code, but it has nothing to do with the streaming itself I guess :

    &#xA;

      <source src="Clap.mp4" type="video/mp4">&#xA;Your browser does not support the video tag. &#xA;&#xA;</source>

    &#xA;

    I also tried to use a js library :

    &#xA;

      &#xA;&#xA;  &#xA;  <code class="echappe-js">&lt;script src=&quot;https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js&quot;&gt;&lt;/script&gt;&#xA;&#xA;&#xA;&#xA;  &#xA;    &#xA;    &#xA;    

    &#xA; To view this video please enable JavaScript, and consider upgrading to a&#xA; web browser that&#xA; supports HTML5 video&#xA;

    &#xA; &#xA;&#xA; &lt;script src=&quot;https://vjs.zencdn.net/7.8.4/video.js&quot;&gt;&lt;/script&gt;&#xA;&#xA;

    &#xA;

    In both cases I want to play Clap.mp4

    &#xA;