Recherche avancée

Médias (0)

Mot : - Tags -/upload

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

Autres articles (38)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

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

  • Convert decoded frames to WAV format using ffmpeg libraries

    6 juillet 2015, par Joe Allen

    I have a stl queue of pointers to decoded frames on the heap
    (e.g. decode_queue<avframe></avframe>)
    and I want to take those frames from the stl queue and encode them in WAV format. I tried using the examples that come with ffmpeg they break when I try to change the encoder to pcm_s32le/pcm_s16le. For example for decoding_encoding.c example, I just tried to change some parameters and all of a sudden I am getting a floating point exception.
    Is there a something I can do ? I am really lost.

    UPDATE
    In decoding_encoding.c i changed the line :

    codec = avcodec_find_encoder(AV_CODEC_ID_MP2);

    to

    codec = avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE);

    this changed ended up making the c->frame_size == 0 So the buffer is never created :

    buffer_size = av_samples_get_buffer_size(NULL, c->channels, c->frame_size,
                                                c->sample_fmt, 0);

    In that case instead of the line :

    frame->nb_samples     = c->frame_size;

    I changed it to

    frame->nb_samples     = 10000

    and

    buffer_size = av_samples_get_buffer_size(NULL, c->channels, 10000,
                                                c->sample_fmt, 0);

    just to see what happens(basically substituted c->frame_size for 10000). It compiles but it creates an output file but the player cannot find a stream for it or it is filled with garbage. At this point I am still stuck not sure what to do to get the output.WAV file.

    Also, is a RIFF header automatically added or do I have to manually add it in as well ?

  • Repeating video frame sequences without iterating each frame

    4 juillet 2015, par Raheel Khan

    I have an application that generates a video from a given number of files. A total frame count and sequence is provided and the generated video should loop the given sequence until the total number of frames have been written.

    At the moment, I’m using FFMPEG.VideoFileWriter from AForge.

    var frameIndex = 0;
    var frameCount = 300;

    var writer = new AForge.Video.FFMPEG.VideoFileWriter();
    writer.Open(filename: "Video.mp4", width: 10000, height: 10000, fps: 30, code: VideoCodec.MPEG4, bitrate: 1024 * 1024 * 2);

    using (var imageCanvas = new Bitmap(width, height))
    {
       do
       {
           foreach (var file in this._Files)
           {
               frameIndex++;
               if (frameIndex > frameCount) { break; }

               using (var graphicsCanvas = Graphics.FromImage(imageCanvas))
               {
                   graphicsCanvas.Clear(Color.Black);

                   using (var imageFile = Image.FromFile(file.FullName))
                   {
                       graphicsCanvas.DrawImage(imageFile, 0, 0, imageCanvas.Width, imageCanvas.Height);
                   }
               }

               writer.WriteVideoFrame(imageCanvas);
           }
       }
       while (true);
    }

    the bottlenecks are :

    • The call to writer.WriteVideoFrame(imageCanvas).
    • The source images in question are massive (more than 10Kx10K 32bpp) so keeping them all in memory is not an option.

    The only thing I can think of is to create an uncompressed AVI file and somehow copy entire sequences in bulk. although transcoding back to MP4 would still take a while, it may same some overall.

    Any general optimization suggestions or clues on how to write multiple frames at once would be appreciated.

  • FFServer streaming H.264 from Logitech C920 without re-encoding

    29 novembre 2016, par Zoltan Fedor

    I’m trying to broadcast a native .H264 webcam feed from a Logitech C920 webcam in realtime from an Odroid device (a robot) via ffserver running on a separate server (CentOS 7.1) to users’ browser without reeconding the .H264 video feed.

    Having a realtime video feed in the browser is a challenge on its own, so for now I’m just trying to get the Logitech C920 webcam on the Odroid to stream its native .H264 realtime video feed as mp4 via ffserver to users without the need to reencode the video in the process.
    Obviously I want to avoid re-encoding as that would take too much CPU time and would kill the realtime video feed. Later I might need to change the container to .flv or rtp, so it can be played from the browser in a realtime fashion. I’m using the Logitech C920 webcam, because it can do .H264 encoding on the hardware. (it has been tested by saving a file directly, it works, except the well-known ’jerkiness’ issue related to a linux kernel bug : http://sourceforge.net/p/linux-uvc/mailman/message/33164469/ , but that is a different story)

    The problem is, that however I set ffmpeg-ffserver up, as soon as ffserver is in the picture the feed gets reencoded - even from h264(native) to h264(libx264) - taking up 100% of CPU on the Odroid device and introducing a huge delay in the video feed.

    Below are my ffmpeg and ffserver settings.

    Ffmpeg from the Odroid device streaming the .H264 feed to ffserver

    $ ffmpeg -s 1920x1080 -f v4l2 -vcodec h264 -i /dev/video0 -copyinkf -vcodec copy http://xxxyyyy.com:8090/feed1.ffm
    ffmpeg version N-72744-g653bf3c Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.8 (Ubuntu/Linaro 4.8.2-19ubuntu1)
     configuration: --prefix=/home/odroid/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/odroid/ffmpeg_build/include --extra-ldflags=-L/home/odroid/ffmpeg_build/lib --bindir=/home/odroid/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
     libavutil      54. 27.100 / 54. 27.100
     libavcodec     56. 41.100 / 56. 41.100
     libavformat    56. 36.100 / 56. 36.100
     libavdevice    56.  4.100 / 56.  4.100
     libavfilter     5. 16.101 /  5. 16.101
     libswscale      3.  1.101 /  3.  1.101
     libswresample   1.  2.100 /  1.  2.100
     libpostproc    53.  3.100 / 53.  3.100
    Input #0, video4linux2,v4l2, from '/dev/video0':
     Duration: N/A, start: 6581.606726, bitrate: N/A
       Stream #0:0: Video: h264 (Constrained Baseline), yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 60 tbc
    [swscaler @ 0x11bf0b0] deprecated pixel format used, make sure you did set range correctly
    No pixel format specified, yuvj420p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 0x12590e0] using SAR=64/45
    [libx264 @ 0x12590e0] using cpu capabilities: ARMv6 NEON
    [libx264 @ 0x12590e0] profile High, level 1b
    Output #0, ffm, to 'http://robo-car.int.thomsonreuters.com:8090/feed1.ffm':
     Metadata:
       creation_time   : now
       encoder         : Lavf56.36.100
       Stream #0:0: Video: h264 (libx264), yuvj420p(pc), 160x128 [SAR 64:45 DAR 16:9], q=-1--1, 64 kb/s, 30 fps, 1000k tbn, 5 tbc
       Metadata:
         encoder         : Lavc56.41.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    ^Cav_interleaved_write_frame(): Immediate exit requested00 bitrate=N/A dup=0 drop=97    
       Last message repeated 2140 times
    frame= 3723 fps=301 q=-1.0 Lsize=     396kB time=00:12:14.20 bitrate=   4.4kbits/s dup=3699 drop=103    
    video:321kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 23.500496%

    And the /etc/ffserver.conf on the server running ffserver :

    HTTPPort 8090                      # Port to bind the server to
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 10000             # Maximum bandwidth per client
                                  # set this high enough to exceed stream bitrate
    CustomLog -

    <feed>         # This is the input feed where FFmpeg will send
      File ./feed1.ffm            # video stream.
      FileMaxSize 1G              # Maximum file size for buffering video
    </feed>

    <stream>
     Feed feed1.ffm
     Format mp4
     NoAudio
    </stream>

    As you have seen above in the ffmpeg section, there is a reencoding happening on the Odroid device maxing out the CPUs :

    Stream mapping:
     Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

    I have already tried setting the VideoCodec value in the ffserver config directly to libx264, tried the -re setting in ffmpeg, tried using different syntax for ffmpeg, etc. Nothing helps. Reeconding is always there and so I can’t make ffmpeg-ffserver just to broadcast the video stream as-is.

    Both ffmpeg (on the Odroid and on the server) were compiled yesterday (2015-06-09) from source, so they are the latest (and the same) version.

    Any idea ?

    EDIT :
    IN SUMMARY the issue is : I cannot find a way to get ffserver to broadcast the h264(native) feed coming from the Logitech C920 webcam without re-encoding.