Recherche avancée

Médias (91)

Autres articles (43)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

Sur d’autres sites (4533)

  • FFMPEG command causing audio issues

    7 août 2018, par alan samuel

    I am converting multiple mp4 video to ts and then stitching it together.

    But this sometimes causes audio issues on my videos where the audio sounds like it was recorded with two mics at the same time causing loud sound.

    I can only reproduce it sometimes and I am still not sure why it’s doing that ? Can anyone help ?

    Here is how I am converting to ts from mp4. I have noticed that the longer the video gets, the audio gets worse and its also off by a couple of seconds.

    ffmpeg -i video1.mp4 -f lavfi -i anullsrc=channel_layout=mono:sample_rate=48000 -shortest -c copy -bsf:v h264_mp4toannexb -c:a aac video1.ts

    ffmpeg -i video2.mp4 -f lavfi -i anullsrc=channel_layout=mono:sample_rate=48000 -shortest -c copy -bsf:v h264_mp4toannexb -c:a aac video2.ts

    ffmpeg -i video3.mp4 -f lavfi -i anullsrc=channel_layout=mono:sample_rate=48000 -shortest -c copy -bsf:v h264_mp4toannexb -c:a aac video3.ts

    and then I save these paths to a txt and call my stitching command like this

    ffmpeg -f concat -safe 0 -i list.txt -c copy -bsf:a aac_adtstoasc finalvideo.mp4

    Here is the complete output of the 4 videos

    C:\Users\Alan\Desktop\videos>ffmpeg -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4
    ffmpeg version N-90433-g5b31dd1c6b Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
     libavutil      56. 12.100 / 56. 12.100
     libavcodec     58. 15.100 / 58. 15.100
     libavformat    58. 10.100 / 58. 10.100
     libavdevice    58.  2.100 / 58.  2.100
     libavfilter     7. 13.100 /  7. 13.100
     libswscale      5.  0.102 /  5.  0.102
     libswresample   3.  0.101 /  3.  0.101
     libpostproc    55.  0.100 / 55.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video1.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
     Duration: 00:00:10.80, start: 0.000000, bitrate: 1034 kb/s
       Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 879 kb/s, 4.17 fps, 4.17 tbr, 12800 tbn, 8.33 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 165 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'video2.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
     Duration: 00:00:01.62, start: 0.000000, bitrate: 3208 kb/s
       Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3203 kb/s, 16.67 fps, 16.67 tbr, 12800 tbn, 33.33 tbc (default)
       Metadata:
         handler_name    : VideoHandler
    Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'video3.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
     Duration: 00:00:05.58, start: 0.000000, bitrate: 1954 kb/s
       Stream #2:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1805 kb/s, 16.67 fps, 16.67 tbr, 12800 tbn, 33.33 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 166 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'video4.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.71.100
     Duration: 00:00:03.90, start: 0.000000, bitrate: 1746 kb/s
       Stream #3:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1744 kb/s, 16.67 fps, 16.67 tbr, 12800 tbn, 33.33 tbc (default)
       Metadata:
         handler_name    : VideoHandler
  • Receive RTSP stream within docker container

    12 août 2021, par Wayne

    I am trying to decode a camera rtsp stream using ffmpeg_libs within a ubuntu docker container. The ffmpeg debug output seems to show that it successfully negotiates the rtsp-digest authentication (ie. RTSP/1.0 200 OK), and receives an SPS (nalu 7) and PPS (nalu 8), but nothing after that. It times out, retries, etc. That doesn’t really make sense to me.

    



    The same code compiled and run locally (not in docker) works fully.

    



    Also, if I decode a file, the code works fine both locally and in docker container. So, the basic ffmpeg_lib decode is working. The difficulty is with the stream interface running in docker.

    



    Is there additional authentication through the docker interface, or maybe port access, or something ? I’m not much of a networking guy, so I’m really lost at this point.

    



    The ffmpeg logs is below, and my docker run command is :

    



    docker run -it --name VideoRx videorx:latest (also tried with -p 554)


    



    Any help will be very much appreciated.
    
Thanks,
Wayne

    



    avformat_version(): 3756900  Build: 3756900  Ident: Lavf57.83.100
avformat_open_input(): rtsp://admin:public_pwd@192.168.1.237
Probing rtsp score:100 size:0
[tcp @ 0x56263b430a20] No default whitelist set
[rtsp @ 0xaddr1] Sending:
OPTIONS rtsp://192.168.1.237:554 RTSP/1.0

... [snipped]
Initial authentication handshake (OPTIONS, DESCRIBE, SETUP).
All success, server replies: 'RTSP/1.0 200 OK'
....

[rtsp @ 0xaddr1] Sending:
PLAY rtsp://192.168.1.237:554/ RTSP/1.0
Range: npt=0.000-
CSeq: 5
User-Agent: Lavf57.83.100
Session: 420467284
Authorization: Digest username="admin", realm="IP Camera(C1003)", nonce="129b254c8da4e0ffb530f64f79938bcd", uri="rtsp://192.168.1.237:554/", response="82c6c0f1fadea3739846866e8e50e855"

--
[rtsp @ 0xaddr1] line='RTSP/1.0 200 OK' 
[rtsp @ 0xaddr1] line='CSeq: 5'
[rtsp @ 0xaddr1] line='Session:        420467284'
[rtsp @ 0xaddr1] line='RTP-Info: url=rtsp://192.168.1.237:554/trackID=1;seq=43938;rtptime=4022155312'
[rtsp @ 0xaddr1] line='Date:  Thu, Aug 02 2018 15:53:00 GMT'
[rtsp @ 0xaddr1] line=''
avformat_open_input(): Success erc: 0
avformat_find_stream_info()
[h264 @ 0xaddr2] nal_unit_type: 7, nal_ref_idc: 3
[h264 @ 0xaddr2] nal_unit_type: 8, nal_ref_idc: 3
[rtsp @ 0xaddr1] UDP timeout, retrying with TCP 
[rtsp @ 0xaddr1] ...
... Stalls waiting for additional packets


    


  • Duration of short ogg files (Telegram Voice messages) not correct when loaded into Python

    4 août 2018, par Kromme

    I’m trying to read voice messages, sent by Telegram, using Python but for short voice clips (< 10 seconds), it doesn’t work. It shortens the duration for some reason. It looks like it has something to do with OGG codec, but I’m not really sure.

    See here’s my code, the voice clip is about six seconds, however pydub reads my 6 second voiceclip as 0.06 seconds.

    import telegram
    from pydub import AudioSegment

    AudioSegment.ffmpeg = "./dependencies/ffmpeg-20180802-c9118d4-win64-static/bin/ffmpeg"
    AudioSegment.converter = "./dependencies/ffmpeg-20180802-c9118d4-win64-static/bin/ffmpeg"


    bot = telegram.Bot(token=token)
    f = bot.get_file(file_id)
    f.download('output/voiceclips/{}.ogg'.format(file_id))

    myaudio = AudioSegment.from_ogg("output/voiceclips/{}.ogg".format(file_id))
    print('ID: {}, which is {} seconds'.format(file_id, myaudio.duration_seconds))

    >>> ID: ______, which is 0.06 seconds

    When I open the file in VLC-player, it also states that is has 0 seconds. When I try to convert it to WAV-files using FFmpeg it reads the ogg file as 6 seconds, but writes it as 0.05-second WAV file.

    ffmpeg -i infile.ogg outfile.wav
    ffmpeg version N-91549-gc9118d4d64 Copyright (c) 2000-2018 the FFmpeg developers
     built with gcc 7.3.1 (GCC) 20180722
     configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
     libavutil      56. 18.102 / 56. 18.102
     libavcodec     58. 22.100 / 58. 22.100
     libavformat    58. 17.101 / 58. 17.101
     libavdevice    58.  4.101 / 58.  4.101
     libavfilter     7. 26.100 /  7. 26.100
     libswscale      5.  2.100 /  5.  2.100
     libswresample   3.  2.100 /  3.  2.100
     libpostproc    55.  2.100 / 55.  2.100
    [ogg @ 0000020dd375ad40] 727 bytes of comment header remain
    Input #0, ogg, from 'infile.ogg':
     Duration: 00:00:06.03, start: 0.000000, bitrate: 20 kb/s
       Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
    Stream mapping:
     Stream #0:0 -> #0:0 (opus (native) -> pcm_s16le (native))
    Press [q] to stop, [?] for help
    Output #0, wav, to 'outfile.wav':
     Metadata:
       ISFT            : Lavf58.17.101
       Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s16, 768 kb/s
       Metadata:
         encoder         : Lavc58.22.100 pcm_s16le
    size=       6kB time=00:00:00.05 bitrate= 873.0kbits/s speed=4.12x
    video:0kB audio:6kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.354167%

    For larger files it does the work !