Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (77)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (10967)

  • FFMPEG ALSA xrun crash

    13 décembre 2017, par Liam Martens

    I’m running a YouTube RTMP stream using FFMPEG with x11grab and an alsa loopback device but sometimes after let’s say 20 hours there is an ALSA xrun and then the ffmpeg command crashes, but I’m not sure why or how this happens. (mind you the ffmpeg command does not run continuously it gets restarted automatically every so often, but the xrun makes the command crash causing the stream to go offline sometimes because a crash restart is not fast enough)

    I’m using thread_queue_size and I’ve even manually compiled ffmpeg with a higher ALSA BUFFER SIZE, but the issue appears to persist still. Besides this I’ve also scoured many posts with people having similar issues but these never really seem to end up resolved.

    This is the stream command

    ffmpeg -loglevel verbose -f alsa -thread_queue_size 12288 -ac 2 -i hw:Loopback,1,0 \
            -probesize 10M -f x11grab -field_order tt -thread_queue_size 12288 -video_size 1280x720 -r 30 -i :1.1 \
           -c:v libx264 -c:a libmp3lame -shortest -tune fastdecode -tune zerolatency \
           -crf 26 -pix_fmt yuv420p -threads 0 -maxrate 2500k -bufsize 2500k -pass 1 -af aresample=async=1 \
           -movflags +faststart -flags +global_header -preset ultrafast -r 30 -g 60 -b:v 2000k -b:a 192k -ar 44100 \
           -f flv -rtmp_live live rtmp://a.rtmp.youtube.com/live2/{KEY}

    Log excerpt

    ffmpeg version N-89463-gc7a5e80 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
     configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libtheora --enable-postproc --enable-pic --enable-pthreads --enable-shared --disable-stripping --disable-static --enable-vaapi --enable-libopus --enable-libfreetype --enable-libfontconfig --enable-libpulse --disable-debug
     libavutil      56.  5.100 / 56.  5.100
     libavcodec     58.  6.103 / 58.  6.103
     libavformat    58.  3.100 / 58.  3.100
     libavdevice    58.  0.100 / 58.  0.100
     libavfilter     7.  7.100 /  7.  7.100
     libavresample   4.  0.  0 /  4.  0.  0
     libswscale      5.  0.101 /  5.  0.101
     libswresample   3.  0.101 /  3.  0.101
     libpostproc    55.  0.100 / 55.  0.100
    Guessed Channel Layout for Input Stream #0.0 : stereo
    Input #0, alsa, from 'hw:Loopback,1,0':
     Duration: N/A, start: 1513163617.594224, bitrate: 1536 kb/s
       Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Input #1, x11grab, from ':1.1':
     Duration: N/A, start: 1513163617.632434, bitrate: N/A
       Stream #1:0: Video: rawvideo, 1 reference frame (BGR[0] / 0x524742), bgr0(top first), 854x480, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
    Parsing...
    Parsed protocol: 0
    Parsed host    : a.rtmp.youtube.com
    Parsed app     : live2
    RTMP_Connect1, ... connected, handshaking
    HandShake: Type Answer   : 03
    HandShake: Server Uptime : 0
    HandShake: FMS Version   : 4.0.0.1
    HandShake: Handshaking finished....
    RTMP_Connect1, handshaked
    Invoking connect
    HandleServerBW: server BW = 2500000
    HandleClientBW: client BW = 10000000 2
    HandleChangeChunkSize, received: chunk size change to 256
    RTMP_ClientPacket, received: invoke 240 bytes
    (object begin)
    Property:
    Property:
    Property:
    (object begin)
    Property: 3,5,3,824>
    Property:
    Property:
    (object end)
    Property:
    (object begin)
    Property:
    Property:
    Property:
    Property:
    Property:
    (object begin)
    Property:
    (object end)
    (object end)
    (object end)
    HandleInvoke, server invoking <_result>
    HandleInvoke, received result for method call <connect>
    Invoking releaseStream
    Invoking FCPublish
    Invoking createStream
    RTMP_ClientPacket, received: invoke 21 bytes
    (object begin)
    Property:
    Property:
    Property: NULL
    (object end)
    HandleInvoke, server invoking <onbwdone>
    Invoking _checkbw
    RTMP_ClientPacket, received: invoke 29 bytes
    (object begin)
    Property:
    Property:
    Property: NULL
    Property:
    (object end)
    HandleInvoke, server invoking &lt;_result>
    HandleInvoke, received result for method call <createstream>
    Invoking publish
    RTMP_ClientPacket, received: invoke 73 bytes
    (object begin)
    Property:
    Property:
    Property: NULL
    Property:
    (object begin)
    Property:
    Property:
    (object end)
    (object end)
    HandleInvoke, server invoking <onstatus>
    HandleInvoke, onStatus: NetStream.Publish.Start
    Stream mapping:
     Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
     Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    [graph 0 input from stream 1:0 @ 0x5607d087e060] w:854 h:480 pixfmt:bgr0 tb:1/30 fr:30/1 sar:0/1 sws_param:flags=2
    [auto_scaler_0 @ 0x5607d087d800] w:iw h:ih flags:'bicubic' interl:0
    [format @ 0x5607d087ed40] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
    [auto_scaler_0 @ 0x5607d087d800] w:854 h:480 fmt:bgr0 sar:0/1 -> w:854 h:480 fmt:yuv420p sar:0/1 flags:0x4
    [swscaler @ 0x5607d0880260] Warning: data is not aligned! This can lead to a speed loss
    [libx264 @ 0x5607d08684e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    [libx264 @ 0x5607d08684e0] profile Constrained Baseline, level 3.1
    [libx264 @ 0x5607d08684e0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=26.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=1500 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
    [graph_1_in_0_0 @ 0x5607d091c840] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
    [Parsed_aresample_0 @ 0x5607d0916b40] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:s16p r:44100Hz
    Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/{KEY}':
     Metadata:
       encoder         : Lavf58.3.100
       Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0] / 0x0007), yuv420p(top coded first (swapped)), 854x480, q=-1--1, 1000 kb/s, 30 fps, 1k tbn, 30 tbc
       Metadata:
         encoder         : Lavc58.6.103 libx264
       Side data:
         cpb: bitrate max/min/avg: 1500000/0/1000000 buffer size: 1500000 vbv_delay: -1
       Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, delay 1105, 192 kb/s
       Metadata:
         encoder         : Lavc58.6.103 libmp3lame
    frame=   29 fps=0.0 q=17.0 size=     146kB time=00:00:00.94 bitrate=1267.3kbits/s speed=1.86x    
    frame=   44 fps= 44 q=18.0 size=     168kB time=00:00:01.46 bitrate= 942.4kbits/s speed=1.45x    
    frame=   60 fps= 40 q=16.0 size=     191kB time=00:00:01.96 bitrate= 794.8kbits/s speed= 1.3x    
    ...
    frame= 2740 fps= 30 q=17.0 size=    7993kB time=00:01:31.32 bitrate= 717.0kbits/s speed=   1x    
    frame= 2755 fps= 30 q=18.0 size=    8013kB time=00:01:31.82 bitrate= 714.9kbits/s speed=   1x    
    [alsa @ 0x5607d084d7e0] ALSA buffer xrun.
    </onstatus></createstream></onbwdone></connect>
  • Fixing A/V sync issues with RTP/RTCP sent from mediasoup

    10 décembre 2017, par artushin

    A little background : I’m attempting to record a webrtc call being made through the mediasoup v2 SFU. I’m using mediasoup’s room.createRtpStreamer() method to generate a stream which mirrors RTP/RTCP to ffmpeg. Two streamers are created for audio and video within 30ms of each other and begin broadcasting. FFmpeg then spins up and starts accepting. Pretty sure RTCP is working since ffmpeg is always starting with a keyframe despite being started after the streamer begins broadcasting.

    The problem is that I encounter audio/video desynchronization with seemingly random offsets. My current theory is that this offset is based on how old the last keyframe is that RTCP requests to start the stream. See below for ffmpeg configuration and output but my question is : what ffmpeg arguments can I use to adjust the video frame timestamps to match the audio frame timestamps or vice versa ? I’ve messed around with -map 0:0,0:1 -map 0:1,0:1 but it doesn’t seem to do what I’m looking for.

    ffmpeg flags :

    '-y',
    '-loglevel',
    'debug',
    '-dump',
    '-protocol_whitelist',
    'file,crypto,udp,rtp,data',
    '-analyzeduration',
    '20M',
    '-probesize',
    '20M',
    '-i',
    `data:text/plain;base64,${sdp.toString('base64')}`,
    '-fflags',
    '+genpts',
    '-vcodec',
    'copy',
    '-acodec',
    'aac',
    '-bsf:v',
    'h264_mp4toannexb',
    '-start_number',
    '0',
    '-hls_list_size',
    '2147480000',
    '-hls_wrap',
    '0',
    '-hls_time',
    '10',

    SDP used for input (template) :

    v=0
    o=- 0 0 IN IP4 &lt;%=ip %>
    s=title
    c=IN IP4 &lt;%=ip %>
    m=audio &lt;%=audioPort %> RTP/AVPF &lt;%=audioPayload %>
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:&lt;%=audioPayload %> opus/48000/2
    a=fmtp:&lt;%=audioPayload %> minptime=10; useinbandfec=1
    m=video &lt;%=videoPort %> RTP/AVPF &lt;%=videoPayload %>
    a=sendrecv
    a=rtcp-mux
    a=rtpmap:&lt;%=videoPayload %> H264/90000
    a=rtcp-fb:&lt;%=videoPayload %> ccm fir
    a=rtcp-fb:&lt;%=videoPayload %> nack
    a=rtcp-fb:&lt;%=videoPayload %> nack pli
    a=rtcp-fb:&lt;%=videoPayload %> goog-remb
    a=rtcp-fb:&lt;%=videoPayload %> transport-cc
    a=fmtp:&lt;%=videoPayload %> level-asymmetry-allowed=1;packetization-mode=1

    ffmpeg output - garbled with some timestamps

    1512775954585 - stderr: ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 9.0.0 (clang-900.0.38)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-ffplay --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
    1512775954587 - stderr:   libavutil      55. 78.100 / 55. 78.100
     libavcodec     57.107.100 / 57.107.100
     libavformat    57. 83.100 / 57. 83.100
     libavdevice    57. 10.100 / 57. 10.100
    1512775954587 - stderr:   libavfilter     6.107.100 /  6.107.100
     libavresample   3.  7.  0 /  3.  7.  0
     libswscale      4.  8.100 /  4.  8.100
     libswresample   2.  9.100 /  2.  9.100
     libpostproc    54.  7.100 / 54.  7.100
    Splitting the commandline.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
    Reading option '-dump' ... matched as option 'dump' (dump each input packet) with argument '1'.
    Reading option '-protocol_whitelist' ...1512775954589 - stderr:  matched as AVOption 'protocol_whitelist' with argument 'file,crypto,udp,rtp,data'.
    Reading option '-analyzeduration' ...1512775954590 - stderr:  matched as AVOption 'analyzeduration' with argument '20M'.
    Reading option '-probesize' ...1512775954590 - stderr:  matched as AVOption 'probesize' with argument '20M'.
    Reading option '-i' ... matched as input url with argument 'data:text/plain;base64,dj0wCm89LSAwIDAgSU4gSVA0IDEyNy4wLjAuMQpzPWUwYzkyZmEwLWRhZDUtMTFlNy04Njg3LTA5MGRkYTk1YjFhNCBmb29ib2FyCmM9SU4gSVA0IDEyNy4wLjAuMQptPWF1ZGlvIDIwMDAwIFJUUC9BVlBGIDEwMAphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAwIG9wdXMvNDgwMDAvMgphPWZtdHA6MTAwIG1pbnB0aW1lPTEwOyB1c2VpbmJhbmRmZWM9MQptPXZpZGVvIDIwMDAyIFJUUC9BVlBGIDEwMQphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAxIEgyNjQvOTAwMDAKYT1ydGNwLWZiOjEwMSBjY20gZmlyCmE9cnRjcC1mYjoxMDEgbmFjawphPXJ0Y3AtZmI6MTAxIG5hY2sgcGxpCmE9cnRjcC1mYjoxMDEgZ29vZy1yZW1iCmE9cnRjcC1mYjoxMDEgdHJhbnNwb3J0LWNjCmE9Zm10cDoxMDEgbGV2ZWwtYXN5bW1ldHJ5LWFsbG93ZWQ9MTtwYWNrZXRpemF0aW9uLW1vZGU9MTtwcm9maWxlLWxldmVsLWlkPTQyZTAxZgo='.
    Reading option '-fflags' ...1512775954591 - stderr:  matched as AVOption 'fflags' with argument '+genpts'.
    Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'aac'.
    Reading option '-vsync' ... matched as option 'vsync' (video sync method) with argument '0'.
    Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:0,0:1'.
    Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:1,0:1'.
    Reading option '-bsf:v' ... matched as option 'bsf' (A comma-separated list of bitstream filters) with argument 'h264_mp4toannexb'.
    Reading option '-start_number' ...1512775954591 - stderr:  matched as AVOption 'start_number' with argument '0'.
    Reading option '-hls_list_size' ...1512775954591 - stderr:  matched as AVOption 'hls_list_size' with argument '2147480000'.
    Reading option '-hls_wrap' ... matched as AVOption 'hls_wrap' with argument '0'.
    Reading option '-hls_time' ...1512775954591 - stderr:  matched as AVOption 'hls_time' with argument '10'.
    Reading option '/tmp/archive/e0c92fa0-dad5-11e7-8687-090dda95b1a4_10e1c990-dc70-11e7-888d-9f39ca0c79bc/1512775954465.m3u8' ... matched as output url.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option y (overwrite output files) with argument 1.
    1512775954592 - stderr: Applying option loglevel (set logging level) with argument debug.
    Applying option dump (dump each input packet) with argument 1.
    Applying option vsync (video sync method) with argument 0.
    Successfully parsed a group of options.
    Parsing a group of options: input url data:text/plain;base64,dj0wCm89LSAwIDAgSU4gSVA0IDEyNy4wLjAuMQpzPWUwYzkyZmEwLWRhZDUtMTFlNy04Njg3LTA5MGRkYTk1YjFhNCBmb29ib2FyCmM9SU4gSVA0IDEyNy4wLjAuMQptPWF1ZGlvIDIwMDAwIFJUUC9BVlBGIDEwMAphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAwIG9wdXMvNDgwMDAvMgphPWZtdHA6MTAwIG1pbnB0aW1lPTEwOyB1c2VpbmJhbmRmZWM9MQptPXZpZGVvIDIwMDAyIFJUUC9BVlBGIDEwMQphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAxIEgyNjQvOTAwMDAKYT1ydGNwLWZiOjEwMSBjY20gZmlyCmE9cnRjcC1mYjoxMDEgbmFjawphPXJ0Y3AtZmI6MTAxIG5hY2sgcGxpCmE9cnRjcC1mYjoxMDEgZ29vZy1yZW1iCmE9cnRjcC1mYjoxMDEgdHJhbnNwb3J0LWNjCmE9Zm10cDoxMDEgbGV2ZWwtYXN5bW1ldHJ5LWFsbG93ZWQ9MTtwYWNrZXRpemF0aW9uLW1vZGU9MTtwcm9maWxlLWxldmVsLWlkPTQyZTAxZgo=.
    Successfully parsed a group of options.
    Opening an input file: data:text/plain;base64,dj0wCm89LSAwIDAgSU4gSVA0IDEyNy4wLjAuMQpzPWUwYzkyZmEwLWRhZDUtMTFlNy04Njg3LTA5MGRkYTk1YjFhNCBmb29ib2FyCmM9SU4gSVA0IDEyNy4wLjAuMQptPWF1ZGlvIDIwMDAwIFJUUC9BVlBGIDEwMAphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAwIG9wdXMvNDgwMDAvMgphPWZtdHA6MTAwIG1pbnB0aW1lPTEwOyB1c2VpbmJhbmRmZWM9MQptPXZpZGVvIDIwMDAyIFJUUC9BVlBGIDEwMQphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAxIEgyNjQvOTAwMDAKYT1ydGNwLWZiOjEwMSBjY20gZmlyCmE9cnRjcC1mYjoxMDEgbmFjawphPXJ0Y3AtZmI6MTAxIG5hY2sgcGxpCmE9cnRjcC1mYjoxMDEgZ29vZy1yZW1iCmE9cnRjcC1mYjoxMDEgdHJhbnNwb3J0LWNjCmE9Zm10cDoxMDEgbGV2ZWwtYXN5bW1ldHJ5LWFsbG93ZWQ9MTtwYWNrZXRpemF0aW9uLW1vZGU9MTtwcm9maWxlLWxldmVsLWlkPTQyZTAxZgo=.
    1512775954592 - stderr: [NULL @ 0x7f81fd000000] Opening 'data:text/plain;base64,dj0wCm89LSAwIDAgSU4gSVA0IDEyNy4wLjAuMQpzPWUwYzkyZmEwLWRhZDUtMTFlNy04Njg3LTA5MGRkYTk1YjFhNCBmb29ib2FyCmM9SU4gSVA0IDEyNy4wLjAuMQptPWF1ZGlvIDIwMDAwIFJUUC9BVlBGIDEwMAphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAwIG9wdXMvNDgwMDAvMgphPWZtdHA6MTAwIG1pbnB0aW1lPTEwOyB1c2VpbmJhbmRmZWM9MQptPXZpZGVvIDIwMDAyIFJUUC9BVlBGIDEwMQphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAxIEgyNjQvOTAwMDAKYT1ydGNwLWZiOjEwMSBjY20gZmlyCmE9cnRjcC1mYjoxMDEgbmFjawphPXJ0Y3AtZmI6MTAxIG5hY2sgcGxpCmE9cnRjcC1mYjoxMDEgZ29vZy1yZW1iCmE9cnRjcC1mYjoxMDEgdHJhbnNwb3J0LWNjCmE9Zm10cDoxMDEgbGV2ZWwtYXN5bW1ldHJ5LWFsbG93ZWQ9MTtwYWNrZXRpemF0aW9uLW1vZGU9MTtwcm9maWxlLWxldmVsLWlkPTQyZTAxZgo=' for reading
    1512775954593 - stderr: [data @ 0x7f81fca001a0] Content-type: text/plain
    {"level":"info","time":"Dec 8, 2017 11:32 PM","message":"ffmpeg started"}
    1512775954595 - stderr: [sdp @ 0x7f81fd000000] Format sdp probed with size=2048 and score=50
    1512775954598 - stderr: [sdp @ 0x7f81fd000000] audio codec set to: opus
    [sdp @ 0x7f81fd000000] audio samplerate set to: 48000
    [sdp @ 0x7f81fd000000] audio channels set to: 2
    1512775954639 - stderr: [sdp @ 0x7f81fd000000] video codec set to: h264
    [sdp @ 0x7f81fd000000] RTP Packetization Mode: 1
    [sdp @ 0x7f81fd000000] RTP Profile IDC: 42 Profile IOP: e0 Level: 1f
    [udp @ 0x7f81fcb007e0] end receive buffer size reported is 65536
    [udp @ 0x7f81fbe00180] end receive buffer size reported is 65536
    [sdp @ 0x7f81fd000000] setting jitter buffer size to 500
    [udp @ 0x7f81fbe00680] end receive buffer size reported is 65536
    [udp @ 0x7f81fbe00740] end receive buffer size reported is 65536
    [sdp @ 0x7f81fd000000] setting jitter buffer size to 500
    [sdp @ 0x7f81fd000000] Before avformat_find_stream_info() pos: 479 bytes read:479 seeks:0 nb_streams:2
    {"level":"info","time":"Dec 8, 2017 11:32 PM","message":"new active speaker","activePeer":"9f05d96a-9641-4c63-8f0e-486b98e48eb5"}
    1512775954773 - stderr: [AVBSFContext @ 0x7f81fc8018e0] nal_unit_type: 7, nal_ref_idc: 3
    [AVBSFContext @ 0x7f81fc8018e0] nal_unit_type: 8, nal_ref_idc: 3
    [AVBSFContext @ 0x7f81fc8018e0] nal_unit_type: 5, nal_ref_idc: 3
    1512775954774 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 7, nal_ref_idc: 3
    1512775954774 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 8, nal_ref_idc: 3
    1512775954774 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 5, nal_ref_idc: 3
    1512775954774 - stderr: [h264 @ 0x7f8200000c00] Reinit context to 640x480, pix_fmt: yuv420p
    1512775954801 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 1, nal_ref_idc: 3
    1512775954939 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 7, nal_ref_idc: 3
    1512775954939 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 8, nal_ref_idc: 3
    1512775954940 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 5, nal_ref_idc: 3
    1512775955003 - stderr: [h264 @ 0x7f8200000c00] nal_unit_type: 1, nal_ref_idc: 3
    1512775955999 - stderr:     Last message repeated 3 times
    [sdp @ 0x7f81fd000000] All info found
    1512775955999 - stderr: [sdp @ 0x7f81fd000000] rfps: 29.750000 0.019566
    [sdp @ 0x7f81fd000000] rfps: 29.833333 0.015263
    [sdp @ 0x7f81fd000000] rfps: 29.916667 0.011503
    1512775955999 - stderr: [sdp @ 0x7f81fd000000] rfps: 30.000000 0.008285
    [sdp @ 0x7f81fd000000] rfps: 31.000000 0.011990
       Last message repeated 1 times
    [sdp @ 0x7f81fd000000] rfps: 29.970030 0.009380
    [sdp @ 0x7f81fd000000] After avformat_find_stream_info() pos: 479 bytes read:479 seeks:0 frames:98
    1512775956000 - stderr: Input #0, sdp, from 'data:text/plain;base64,dj0wCm89LSAwIDAgSU4gSVA0IDEyNy4wLjAuMQpzPWUwYzkyZmEwLWRhZDUtMTFlNy04Njg3LTA5MGRkYTk1YjFhNCBmb29ib2FyCmM9SU4gSVA0IDEyNy4wLjAuMQptPWF1ZGlvIDIwMDAwIFJUUC9BVlBGIDEwMAphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAwIG9wdXMvNDgwMDAvMgphPWZtdHA6MTAwIG1pbnB0aW1lPTEwOyB1c2VpbmJhbmRmZWM9MQptPXZpZGVvIDIwMDAyIFJUUC9BVlBGIDEwMQphPXNlbmRyZWN2CmE9cnRjcC1tdXgKYT1ydHBtYXA6MTAxIEgyNjQvOTAwMDAKYT1ydGNwLWZiOjEwMSBjY20gZmlyCmE9cnRjcC1mYjoxMDEgbmFjawphPXJ0Y3AtZmI6MTAxIG5hY2sgcGxpCmE9cnRjcC1mYjoxMDEgZ29vZy1yZW1iCmE9cnRjcC1mYjoxMDEgdHJhbnNwb3J0LWNjCmE9Zm10cDoxMDEgbGV2ZWwtYXN5bW1ldHJ5LWFsbG93ZWQ9MTtwYWNrZXRpemF0aW9uLW1vZGU9MTtwcm9maWxlLWxldmVsLWlkPTQyZTAxZgo=':
    1512775956000 - stderr:   Metadata:
       title           : e0c92fa0-dad5-11e7-8687-090dda95b1a4 fooboar
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0, 70, 1/48000: Audio: opus, 48000 Hz, stereo, fltp1512775956000 - stderr:
       Stream #0:1, 28, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 640x480, 0/1, 30 tbr, 90k tbn, 180k tbc
    1512775956000 - stderr: Successfully opened the file.
    Parsing a group of options: output url /tmp/archive/e0c92fa0-dad5-11e7-8687-090dda95b1a4_10e1c990-dc70-11e7-888d-9f39ca0c79bc/1512775954465.m3u8.
    Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
    Applying option acodec (force audio codec ('copy' to copy stream)) with argument aac.
    Applying option map (set input stream mapping) with argument 0:0,0:1.
    Applying option map (set input stream mapping) with argument 0:1,0:1.
    Applying option bsf:v (A comma-separated list of bitstream filters) with argument h264_mp4toannexb.
    Successfully parsed a group of options.
    1512775956000 - stderr: Opening an output file: /tmp/archive/e0c92fa0-dad5-11e7-8687-090dda95b1a4_10e1c990-dc70-11e7-888d-9f39ca0c79bc/1512775954465.m3u8.
    1512775956000 - stderr: Successfully opened the file.
    1512775956001 - stderr: [AVBSFContext @ 0x7f81fcb020a0] The input looks like it is Annex B already
    Stream mapping:
    1512775956001 - stderr:   Stream #0:0 -> #0:0 [sync #0:1] (opus (native) -> aac (native))
     Stream #0:1 -> #0:1 (copy)
    Press [q] to stop, [?] for help
    cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.000  pts=0.000
     size=82
    1512775956001 - stderr: [SWR @ 0x7f820001e600] Using fltp internally between filters
    1512775956002 - stderr: detected 8 logical cores
    1512775956003 - stderr: [graph_0_in_0_0 @ 0x7f81fc90dfc0] Setting 'time_base' to value '1/48000'
    [graph_0_in_0_0 @ 0x7f81fc90dfc0] Setting 'sample_rate' to value '48000'
    1512775956003 - stderr: [graph_0_in_0_0 @ 0x7f81fc90dfc0] Setting 'sample_fmt' to value 'fltp'
    [graph_0_in_0_0 @ 0x7f81fc90dfc0] Setting 'channel_layout' to value '0x3'
    [graph_0_in_0_0 @ 0x7f81fc90dfc0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
    [format_out_0_0 @ 0x7f81fc914da0] Setting 'sample_fmts' to value 'fltp'
    [format_out_0_0 @ 0x7f81fc914da0] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
    1512775956004 - stderr: [AVFilterGraph @ 0x7f81fbd02200] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
    1512775956007 - stderr: [hls @ 0x7f81fd80f000] Opening '/tmp/archive/e0c92fa0-dad5-11e7-8687-090dda95b1a4_10e1c990-dc70-11e7-888d-9f39ca0c79bc/15127759544650.ts' for writing
    [file @ 0x7f81fbf01ee0] Setting default whitelist 'file,crypto'
    1512775956007 - stderr: [mpegts @ 0x7f81fd877800] muxrate VBR, pcr every 9000 pkts, sdt every 2147483647, pat/pmt every 2147483647 pkts
    Output #0, hls, to '/tmp/archive/e0c92fa0-dad5-11e7-8687-090dda95b1a4_10e1c990-dc70-11e7-888d-9f39ca0c79bc/1512775954465.m3u8':
     Metadata:
       title           : e0c92fa0-dad5-11e7-8687-090dda95b1a4 fooboar
       encoder         : Lavf57.83.100
    1512775956007 - stderr:     Stream #0:0, 0, 1/90000: Audio: aac (LC), 48000 Hz, stereo, fltp, delay 1024, 128 kb/s
       Metadata:
         encoder         : Lavc57.107.100 aac
       Stream #0:1, 0, 1/90000: Video: h264 (Constrained Baseline), 1 reference frame, yuv420p(progressive, left), 640x480 (0x0), 0/1, q=2-31, 30 tbr, 90k tbn, 90k tbc
    cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    1512775956007 - stderr:     Last message repeated 1 times
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.020  pts=0.020
     size=79
    1512775956007 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
       Last message repeated 1 times
    stream #0:
     keyframe=1
     duration=0.000
    1512775956007 - stderr:   dts=0.040  pts=0.040
     size=75
    1512775956014 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.0601512775956014 - stderr:   pts=0.060
     size=81
    1512775956017 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.080  pts=0.080
     size=76
    1512775956022 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.1001512775956022 - stderr:   pts=0.100
     size=79
    1512775956023 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
    1512775956023 - stderr:   duration=0.000
     dts=0.120  pts=0.120
     size=95
    1512775956024 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    1512775956024 - stderr: stream #0:
     keyframe=1
     duration=0.000
     dts=0.140  pts=0.140
     size=93
    1512775956025 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #0:
     keyframe=1
    1512775956025 - stderr:   duration=0.000
     dts=0.160  pts=0.160
     size=94
    1512775956026 - stderr: cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    stream #1:
     keyframe=1
    1512775956026 - stderr:   duration=0.000
     dts=N/A  pts=N/A
     size=992
    [hls @ 0x7f81fd80f000] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
    1512775956026 - stderr: stream #0:
     keyframe=1
     duration=0.000
    1512775956026 - stderr:   dts=0.180  pts=0.180
     size=108
    1512775956027 - stderr: stream #1:
     keyframe=0
     duration=0.000
    1512775956027 - stderr:   dts=0.002  pts=0.002
     size=3047
    [hls @ 0x7f81fd80f000] pkt->duration = 0, maybe the hls segment duration will not precise
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.200  pts=0.200
     size=89
    1512775956060 - stderr: stream #0:
     keyframe=1
     duration=0.000
     dts=0.220  pts=0.220
     size=73
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.240  pts=0.240
     size=78
    stream #0:
     keyframe=1
     duration=0.000
     dts=0.260  pts=0.260

    Notice how the first frame for stream #1 (video) starts after a number of audio frames ? Specifically, it starts at stream #0 dts/pts 0.18. In this situation, the a/v sync issue is pretty much unnoticeable, but with a bunch of repros, I’ve determined that the a/v sync offset is always the duration of however long audio frames were sent before the first video frame (sometimes seconds). I’m consistently starting the RTP streams only tens of ms apart, so I can’t control for this variance on the input side.

    After the initial audio frames come in, the first video frame has a dts/pts around 0. What ffmpeg setting would I use to adjust the timestamps accordingly ? I don’t care about losing the starting audio that doesn’t have video, so any solution that would adjust the timestamps works.

  • How i can add logo on any location on ffmpeg stream ? This is my command :

    9 décembre 2017, par Jond David

    ffmpeg -y -i input.mp4 -i "logo2.png" -filter_complex "[0:v]setpts=PTS/1.15,boxblur=2:1,scale=iw/1.75 :-1,pad=iw+26:ih+26:13:13:color=blue [v1] ; movie=bgmu.mp4:loop=999,setpts=N/(FRAME_RATE*TB) [v2] ; [v2][v1]overlay=shortest=1:x=W-w-30:y=H-h-22 [v3] ; [v3][1:v]overlay=0:0,setdar=16/9 ; [0:a]atempo=1.15, aecho=0.4:0.66:2:0.2, chorus=0.5:0.9:50|80:0.4|0.42:0.25|0.4:2|1.4, firequalizer=gain_entry=’entry(100,0) ; entry(400, -4) ; entry(1000, -6) ; entry(2000, 0)’,equalizer = f = 1000 : width_type = q : width = 1 : g = 2, equalizer = f = 100 : width_type = q : width = 2 : g = 5,pan=stereo|c0