Recherche avancée

Médias (91)

Autres articles (74)

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

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

  • 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

  • FFmpeg - wrong duration

    28 mai 2014, par miss_tais

    I have a command, it get’s first 30 seconds of audio file :

    ffmpeg -ss 0 -t 30 -i AUDIO_FILE -acodec copy -f FORMAT_NAME NEW_AUDIO_FILE

    With mp3 files is works right, but with wmv or wav files it is not correct.

    The result :

    Guessed Channel Layout for  Input Stream #0.0 : stereo
    Input #0, asf, from '':
     Metadata:
       WM/Track        : 0
       WM/MediaPrimaryClassID: {D1607DBC-E323-4BE2-86A1-48A42A28441E}
       WMFSDKVersion   : 9.00.00.4509
       WMFSDKNeeded    : 0.0.0.0000
       album           : Álbum desconocido (19/12/2013 11:32:53 a.m.)
       track           : 1
       WM/EncodingTime : 18446744072125569792
       WM/UniqueFileIdentifier: ;
       IsVBR           : 0
       DeviceConformanceTemplate: L1
       WM/WMADRCPeakReference: 32096
       WM/WMADRCAverageReference: 10814
       title           : Pista 1
     Duration: 00:02:45.47, start: 0.000000, bitrate: 129 kb/s
       Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, fltp, 128 kb/s
    Output #0, asf, to '':
     Metadata:
       WM/Track        : 0
       WM/MediaPrimaryClassID: {D1607DBC-E323-4BE2-86A1-48A42A28441E}
       WMFSDKVersion   : 9.00.00.4509
       WMFSDKNeeded    : 0.0.0.0000
       WM/AlbumTitle   : Álbum desconocido (19/12/2013 11:32:53 a.m.)
       WM/TrackNumber  : 1
       WM/EncodingTime : 18446744072125569792
       WM/UniqueFileIdentifier: ;
       IsVBR           : 0
       DeviceConformanceTemplate: L1
       WM/WMADRCPeakReference: 32096
       WM/WMADRCAverageReference: 10814
       title           : Pista 1
       WM/EncodingSettings: Lavf55.37.101
       Stream #0:0(eng): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    size=      33kB time=00:00:01.35 bitrate= 196.9kbits/s    

    FFmpeg version :

    ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers

    How can I fix command for getting right duration ?

    Thank you

  • Python script creates too short video using ffmpeg

    25 mai 2014, par Majzlik

    I use python script to create multiple pictures and call ffmpeg to create video. But there is a problem, because ffmpeg use just few pictures (about 7 - 10 from 160), but throws no error. I’ve tried the same command from commandline and video was correct. I’m calling ffmpeg this way :

    ffmpeg_call = ["ffmpeg", "-r", str(FPS), "-b", "16777216", "-y", "-i", "./sample_%05d.png", FILEOUTNAME + ".mp4"]
    subprocess.call(ffmpeg_call)

    and this was command in commandline :

    ffmpeg -r 25 -b 16777216 -y -i ./sample_%05d.png animation.mp4

    I’ve printed these commands to compare and they were the same, so there has to be problem in ffmpeg + python cooperation. Don’t you know, how to fix it ?

    UPDATE :

    this is log from ffmpeg :

    ffmpeg version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav     developers
     built on Feb  6 2014 20:56:59 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    Input #0, image2, from '/tmp/tmpRKxT6s/ampgraph/tmp/sample_%05d.png':
    Duration: 00:00:00.44, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: png, pal8, 640x480, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Incompatible pixel format 'pal8' for codec 'mpeg4', auto-selecting format 'yuv420p'
    [buffer @ 0x19e18a0] w:640 h:480 pixfmt:pal8
    [avsink @ 0x19ee1c0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'src' and the filter 'out'
    [scale @ 0x19e2fc0] w:640 h:480 fmt:pal8 -> w:640 h:480 fmt:yuv420p flags:0x4
    Output #0, mp4, to './ampgraph/animation.mp4':
     Metadata:
       encoder         : Lavf53.21.1
       Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream mapping:
     Stream #0.0 -> #0.0
    Press ctrl-c to stop encoding
    frame=   11 fps=  0 q=2.5 Lsize=      46kB time=0.44 bitrate= 859.1kbits/s    
    video:45kB audio:0kB global headers:0kB muxing overhead 1.906569%