Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (56)

  • 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

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

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

Sur d’autres sites (9304)

  • Manual encoding into MPEG-TS

    4 juillet 2014, par Lane

    SO...

    I am trying to take a H264 Annex B byte stream video and encode it into MPEG-TS in pure Java. My goals is to create a minimal MPEG-TS, Single Program, valid stream and to not include any timing information information (PCR, PTS, DTS).

    I am currently at the point where my generated file can be passed to ffmpeg (ffmpeg -i myVideo.ts) and ffmpeg reports...

    [NULL @ 0x7f8103022600] start time is not set in estimate_timings_from_pts

    Input #0, mpegts, from 'video.ts':
    Duration: N/A, bitrate: N/A
    Program 1
     Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

    ...it seems like this warning for start time is not a big deal... and ffmpeg is unable to determine how long the video is. If I create another mpeg-ts file from my video file (ffmpeg -i myVideo.ts -vcodec copy validVideo.ts) and run ffmpeg -i validVideo.ts I get...

    Input #0, mpegts, from 'video2.ts':
    Duration: 00:00:11.61, start: 1.400000, bitrate: 3325 kb/s
    Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc

    ...so you can see the timing information and bitrate is there and so is the metadata.

    My H264 video is comprised of only I and P Frames (with the SPS and PPS preceding the I Frame of course) and the way that I am creating my MPEG-TS stream is...

    1. Write a single PAT at the beginning of the file
    2. Write a single PMT at the beginning of the file
    3. Create TS and PES packets from SPS, PPS and I Frame (AUD NALs too, if this is required ?)
    4. Create TS and PES packets from P Frame (again, AUD NALs too, if required)
    5. For the last payload of either an I Frame or P Frame, add filler bytes to an adaptation field to make sure it fits into a full TS packet
    6. Repeat 3-5 for the entire file

    ...my PAT looks like this...

    4740 0010 0000 b00d 0001 c100 0000 01f0
    002a b104 b2ff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff

    ...and my PMT looks like this...

    4750 0010
    0002 b012 0001 c100 00ff fff0 001b e100
    f000 c15b 41e0 ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff

    ...notice after the c100 00, the "ff ff", f0... says that we are not using a PCR... Also notice that I have updated my CRC to reflect this change to the PMT. My first I Frame packet looks like...

    4741 0010 0000 01e0
    0000 8000 0000 0000 0109 f000 0000 0127
    4d40 288d 8d60 2802 dd80 b501 0101 4000
    00fa 4000 3a98 3a18 00b7 2000 3380 2ef2
    e343 0016 e400 0670 05de 5c16 345d c000
    0000 0128 ee3c 8000 0000 0165 8880 0020
    0000 4fe5 63b5 4e90 b11c 9f8f f891 10f3
    13b1 666b 9fc6 03e9 e321 36bf 1788 347b
    eb23 fc89 5772 6e2e 1714 96df ed16 9b30
    252d ceb7 07e9 a0c7 c6e7 9515 be87 2df1
    81f3 b9d2 ba5f 243e 2d5c cba2 8ca5 b798
    6bec 8c43 0b5d bbda bc5b 6e7c e15c 84e8
    2f13 be84

    ...you’ll notice after the 01e0 0000, 8000 00 is the PES header extension where I specify no PTS / DTS and the remaining length is zero. My first P Frame packet looks like...

    4741 001d
    0000 01e0 0000 8000 0000 0000 0109 f000
    0000 0141 9a00 0200 0593 ff45 a7ae 1acd
    f2d7 f9ec 557f cdb6 ba38 60d6 a626 5edb
    4bb9 9783 89e2 d7e1 102e 4625 2fbf ce16
    f952 d8c9 f027 e55a 6b2a 81c3 48d4 6a45
    050a f355 fbec db01 6562 6405 04aa e011
    50ec 0b45 45e5 0df7 2fed a3f8 ac13 2e69
    6739 6d81 f13d 2455 e6ca 1c6b dc96 65d5
    3bad f250 7dab 42e4 7ba9 f564 ee61 29fb
    1b2c 974c 6924 1a1f 99ef 063c b99a c507
    8c22 b0f8 b14c 3e4d 01d0 6120 4e19 8725
    2fda 6550 f907 3f87

    ...and whenever an I Frame or P Frame is ending, I have a TS packet with an adaptation field like...

    4701 003c b000 ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff ffff ffff
    ffff ffff ffff ffff ffff ffff

    ...where the first b0 bytes are the adaptation field stuffing bytes and the remaining ones are the final bytes of the I or P Frame. So as you can tell I can use ffmpeg and pass it my file to create a valid movie in any format. However, I need the file I create to be in the proper format and I cannot quite figure out what the last piece I am missing is. Any ideas ?

  • 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

  • Targeting a specific file size in vp8+vorbis encoding using ffmpeg

    4 août 2021, par Mohammad Zamanian

    I have a couple videos that I want to encode to vp8 for video and Vorbis for audio. This is the FFmpeg command I'm currently using :

    


    ffmpeg -y -i input.mp4 -map 0:v:0 -s 640x360 -filter:v fps=20 -c:v libvpx -crf 10 -b:v 200k -map 0:a:0 -b:a 48k -c:a libvorbis output.webm


    


    I want to have control over output file size and limit it to 3MB without clipping the video, but instead, lose quality. so I cant use -fs 3MB.

    


    How can I determine the file size based on video and audio bitrates and duration ?

    


    How can I limit the file size without clipping ?