Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (8)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • 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" ;

  • Configuration spécifique d’Apache

    4 février 2011, par

    Modules spécifiques
    Pour la configuration d’Apache, il est conseillé d’activer certains modules non spécifiques à MediaSPIP, mais permettant d’améliorer les performances : mod_deflate et mod_headers pour compresser automatiquement via Apache les pages. Cf ce tutoriel ; mode_expires pour gérer correctement l’expiration des hits. Cf ce tutoriel ;
    Il est également conseillé d’ajouter la prise en charge par apache du mime-type pour les fichiers WebM comme indiqué dans ce tutoriel.
    Création d’un (...)

Sur d’autres sites (1880)

  • FFmpegPHP get thumbnail from external URL

    22 janvier 2013, par jValdron

    I'm trying to create thumbnails from external videos, mostly MP4s and FLVs. I'm using FFmpegPHP. I already have the thumbnail generation working fine, however, I need to load the video entirely on my server first. Would it be possible to stream only a small part of the video then extract the thumbnail from that ?

    Here's the code I have so far :

    require_once PRIV . 'Vendor/FFmpegPHP/FFmpegAutoloader.php';

    // Download the whole video.
    $video = file_get_contents($_PUT['video']);
    $file = 'path_to_cache';
    file_put_contents($file, $video);

    $movie = new FFmpegMovie($file);

    // Generate the thumbnail.
    $thumb = $movie->getFrame($movie->getFrameCount() / 2);
    $thumb->resize(320, 240);
    imagejpeg($thumb->toGDImage(), 'path_to_thumb');

    Anyone has a suggestion ?

    EDIT

    As Brad suggested, here is the updated code :

    $file = CACHE . 'moodboard_video_' . rand();
    $fh = fopen($file, 'w');
    $size = 0;

    curl_setopt($ch, CURLOPT_URL, $_PUT['video']);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_WRITEFUNCTION, function($ch, $data) use($fh, &$size){
       $length = fwrite($fh, $data);

       if($length === FALSE) {
           return 0;
       } else {
           $size += $length;
       }

       // Downloads 1MB.
       return $size < 1024 * 1024 * XXXXXX ? $length : 0;
    });

    curl_exec($ch);

    fclose($fh);
    curl_close($ch);

    // Create the thumbnail.
    $thumb = $movie->getFrame(XXXXXX);
    $thumb->resize(static::DEFAULT_THUMBNAIL_WIDTH, $thumb->getHeight() / $thumb->getWidth() * static::DEFAULT_THUMBNAIL_WIDTH);
    $image = $thumb->toGDImage();
    imagejpeg($image, PRIV . static::THUMBNAILS_PATH . $item->getLastInsertIdentifier() . '_' . static::DEFAULT_THUMBNAIL_WIDTH);
  • ffmpeg2.4 transcoding.c avfilter

    18 novembre 2014, par rosen

    编译时:

    --enable-avfilter \
    --enable-nonfree \
    --disable-filters \
    --enable-filter=movie \
    --enable-filter=overlay \
    --enable-filter=null \
    --enable-filter=anull \
    --enable-filter=scale \
    --enable-filter=rotate \

    运行例子的

    filter_spec = "null"; /* passthrough (dummy) filter for video */

    可以编码出视频
    但是使用

    filter_spec = "movie=/storage/emulated/0/image.png [wm]; [in][wm] overlay=10:10 [out]";

    执行到例子transcoding.c的

    if ((ret = avfilter_graph_parse_ptr(filter_graph, filter_spec,

    &inputs, &outputs, NULL)) < 0)
    goto end ;

    就报错:
    Invalid data found when processing input
    @bbcallen
    求你帮我看一下,这个就是我想实现的一个加水印的demo。

  • FFplay requesting video via RTSP :// but receiving on multicast address

    28 mai 2014, par DavidG

    First of all, I apologize for how long the supporting information will be in this post. This is my first post on this forum.

    My issue is I need to run the command line version of ffmpeg to capture a video stream. However, as a proof of concept I’m first attempting to capture and view the video using ffplay (BTW, I have not had any success using ffmpeg or ffprobe). I’m running the ffplay command to read video from a Coretec video encoder which has multicast enabled.

    Unicast address:   172.30.18.50
    Multicast address: 239.130.18.50:4002

    My question is how can I request the Unicast address, but receive the video on the multicast address ? (BTW, the ffplay operation does not work even if I replace the Unicast address with the Multicast address below)

    NOTE : After looking at the Wireshark trace, I see the video data has GSMTAP in the protocol column. When I do "ffmpeg -protocols : I see there is a Decoder "gsm" which decodes raw gsm. however, when I use ffplay -f gsm ... I get "Protocol not found".

    I am able to use VLC to view the video using the following command :

    VLC rtsp://172.30.18.50

    It appears from the Wireshark trace that the session is initiated on the Unicast address, but the video is streamed on the Multicast address. VLC is able to determine this and perform the appropriate operation. I don’t know what to add to ffplay to let it know that another stream will be carrying the video.

    I am UNABLE to perform the following ffplay commands (none of them work) :

    ffplay -v debug rtsp://172.30.18.50
    ffplay -v debug -rtsp_transport udp rtsp://172.30.18.50
    ffplay -v debug -rtsp_transport udp_multicast rtsp://172.30.18.50

    NOTE : I am able to get ffplay to launch, but the video is garbled badly. Maybe this bit of information will ring a bell for someone ? The command I used was :

    ffplay -v debug -i udp://239.130.18.50:4002?sources=172.30.18.50

    The version of ffplay I’m using is :

    ffplay version N-63439-g96470ca Copyright (c) 2003-2014 the FFmpeg developers
     built on May 25 2014 22:09:07 with gcc 4.8.2 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-
    libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
    njpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsox
    r --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab -
    -enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
    --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-
    libxavs --enable-libxvid --enable-decklink --enable-zlib
     libavutil      52. 86.100 / 52. 86.100
     libavcodec     55. 65.100 / 55. 65.100
     libavformat    55. 41.100 / 55. 41.100
     libavdevice    55. 13.101 / 55. 13.101
     libavfilter     4.  5.100 /  4.  5.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 19.100 /  0. 19.100
     libpostproc    52.  3.100 / 52.  3.100

    The debug output for ffplay -v debug rtsp ://172.30.18.50 is :

    [rtsp @ 0000000002a8be80] SDP:=    0KB vq=    0KB sq=    0B f=0/0
    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8
    A058BA9860FA616087828307a=control:track1

    [rtsp @ 0000000002a8be80] video codec set to: mpeg4
    [udp @ 0000000002a8bac0] end receive buffer size reported is 65536
    [udp @ 0000000002aa1600] end receive buffer size reported is 65536
    [rtsp @ 0000000002a8be80] Nonmatching transport in server reply/0
    rtsp://172.30.18.50: Invalid data found when processing input

    And the Wireshark trace output is :

    OPTIONS rtsp://172.30.18.50:554 RTSP/1.0
    CSeq: 1
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 1
    Public: DESCRIBE, SETUP, TEARDOWN, PLAY

    DESCRIBE rtsp://172.30.18.50:554 RTSP/1.0
    Accept: application/sdp
    CSeq: 2
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 2 Content-Type: application/sdp
    Content-Length: 270

    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8A058BA9860FA616087828307a=control:track1

    SETUP rtsp://172.30.18.50:554 RTSP/1.0
    Transport: RTP/AVP/UDP;unicast;client_port=9574-9575
    CSeq: 3
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 3
    Session: test
    Transport: RTP/AVP;multicast;destination=;port=4002-4003;ttl=63

    The debug output for ffplay -v debug -rtsp_transport udp rtsp ://172.30.18.50 is :

    [rtsp @ 0000000002c5c0a0] SDP:=    0KB vq=    0KB sq=    0B f=0/0
    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8
    A058BA9860FA616087828307a=control:track1


    [rtsp @ 0000000002c5c0a0] video codec set to: mpeg4
    [udp @ 0000000002c62420] end receive buffer size reported is 65536
    [udp @ 0000000002c726a0] end receive buffer size reported is 65536
    [rtsp @ 0000000002c5c0a0] Nonmatching transport in server reply/0
    rtsp://172.30.18.50: Invalid data found when processing input

    And the Wireshark trace output is :

    OPTIONS rtsp://172.30.18.50:554 RTSP/1.0
    CSeq: 1
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 1
    Public: DESCRIBE, SETUP, TEARDOWN, PLAY

    DESCRIBE rtsp://172.30.18.50:554 RTSP/1.0
    Accept: application/sdp
    CSeq: 2
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 2
    Content-Type: application/sdp
    Content-Length: 270

    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8A058BA9860FA616087828307a=control:track1

    SETUP rtsp://172.30.18.50:554 RTSP/1.0
    Transport: RTP/AVP/UDP;unicast;client_port=22332-22333
    CSeq: 3
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 3
    Session: test
    Transport: RTP/AVP;multicast;destination=239.130.18.50;port=4002-4003;ttl=63

    The debug output for ffplay -v debug -rtsp_transport udp_multicast is :

    [rtsp @ 00000000002fc100] SDP:=    0KB vq=    0KB sq=    0B f=0/0
    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8
    A058BA9860FA616087828307a=control:track1

    [rtsp @ 00000000002fc100] video codec set to: mpeg4
       nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

    And the Wireshark trace output is :

    OPTIONS rtsp://172.30.18.50:554
    RTSP/1.0
    CSeq: 1
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 1
    Public: DESCRIBE, SETUP, TEARDOWN, PLAY

    DESCRIBE rtsp://172.30.18.50:554 RTSP/1.0
    Accept: application/sdp
    CSeq: 2
    User-Agent: Lavf55.41.100

    RTSP/1.0 200 OK
    CSeq: 2
    Content-Type: application/sdp
    Content-Length: 270

    v=0
    o=- 1 1 IN IP4 50.18.30.172
    s=Test
    a=type:broadcast
    t=0 0
    c=IN IP4 239.130.18.50/63
    m=video 4002 RTP/AVP 96
    a=rtpmap:96 MP4V-ES/90000
    a=fmtp:96 profile-level-id=245;config=000001B0F5000001B509000001000000012000C8F8A058BA9860FA616087828307a=control:track1

    SETUP rtsp://172.30.18.50:554 RTSP/1.0
    Transport: RTP/AVP/UDP;multicast
    CSeq: 3
    User-Agent: Lavf55.41.100

    Thank you in advance to whomever is willing to tackle this.
    - DavidG