Recherche avancée

Médias (91)

Autres articles (84)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (9295)

  • Getting ffserver && ffmpeg to work of Debian with Logitech C270 [closed]

    14 mars 2013, par Joseph Baldwin Roberts

    I'm having real trouble getting my webcam to work and I wonder if anyone can help. Im running Raspian on a raspberry pi.

    When I run lsusb I get :

    pi@raspberrycar ~ $ lsusb
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
    Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
    Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
    Bus 001 Device 006: ID 046d:0825 Logitech, Inc. Webcam C270

    When I run v412-ctl —all I get :

    pi@raspberrycar ~ $ v4l2-ctl --all
    Driver Info (not using libv4l2):
           Driver name   : uvcvideo
           Card type     : UVC Camera (046d:0825)
           Bus info      : usb-bcm2708_usb-1.2.4
           Driver version: 3.6.11
           Capabilities  : 0x04000001
                   Video Capture
                   Streaming
    Format Video Capture:
           Width/Height  : 640/480
           Pixel Format  : 'YUYV'
           Field         : None
           Bytes per Line: 1280
           Size Image    : 614400
           Colorspace    : SRGB
    Crop Capability Video Capture:
           Bounds      : Left 0, Top 0, Width 640, Height 480
           Default     : Left 0, Top 0, Width 640, Height 480
           Pixel Aspect: 1/1
    Video input : 0 (Camera 1: ok)
    Streaming Parameters Video Capture:
           Capabilities     : timeperframe
           Frames per second: 5.000 (5/1)
           Read buffers     : 0

    When I run v412-ctl —list-formats I get :

    pi@raspberrycar ~ $ v4l2-ctl --list-formats
    ioctl: VIDIOC_ENUM_FMT
           Index       : 0
           Type        : Video Capture
           Pixel Format: 'YUYV'
           Name        : YUV 4:2:2 (YUYV)

           Index       : 1
           Type        : Video Capture
           Pixel Format: 'MJPG' (compressed)
           Name        : MJPEG

    My ffserver settings file is /etc/ffserver.conf

    Port 80
    BindAddress 0.0.0.0
    MaxClients 10
    MaxBandwidth 50000
    NoDaemon

    <feed>
    file /tmp/webcam.ffm
    FileMaxSize 10M
    </feed>

    <stream>
    Feed webcam.ffm
    Format mpeg
    VideoSize 640x480
    VideoFrameRate 10
    VideoBitRate 2000
    VideoQMin 1
    VideoQMax 10
    </stream>

    <stream>
    Format status

    ACL allow 192.168.2.0 192.168.2.255
    </stream>

    My ffmpeg run string is /usr/sbin/webcam.sh

    ffserver -f /etc/ffserver.conf &amp; ffmpeg -v verbose -r 5 -s 640x480 -f video4linux2 -i /dev/video0 http://localhost/webcam.ffm

    When I run this is the output :

    pi@raspberrycar ~ $ sudo /usr/sbin/webcam.sh
    ffmpeg version 1.0.5ffserver version 1.0.5 Copyright (c) 2000-2012 the FFmpeg developers
     built on Mar 14 2013 18:37:40 with gcc 4.6 (Debian 4.6.3-14+rpi1)
    Copyright (c) 2000-2012 the FFmpeg developers
     built on Mar 14 2013 18:37:40 with gcc 4.6 (Debian 4.6.3-14+rpi1)
     configuration:
     libavutil      51. 73.101 / 51. 73.101
     configuration:
     libavutil      51. 73.101 / 51. 73.101
     libavcodec     54. 59.100 / 54. 59.100
     libavformat    54. 29.104 / 54. 29.104
     libavdevice    54.  2.101 / 54.  2.101
     libavfilter     3. 17.100 /  3. 17.100
     libswscale      2.  1.101 /  2.  1.101
     libavcodec     54. 59.100 / 54. 59.100
     libavformat    54. 29.104 / 54. 29.104
     libavdevice    54.  2.101 / 54.  2.101
     libavfilter     3. 17.100 /  3. 17.100
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 15.100 /  0. 15.100
     libswresample   0. 15.100 /  0. 15.100
    [video4linux2,v4l2 @ 0xfa5620] [3]Capabilities: 4000001

    I can see the stream on the status page and my webcam light is on but it never loads. Does anyone know what I am doing wrong ?

    Thanks in advance

    Joe

  • Call to avformat_find_stream_info prevents decoding of simple PNG image ?

    10 avril 2014, par kloffy

    I am running into a problem decoding a simple PNG image with libav. The decode_ok flag after the call to avcodec_decode_video2 is set to 0, even though the packet contains the entire image. Through some experimentation, I have managed to pinpoint the issue and it seems related to calling avformat_find_stream_info. If the call is removed, the example runs successfully. However, I would like to use the same code for other media, and calling avformat_find_stream_info is recommended in the documentation.

    The following minimal example illustrates the behavior (unfortunately still a bit lengthy) :

    #include <iostream>

    extern "C"
    {
    #include <libavformat></libavformat>avformat.h>
    #include <libavcodec></libavcodec>avcodec.h>
    }

    // Nothing to see here, it&#39;s just a helper function
    AVCodecContext* open(AVMediaType mediaType, AVFormatContext* formatContext)
    {
       auto ret = 0;
       if ((ret = av_find_best_stream(formatContext, mediaType, -1, -1, nullptr, 0)) &lt; 0)
       {
           std::cerr &lt;&lt; "Failed to find video stream." &lt;&lt; std::endl;
           return nullptr;
       }

       auto codecContext = formatContext->streams[ret]->codec;
       auto codec = avcodec_find_decoder(codecContext->codec_id);
       if (!codec)
       {
           std::cerr &lt;&lt; "Failed to find codec." &lt;&lt; std::endl;
           return nullptr;
       }

       if ((ret = avcodec_open2(codecContext, codec, nullptr)) != 0)
       {
           std::cerr &lt;&lt; "Failed to open codec context." &lt;&lt; std::endl;
           return nullptr;
       }

       return codecContext;
    }

    // All the interesting bits are here
    int main(int argc, char* argv[])
    {
       auto path = "/path/to/test.png"; // Replace with valid path to PNG
       auto ret = 0;

       av_log_set_level(AV_LOG_DEBUG);

       av_register_all();
       avcodec_register_all();

       auto formatContext = avformat_alloc_context();
       if ((ret = avformat_open_input(&amp;formatContext, path, NULL, NULL)) != 0)
       {
           std::cerr &lt;&lt; "Failed to open input." &lt;&lt; std::endl;
           return -1;
       }
       av_dump_format(formatContext, 0, path, 0);

    //*/ Info is successfully found, but interferes with decoding
       if((ret = avformat_find_stream_info(formatContext, nullptr)) &lt; 0)
       {
           std::cerr &lt;&lt; "Failed to find stream info." &lt;&lt; std::endl;
           return -1;
       }
       av_dump_format(formatContext, 0, path, 0);
    //*/

       auto codecContext = open(AVMEDIA_TYPE_VIDEO, formatContext);

       AVPacket packet;
       av_init_packet(&amp;packet);

       if ((ret = av_read_frame(formatContext, &amp;packet)) &lt; 0)
       {
           std::cerr &lt;&lt; "Failed to read frame." &lt;&lt; std::endl;
           return -1;
       }

       auto frame = av_frame_alloc();
       auto decode_ok = 0;
       if ((ret = avcodec_decode_video2(codecContext, frame, &amp;decode_ok, &amp;packet)) &lt; 0 || !decode_ok)
       {
           std::cerr &lt;&lt; "Failed to decode frame." &lt;&lt; std::endl;
           return -1;
       }

       av_frame_free(&amp;frame);
       av_free_packet(&amp;packet);

       avcodec_close(codecContext);

       avformat_close_input(&amp;formatContext);
       av_free(formatContext);

       return 0;
    }
    </iostream>

    The format dump before avformat_find_stream_info prints :

    Input #0, image2, from '/path/to/test.png' :
      Duration : N/A, bitrate : N/A
        Stream #0:0, 0, 1/25 : Video : png, 25 tbn

    The format dump after avformat_find_stream_info prints :

    Input #0, image2, from '/path/to/test.png' :
      Duration : 00:00:00.04, start : 0.000000, bitrate : N/A
        Stream #0:0, 1, 1/25 : Video : png, rgba, 512x512 [SAR 3780:3780 DAR 1:1], 1/25, 25 tbr, 25 tbn, 25 tbc

    So it looks like the search yields potentially useful information. Can anybody shed some light on this problem ? Other image formats seem to work fine. I assume that this is a simple user error rather than a bug.

    Edit : Debug logging was already enabled, but the PNG decoder does not produce a lot of output. I have also tried setting a custom logging callback.

    Here is what I get without the call to avformat_find_stream_info, when decoding succeeds :

    Statistics : 52125 bytes read, 0 seeks

    And here is what I get with the call to avformat_find_stream_info, when decoding fails :

    Statistics : 52125 bytes read, 0 seeks
    

    detected 8 logical cores

    The image is 52125 bytes, so the whole file is read. I am not sure what the logical cores are referring to.

  • ffmpeg Sound going out of sync with -concat or -ss

    6 août 2012, par Jared Glass

    I have a tool that spits out video from a 3D application and then concats the individual videos to make a sequence. But the sound seems to go out of sync in the sequence (the inividual files are fine) and it stutters in VLC and Quicktime. Windows media player seems to handle it bes to my supprise, yet it still goes out of sync. I have two senarios, one works and one doesn't but i need both working :

    Working :
    get already created out movs...

    convert to avi :
    os.system( ffmpeg + " -i C:\clip.mov -sameq -r 24 -y C:\clip.avi")

    concat to avi sequence :
    os.system( ffmpeg + &#39;&#39;&#39; -i concat: C:\clip.avi|C:\clip1.avi|C:\clip2.avi -sameq -r 24 -y C:\sequence.avi&#39;&#39;&#39; )

    convert sequence to mov :
    os.system( ffmpeg + " -i C:\sequence.avi -sameq -r 24 -y C:\sequence.mov")

    Not Working :
    create individual avi's from 3D program...

    cut down to correct length :
    os.system(ffmpeg + " -i C:\clip.avi -sameq -r 24 -ss " + startTime + " -vframes " + totalFrames + " -y C:\clip.avi" )

    concat to avi sequence :
    os.system( ffmpeg + &#39;&#39;&#39; -i concat: C:\clip.avi|C:\clip1.avi|C:\clip2.avi -sameq -r 24 -y C:\sequence.avi&#39;&#39;&#39; )

    convert sequence to mov :
    os.system( ffmpeg + " -i C:\sequence.avi -sameq -r 24 -y C:\sequence.mov")

    convert individual avi's to mov :
    os.system( ffmpeg + " -i C:\clip.avi-sameq -r 24 -y C:\clip.mov")

    Please let me know where I've gone wrong ?