Recherche avancée

Médias (91)

Autres articles (47)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

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

  • Revision 118699 : afficher_si pour la saisie cvt_upload. Permet avec la syntaxe ...

    18 novembre 2019, par maieul@… — Log

    afficher_si pour la saisie cvt_upload. Permet avec la syntaxe @fichiers_1@:TOTAL &gt ; 2 d’afficher quelque chose si on a plus de 2 fichiers envoyé

  • ffmpeg Save incoming RTP audio only stream to file

    5 novembre 2019, par hemu

    I have setup kurento media server, which streams RTP audio (only audio). Now I am trying to test the received RTP stream. For that, I am saving the incoming RTP stream to file converting them to mp3. I am using the following command.

    sudo ffmpeg -loglevel debug -protocol_whitelist file,crypto,udp,rtp -reorder_queue_size 100 -acodec opus -i mySdpOffer.sdp -acodec mp3 -y -f segment -segment_atclocktime 1 -segment_time 900 -reset_timestamps 1 -strftime 1 out-%Y%m%dT%H%M.mp3

    SDP offer :

    v=0
    t=0 0
    m=audio 8978 RTP/AVP 98
    c=IN IP4 127.0.0.1
    a=recvonly
    a=rtpmap:98 opus/48000/2
    a=fmtp:98 stereo=0; sprop-stereo=0; useinbandfec=1

    I am getting the output mp3 file, but when I play it in VLC, there is no audio and while I stream for approximately 1 minute, the mp3 output file shows time 7 min long audio.

    There are no errors from ffmpeg. Am I missing something here ?

    UPDATE

    Adding ffmpeg logs,

    Initials logs, before it starts capturing/decoding/writing to file

    Splitting the commandline.
    Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
    Reading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,crypto,udp,rtp'.
    Reading option '-reorder_queue_size' ... matched as AVOption 'reorder_queue_size' with argument '100'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'opus'.
    Reading option '-i' ... matched as input url with argument '/home/ubuntu/Documents/inputAudio.sdp'.
    Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'mp3'.
    Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
    Reading option '-f' ... matched as option 'f' (force format) with argument 'segment'.
    Reading option '-segment_atclocktime' ... matched as AVOption 'segment_atclocktime' with argument '1'.
    Reading option '-segment_time' ... matched as AVOption 'segment_time' with argument '900'.
    Reading option '-reset_timestamps' ... matched as AVOption 'reset_timestamps' with argument '1'.
    Reading option '-strftime' ... matched as AVOption 'strftime' with argument '1'.
    Reading option 'out-%Y%m%dT%H%M.mp3' ... matched as output url.
    Finished splitting the commandline.
    Parsing a group of options: global .
    Applying option loglevel (set logging level) with argument debug.
    Applying option y (overwrite output files) with argument 1.
    Successfully parsed a group of options.
    Parsing a group of options: input url /home/ubuntu/Documents/inputAudio.sdp.
    Applying option acodec (force audio codec ('copy' to copy stream)) with argument opus.
    Successfully parsed a group of options.
    Opening an input file: /home/ubuntu/Documents/inputAudio.sdp.
    [NULL @ 0x55e09081d440] Opening '/home/ubuntu/Documents/inputAudio.sdp' for reading
    [sdp @ 0x55e09081d440] Format sdp probed with size=2048 and score=50
    [sdp @ 0x55e09081d440] audio codec set to: opus
    [sdp @ 0x55e09081d440] audio samplerate set to: 48000
    [sdp @ 0x55e09081d440] audio channels set to: 2
    [udp @ 0x55e090825200] end receive buffer size reported is 131072
    [udp @ 0x55e090824ec0] end receive buffer size reported is 131072
    [sdp @ 0x55e09081d440] setting jitter buffer size to 100
    [sdp @ 0x55e09081d440] Before avformat_find_stream_info() pos: 141 bytes read:141 seeks:0 nb_streams:1
    [sdp @ 0x55e09081d440] All info found
    [sdp @ 0x55e09081d440] After avformat_find_stream_info() pos: 141 bytes read:141 seeks:0 frames:1
    Input #0, sdp, from '/home/ubuntu/Documents/inputAudio.sdp':
     Duration: N/A, start: 0.000000, bitrate: N/A
       Stream #0:0, 1, 1/48000: Audio: opus, 48000 Hz, stereo, fltp
    Successfully opened the file.
    Parsing a group of options: output url out-%Y%m%dT%H%M.mp3.
    Applying option acodec (force audio codec ('copy' to copy stream)) with argument mp3.
    Applying option f (force format) with argument segment.
    Successfully parsed a group of options.
    Opening an output file: out-%Y%m%dT%H%M.mp3.
    Matched encoder 'libmp3lame' for codec 'mp3'.
    Successfully opened the file.
    Stream mapping:
     Stream #0:0 -> #0:0 (opus (native) -> mp3 (libmp3lame))
    Press [q] to stop, [?] for help
    cur_dts is invalid (this is harmless if it occurs once at the start per stream)
    detected 2 logical cores
    [graph_0_in_0_0 @ 0x55e0908a2240] Setting 'time_base' to value '1/48000'
    [graph_0_in_0_0 @ 0x55e0908a2240] Setting 'sample_rate' to value '48000'
    [graph_0_in_0_0 @ 0x55e0908a2240] Setting 'sample_fmt' to value 'fltp'
    [graph_0_in_0_0 @ 0x55e0908a2240] Setting 'channel_layout' to value '0x3'
    [graph_0_in_0_0 @ 0x55e0908a2240] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
    [format_out_0_0 @ 0x55e0908875c0] Setting 'sample_fmts' to value 's32p|fltp|s16p'
    [format_out_0_0 @ 0x55e0908875c0] Setting 'sample_rates' to value '44100|48000|32000|22050|24000|16000|11025|12000|8000'
    [format_out_0_0 @ 0x55e0908875c0] Setting 'channel_layouts' to value '0x4|0x3'
    [AVFilterGraph @ 0x55e0908a1400] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
    [segment @ 0x55e09081f7c0] Selected stream id:0 type:audio
    [segment @ 0x55e09081f7c0] Opening 'out-20191105T1707.mp3' for writing
    [file @ 0x55e0908a2bc0] Setting default whitelist 'file,crypto'
    Output #0, segment, to 'out-%Y%m%dT%H%M.mp3':
     Metadata:
       encoder         : Lavf58.20.100
       Stream #0:0, 0, 1/48000: Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp, delay 1105
       Metadata:
         encoder         : Lavc58.35.100 libmp3lame
    cur_dts is invalid (this is harmless if it occurs once at the start per stream)
       Last message repeated 3 times
    [segment @ 0x55e09081f7c0] segment:'out-20191105T1707.mp3' starts with packet stream:0 pts:0 pts_time:0 frame:0
    [segment @ 0x55e09081f7c0] stream:0 start_pts_time:0 pts:0 pts_time:0 dts:0 dts_time:0 -> pts:0 pts_time:0 dts:0 dts_time:0
    [segment @ 0x55e09081f7c0] stream:0 start_pts_time:0 pts:1152 pts_time:0.024 dts:1152 dts_time:0.024 -> pts:1152 pts_time:0.024 dts:1152 dts_time:0.024
    [segment @ 0x55e09081f7c0] stream:0 start_pts_time:0 pts:179904 pts_time:3.748 dts:179904 dts_time:3.748 -> pts:179904 pts_time:3.748 dts:179904 dts_time:3.748
    [segment @ 0x55e09081f7c0] stream:0 start_pts_time:0 pts:181056 pts_time:3.772 dts:181056 dts_time:3.772 -> pts:181056 pts_time:3.772 dts:181056 dts_time:3.772

    last few lines.

    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137124480 pts_time:2856.76 dts:137124480 dts_time:2856.76 -> pts:137124480 pts_time:2856.76 dts:137124480 dts_time:2856.76
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137130912 pts_time:2856.89 dts:137130912 dts_time:2856.89 -> pts:137130912 pts_time:2856.89 dts:137130912 dts_time:2856.89
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137132064 pts_time:2856.92 dts:137132064 dts_time:2856.92 -> pts:137132064 pts_time:2856.92 dts:137132064 dts_time:2856.92
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137133216 pts_time:2856.94 dts:137133216 dts_time:2856.94 -> pts:137133216 pts_time:2856.94 dts:137133216 dts_time:2856.94
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137134368 pts_time:2856.97 dts:137134368 dts_time:2856.97 -> pts:137134368 pts_time:2856.97 dts:137134368 dts_time:2856.97
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137135520 pts_time:2856.99 dts:137135520 dts_time:2856.99 -> pts:137135520 pts_time:2856.99 dts:137135520 dts_time:2856.99
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137136672 pts_time:2857.01 dts:137136672 dts_time:2857.01 -> pts:137136672 pts_time:2857.01 dts:137136672 dts_time:2857.01
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137137824 pts_time:2857.04 dts:137137824 dts_time:2857.04 -> pts:137137824 pts_time:2857.04 dts:137137824 dts_time:2857.04
    [libmp3lame @ 0x5613ffd81900] Trying to remove 47 more samples than there are in the queue
    [segment @ 0x5613ffd7f7c0] stream:0 start_pts_time:0 pts:137138976 pts_time:2857.06 dts:137138976 dts_time:2857.06 -> pts:137138976 pts_time:2857.06 dts:137138976 dts_time:2857.06
    [segment @ 0x5613ffd7f7c0] segment:'out-20191105T1651.mp3' count:0 ended
    [AVIOContext @ 0x5613ffe02a00] Statistics: 1 seeks, 24 writeouts
    size=N/A time=00:47:37.06 bitrate=N/A speed= 236x    
    video:0kB audio:5803kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    Input file #0 (/home/ubuntu/Documents/bz-squawk-sdpoffer/inputAudio.sdp):
     Input stream #0:0 (audio): 18568 packets read (2970880 bytes); 18568 frames decoded (17825280 samples);
     Total: 18568 packets (2970880 bytes) demuxed
    Output file #0 (out-%Y%m%dT%H%M.mp3):
     Output stream #0:0 (audio): 15473 frames encoded (17824896 samples); 15474 packets muxed (5942016 bytes);
     Total: 15474 packets (5942016 bytes) muxed
    18568 frames successfully decoded, 0 decoding errors
    [AVIOContext @ 0x5613ffd86000] Statistics: 141 bytes read, 0 seeks
    Exiting normally, received signal 2.
  • How to divide a time duration in half

    30 août 2019, par Kelly Flet

    I’m trying to find the midpoint of a video, in other words divide the total length by 2. ffmpeg gives time in format HOURS:MM:SS.MICROSECONDS, so ignoring microseconds, how could I get the half way point ? I’ve tried dividing each number (hours/minutes/seconds) by 2 but this fails in the case of 0:01:00, for example.