Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (31)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

Sur d’autres sites (4642)

  • ffmpeg command does not work when run from .sh file

    19 novembre 2020, par Felipe Hurtado

    I am trying to run an ffmpeg command from a shell file but I am getting the following error :

    


    'NULL @ 0x343e9c0] Unable to find a suitable output format for '


    


     : Invalid argument

    


    Below the ffmpeg commnad

    


    ffmpeg -i "rtsp://admin:adminCTZSDS@192.168.0.5/1" -s 600x400 -framerate 20 -b:v 16k -preset slow -acodec libmp3lame -ar 11025 -crf 20 -f flv rtmp://localhost:1935/live/camara2 


    


    and this is the content of the shell file :

    


    #!/bin/bash
#script streaming
ffmpeg -i "rtsp://admin:adminCTZSDS@192.168.0.5/1" -s 600x400 -framerate 20 -b:v 16k -preset slow -acodec libmp3lame -ar 11025 -crf 20 -f flv rtmp://localhost:1935/live/camara2 
        


    


    the command works if I run it manually in a terminal

    


  • H264/MP4 live stream from ffmpeg does not work in browser

    22 septembre 2018, par paunescuionica

    I cannot visualize a H264/MP4 stream generated by ffmpeg in Chrome, IE, Edge. It works only in Firefox.

    My testing environment is Windows 10, all updates done, all browsers up to date.

    I have a source MJPEG stream, which I need to transcode to H264/MP4 and show it in browser in a HTML5 element.
    In order to provide a working example, I use here this MJPEG stream : http://200.36.58.250/mjpg/video.mjpg?resolution=320x240. In my real case I have MJPEG input from different sources like IP cameras.
    I use the following command line :

    ffmpeg.exe -use_wallclock_as_timestamps 1 -f mjpeg -i "http://200.36.58.250/mjpg/video.mjpg?resolution=320x240" -f mp4 -c:v libx264 -an -preset ultrafast -tune zerolatency -movflags frag_keyframe+empty_moov+faststart -reset_timestamps 1 -vsync 1 -flags global_header -r 15 "tcp ://127.0.0.1:5000 ?listen"

    If I try to visualize the output in VLC, I use this link : tcp ://127.0.0.1:5000 and it works.
    Then I try to visualize the stream in browser, so I put this into a html document :

    <video autoplay="autoplay" controls="controls">
    <source src="http://127.0.0.1:5000" type="video/mp4">
    </source></video>

    If I open the document in Firefox it works just fine.
    But it does not work when trying to open in Chrome, IE or Edge. It seems that the browser tries to connect to the TCP server exposed by ffmpeg, but something happens because ffmpeg exits after few seconds.

    In ffmpeg console I can see this :

    av_interleaved_write_frame(): Unknown error
    Error writing trailer of tcp://127.0.0.1:5000?listen: Error number -10053 occurred

    If I inspect the video element in Chrome is can see this error :

    Failed to load resource: net::ERR_INVALID_HTTP_RESPONSE

    As far as I know all these browsers should support H264 encoded streams transported in MP4 containers. If in the element I replace the link http://127.0.0.1:5000 with a local link to a mp4/H264 encoded file, it is played just fine in each browser. The problem seems to be related to live streaming.

    Does anyone know why this happens and how it can be solved ?

    Thank you !

  • FFMPEG for Android does not work properly when overlaying picture

    12 mars 2020, par Alejandro Sanchez

    Whenever I run this FFMPEG command on Android to overlay a picture on a video using the FFMpeg Android library :

    "-i",
                   realPathVideo,
                   "-i",
                   realPathImage
                   ,
                   "-filter_complex",
                   "overlay=0:0",
                   "-codec:a",
                   "copy",
                   dest.getAbsolutePath()

    it never actually works, since it always ends up in "onFinish
    " and never "onSuccess". I don’t know why, but somehow this command doesn’t work properly, although it never shows me an error message. To ensure that the parameters are right I will show you how I get them :

    realpathvideo is : /storage/emulated/0video.mp4
    realpathimage is : /storage/emulated/0/VideoOverlay.jpg
    output directory is : /storage/emulated/0/appname/temporaryVideoFileWithOverlay.mp4

    realPathVideo is derived from a File which is made by moving the result of a camera activity to external storage with the method :

    public static void copyFile(File src, File dst) throws IOException
    {
       FileChannel inChannel = new FileInputStream(src).getChannel();
       FileChannel outChannel = new FileOutputStream(dst).getChannel();
       try
       {
           inChannel.transferTo(0, inChannel.size(), outChannel);
       }
       finally
       {
           if (inChannel != null)
               inChannel.close();
           if (outChannel != null)
               outChannel.close();
       }
    }

    where src is the video result saved in internal storage and dst the external storage file.

    The bitmap image overlay File is saved like this :

    realpathImage is derived from a bitmap File saved by using :

       private Uri saveOverlay(Bitmap bitmap) {
       File file;
       // Get the external storage directory path
       String path = Environment.getExternalStorageDirectory().toString();
       // Create a file to save the image
       file = new File(path, "VideoOverlay" + ".jpg");

       try {

           OutputStream stream = null;

           stream = new FileOutputStream(file);

           bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);

           stream.flush();


           stream.close();

       } catch (IOException e) // Catch the exception
       {
           e.printStackTrace();
       }

       // Parse the saved image path to uri
       Uri savedImageURI = Uri.parse(file.getAbsolutePath());
       return savedImageURI;
    }