Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (33)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

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

Sur d’autres sites (5271)

  • ffmpeg drops time delay on last frame of animated GIF

    13 août 2014, par Austin

    I am trying to convert animated GIFs to MP4 files using ffmpeg and x264. However, I seem be suffering from the effects of this bug in ffmpeg that causes the delay time of the last frame of the GIF to be ignored. For very short GIFs, this is quite a problem.

    As a work around, I was thinking that I should be able to manually tell ffmpeg to freeze on the last frame for a certain amount of time, specifically the proper duration of that frame (which I can extract from the GIF). However, I can’t seem to find a good way to do this. Any suggestions ? I would really like to be able to do this without having to split to the GIF into frames before putting it into ffmpeg since that will mess up GIFs with a non-constant framerate (in addition to being much slower).

    I am using ffmpeg version 2.3, though I have also tried this with the latest git code without any improvement. The full ffmpeg commands I’m using look like this :

    ffmpeg -i animation.gif -vf "scale=trunc(in_w/2)*2:trunc(in_h/2)*2" -c:v libx264 -b:v 2000k -y -pix_fmt yuv420p -f mp4 animation.mp4

    Here is some console output :

    ffmpeg version 2.3 Copyright (c) 2000-2014 the FFmpeg developers
     built on Aug 11 2014 21:19:46 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
     configuration: --enable-gpl --enable-libass --enable-libfreetype --enable-libtheora --enable-libvorbis --enable-libx264
     libavutil      52. 92.100 / 52. 92.100
     libavcodec     55. 69.100 / 55. 69.100
     libavformat    55. 48.100 / 55. 48.100
     libavdevice    55. 13.102 / 55. 13.102
     libavfilter     4. 11.100 /  4. 11.100
     libswscale      2.  6.100 /  2.  6.100
     libswresample   0. 19.100 /  0. 19.100
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, gif, from 'animation.gif':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: gif, bgra, 500x375, 100 tbr, 100 tbn, 100 tbc
    [libx264 @ 0x239ea00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x239ea00] profile High, level 3.1
    [libx264 @ 0x239ea00] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mp4, to 'animation.mp4':
     Metadata:
       encoder         : Lavf55.48.100
       Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 500x374, q=-1--1, 2000 kb/s, 100 fps, 12800 tbn, 100 tbc
       Metadata:
         encoder         : Lavc55.69.100 libx264
    Stream mapping:
     Stream #0:0 -> #0:0 (gif (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    frame=    7 fps=0.0 q=-1.0 Lsize=       7kB time=00:00:00.05 bitrate=1222.1kbits/s dup=5 drop=0    
    video:7kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 13.542441%
    [libx264 @ 0x239ea00] frame I:1     Avg QP:34.86  size:  3657
    [libx264 @ 0x239ea00] frame P:3     Avg QP:30.86  size:   744
    [libx264 @ 0x239ea00] frame B:3     Avg QP:33.33  size:    49
    [libx264 @ 0x239ea00] consecutive B-frames: 42.9%  0.0%  0.0% 57.1%
    [libx264 @ 0x239ea00] mb I  I16..4: 10.2% 78.3% 11.6%
    [libx264 @ 0x239ea00] mb P  I16..4:  1.2%  5.0%  0.8%  P16..4: 11.7%  3.3%  1.2%  0.0%  0.0%    skip:76.8%
    [libx264 @ 0x239ea00] mb B  I16..4:  0.0%  0.1%  0.0%  B16..8:  3.7%  0.0%  0.0%  direct: 0.0%  skip:96.2%  L0:23.5% L1:76.5% BI: 0.0%
    [libx264 @ 0x239ea00] final ratefactor: 20.31
    [libx264 @ 0x239ea00] 8x8 transform intra:77.0% inter:79.4%
    [libx264 @ 0x239ea00] coded y,uvDC,uvAC intra: 39.5% 0.0% 0.0% inter: 2.7% 0.0% 0.0%
    [libx264 @ 0x239ea00] i16 v,h,dc,p: 38% 27%  7% 28%
    [libx264 @ 0x239ea00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 12% 13%  7%  6% 10%  4%  8%  5%
    [libx264 @ 0x239ea00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 11% 14%  5%  8% 10%  5%  7%  2%
    [libx264 @ 0x239ea00] i8c dc,h,v,p: 100%  0%  0%  0%
    [libx264 @ 0x239ea00] Weighted P-Frames: Y:0.0% UV:0.0%
    [libx264 @ 0x239ea00] ref P L0: 99.1%  0.7%  0.3%
    [libx264 @ 0x239ea00] ref B L0: 85.0% 15.0%
    [libx264 @ 0x239ea00] ref B L1: 95.4%  4.6%
    [libx264 @ 0x239ea00] kb/s:689.83
  • ffmpeg amerge and amix filter delay

    10 février 2016, par User New

    I need to take audio-streams from several IP cameras and merge them into one file, so that they would sound simaltaneousely.

    I tried filter "amix" : (for testing purposes I take audio-stream 2 times from the same camera. yes, I tried 2 cameras - result is the same)

    ffmpeg -i rtsp://user:pass@172.22.5.202 -i rtsp://user:pass@172.22.5.202 -map 0:a -map 1:a  -filter_complex amix=inputs=2:duration=first:dropout_transition=3  -ar 22050 -vn -f flv rtmp://172.22.45.38:1935/live/stream1

    result : I say "hello". And hear in speakers the first "hello" and in 1 second I hear the second "hello". Instead of hearing two "hello"’s simaltaneousely.

    and tried filter "amerge" :

    ffmpeg -i rtsp://user:pass@172.22.5.202 -i rtsp://user:pass@172.22.5.202 -map 0:a -map 1:a  -filter_complex amerge -ar 22050 -vn -f flv rtmp://172.22.45.38:1935/live/stream1

    result : the same as in the first example, but now I hear the first "hello" in left speaker and in 1 second I hear the second "hello" in right speaker, instead of hearing two "hello"’s in both speakers simaltaneousely.

    So, the question is : how to make them sound simaltaneousely ? May be you know some parameter ? or some other command ?

    P.S. Here is ful command-line output for both variants if you need them :
    amix :

    [root@minjust ~]# ffmpeg -i rtsp://admin:12345@172.22.5.202 -i rtsp://admin:12345@172.22.5.202 -map 0:a -map 1:a -filter_complex amix=inputs=2:duration=longest:dropout_transition=0 -vn -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream1       ffmpeg version N-76031-g9099079 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --enable-gpl --enable-libx264 --enable-libmp3lame --enable-nonfree --enable-version3
     libavutil      55.  4.100 / 55.  4.100
     libavcodec     57.  6.100 / 57.  6.100
     libavformat    57.  4.100 / 57.  4.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 11.100 /  6. 11.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.100 /  2.  0.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, rtsp, from 'rtsp://admin:12345@172.22.5.202':
     Metadata:
       title           : Media Presentation
     Duration: N/A, start: 0.032000, bitrate: N/A
       Stream #0:0: Video: h264 (Baseline), yuv420p, 1280x720, 20 fps, 25 tbr, 90k tbn, 40 tbc
       Stream #0:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 16 kb/s
       Stream #0:2: Data: none
    Input #1, rtsp, from 'rtsp://admin:12345@172.22.5.202':
     Metadata:
       title           : Media Presentation
     Duration: N/A, start: 0.032000, bitrate: N/A
       Stream #1:0: Video: h264 (Baseline), yuv420p, 1280x720, 20 fps, 25 tbr, 90k tbn, 40 tbc
       Stream #1:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 16 kb/s
       Stream #1:2: Data: none
    Output #0, flv, to 'rtmp://172.22.45.38:1935/live/stream1':
     Metadata:
       title           : Media Presentation
       encoder         : Lavf57.4.100
       Stream #0:0: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 22050 Hz, mono, fltp (default)
       Metadata:
         encoder         : Lavc57.6.100 libmp3lame
    Stream mapping:
     Stream #0:1 (g726) -> amix:input0
     Stream #1:1 (g726) -> amix:input1
     amix -> Stream #0:0 (libmp3lame)
    Press [q] to stop, [?] for help
    [rtsp @ 0x2689600] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    [rtsp @ 0x2727c60] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    [rtsp @ 0x2689600] max delay reached. need to consume packet
    [NULL @ 0x268c500] RTP: missed 38 packets
    [rtsp @ 0x2689600] max delay reached. need to consume packet
    [NULL @ 0x268d460] RTP: missed 4 packets
    [flv @ 0x2958360] Failed to update header with correct duration.
    [flv @ 0x2958360] Failed to update header with correct filesize.
    size=      28kB time=00:00:06.18 bitrate=  36.7kbits/s
    video:0kB audio:24kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 16.331224%

    and amerge :

    [root@minjust ~]# ffmpeg -i rtsp://admin:12345@172.22.5.202 -i rtsp://admin:12345@172.22.5.202 -map 0:a -map 1:a -filter_complex amerge -vn -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream1
    ffmpeg version N-76031-g9099079 Copyright (c) 2000-2015 the FFmpeg developers
     built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
     configuration: --enable-gpl --enable-libx264 --enable-libmp3lame --enable-nonfree --enable-version3
     libavutil      55.  4.100 / 55.  4.100
     libavcodec     57.  6.100 / 57.  6.100
     libavformat    57.  4.100 / 57.  4.100
     libavdevice    57.  0.100 / 57.  0.100
     libavfilter     6. 11.100 /  6. 11.100
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.100 /  2.  0.100
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, rtsp, from 'rtsp://admin:12345@172.22.5.202':
     Metadata:
       title           : Media Presentation
     Duration: N/A, start: 0.064000, bitrate: N/A
       Stream #0:0: Video: h264 (Baseline), yuv420p, 1280x720, 20 fps, 25 tbr, 90k tbn, 40 tbc
       Stream #0:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 16 kb/s
       Stream #0:2: Data: none
    Input #1, rtsp, from 'rtsp://admin:12345@172.22.5.202':
     Metadata:
       title           : Media Presentation
     Duration: N/A, start: 0.032000, bitrate: N/A
       Stream #1:0: Video: h264 (Baseline), yuv420p, 1280x720, 20 fps, 25 tbr, 90k tbn, 40 tbc
       Stream #1:1: Audio: adpcm_g726, 8000 Hz, mono, s16, 16 kb/s
       Stream #1:2: Data: none
    [Parsed_amerge_0 @ 0x3069cc0] No channel layout for input 1
    [Parsed_amerge_0 @ 0x3069cc0] Input channel layouts overlap: output layout will be determined by the number of distinct input channels
    Output #0, flv, to 'rtmp://172.22.45.38:1935/live/stream1':
     Metadata:
       title           : Media Presentation
       encoder         : Lavf57.4.100
       Stream #0:0: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 22050 Hz, stereo, s16p (default)
       Metadata:
         encoder         : Lavc57.6.100 libmp3lame
    Stream mapping:
     Stream #0:1 (g726) -> amerge:in0
     Stream #1:1 (g726) -> amerge:in1
     amerge -> Stream #0:0 (libmp3lame)
    Press [q] to stop, [?] for help
    [rtsp @ 0x2f71640] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    [rtsp @ 0x300fb40] Thread message queue blocking; consider raising the thread_queue_size option (current value: 8)
    [rtsp @ 0x2f71640] max delay reached. need to consume packet
    [NULL @ 0x2f744a0] RTP: missed 18 packets
    [flv @ 0x3058b00] Failed to update header with correct duration.
    [flv @ 0x3058b00] Failed to update header with correct filesize.
    size=      39kB time=00:00:04.54 bitrate=  70.2kbits/s
    video:0kB audio:36kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 8.330614%

    Thanx.

    UPDATE 30 oct 2015 : I found interesting detail when connecting 2 cameras (they have different microphones and I hear the difference between them) : the order of "Hello"’s from different cams depends on the ORDER OF INPUTS.
    with command

    ffmpeg -i rtsp://cam2 -i rtsp://cam1 -map 0:a -map 1:a -filter_complex amix=inputs=2:duration=longest:dropout_transition=0 -vn -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream1

    I hear "hello" from 1st cam and then in 1 second "hello" from 2nd cam.

    with command

    ffmpeg -i rtsp://cam1 -i rtsp://cam2 -map 0:a -map 1:a -filter_complex amix=inputs=2:duration=longest:dropout_transition=0 -vn -ar 22050 -f flv rtmp://172.22.45.38:1935/live/stream1

    I hear "hello" from 2nd cam and then in 1 second "hello" from 1st cam.

    So, As I understand - ffmpeg takes inputs not simaltaneousely, but in the order of inputs given.
    Question : how to tell ffmpeg to read inputs simaltaneousely ?

  • Online RTMP radio with Python + FFmpeg + Nginx : unable to have a continuous output stream

    2 décembre 2023, par Igor Longo

    Thinking about an application similar to an online radio, I'm trying to transmit a sequence of audio files chosen by the user, where he chooses which file will be played in the sequence, sufficiently in advance for the reproduction not to be muted. I'm using FFmpeg in a Python script and an RTMP server running Nginx.
The problem is that interrupting the transmission between one file and another appears to be breaking the transmission on output. Sometimes files are skipped and other times it simply crashes for the client.

    


    I have already tried transmitting the sequence of files in real time, using '-re', and I have also tried not using '-re', creating a custom queue manager in Python with the intention of trying to keep only 'n' files in the server buffer .
Below is an excerpt of the code :

    


    ffmpeg_command = [
'ffmpeg',
'-loglevel', 'warning',
# '-re', # read input at native frame rate
'-i', file_path,
'-c:a', 'aac',
'-ar', '44100',
'-bufsize', '1024k',
'-af', 'atempo=1.0',
'-b:a', '128k',
'-f', 'flv',
'-flvflags', 'no_duration_filesize',
rtmp_url # server url
]
subprocess.run(ffmpeg_command, check=True)

    


    Any tips on how I can resolve this ?