Recherche avancée

Médias (91)

Autres articles (55)

  • 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

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (7246)

  • ffmpeg with "-pattern_type glob" and variable in bash script

    20 juin 2019, par KlausPeter

    I’m trying to let ffmpeg make a video of all pictures in a directory using the -pattern_type glob switch and "/foo/bar/*.jpg". This works well, if I execute the command manually für just one directory. For example :

    ffmpeg -framerate 35 -pattern_type glob -i '/root/webcam_test/2018-07-21/*.jpg' -vf scale=1280:-1 -c -c:v libx264 -pix_fmt yuv420p /root/clips/out01_cut.mp4

    However, if I do it in a bash script and set the path via a variable, according to ffmpegs output, the variable gets substituted correctly, but ffmpeg states that

    ’/root/webcam_test/2018-07-21/*.jpg’ : No such file or directory

    The part of the script looks like this :

    for D in `find /root/webcam_test/ -type d`
    do
       [...]
       cmd="ffmpeg -framerate 35 -pattern_type glob -i '$D/*.jpg' -vf scale=1280:-1 -c -c:v libx264 -pix_fm                                 t yuv420p /root/clips/$d_cut.mp4"
       echo $cmd
    [...]
    done

    Does anyone know how to make ffmpeg do its wildcard interpretation even if the path is constructed by a script and not just try to plainly use the given path ?
    Best regards and thanks in advance

  • 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 !

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

    &#xA;&#xA;

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

    &#xA;&#xA;

    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.

    &#xA;&#xA;

    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.

    &#xA;&#xA;

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

    &#xA;&#xA;

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

    &#xA;&#xA;

    Any help will be very much appreciated.
    &#xA;Thanks,&#xA;Wayne

    &#xA;&#xA;

    avformat_version(): 3756900  Build: 3756900  Ident: Lavf57.83.100&#xA;avformat_open_input(): rtsp://admin:public_pwd@192.168.1.237&#xA;Probing rtsp score:100 size:0&#xA;[tcp @ 0x56263b430a20] No default whitelist set&#xA;[rtsp @ 0xaddr1] Sending:&#xA;OPTIONS rtsp://192.168.1.237:554 RTSP/1.0&#xA;&#xA;... [snipped]&#xA;Initial authentication handshake (OPTIONS, DESCRIBE, SETUP).&#xA;All success, server replies: &#x27;RTSP/1.0 200 OK&#x27;&#xA;....&#xA;&#xA;[rtsp @ 0xaddr1] Sending:&#xA;PLAY rtsp://192.168.1.237:554/ RTSP/1.0&#xA;Range: npt=0.000-&#xA;CSeq: 5&#xA;User-Agent: Lavf57.83.100&#xA;Session: 420467284&#xA;Authorization: Digest username="admin", realm="IP Camera(C1003)", nonce="129b254c8da4e0ffb530f64f79938bcd", uri="rtsp://192.168.1.237:554/", response="82c6c0f1fadea3739846866e8e50e855"&#xA;&#xA;--&#xA;[rtsp @ 0xaddr1] line=&#x27;RTSP/1.0 200 OK&#x27; &#xA;[rtsp @ 0xaddr1] line=&#x27;CSeq: 5&#x27;&#xA;[rtsp @ 0xaddr1] line=&#x27;Session:        420467284&#x27;&#xA;[rtsp @ 0xaddr1] line=&#x27;RTP-Info: url=rtsp://192.168.1.237:554/trackID=1;seq=43938;rtptime=4022155312&#x27;&#xA;[rtsp @ 0xaddr1] line=&#x27;Date:  Thu, Aug 02 2018 15:53:00 GMT&#x27;&#xA;[rtsp @ 0xaddr1] line=&#x27;&#x27;&#xA;avformat_open_input(): Success erc: 0&#xA;avformat_find_stream_info()&#xA;[h264 @ 0xaddr2] nal_unit_type: 7, nal_ref_idc: 3&#xA;[h264 @ 0xaddr2] nal_unit_type: 8, nal_ref_idc: 3&#xA;[rtsp @ 0xaddr1] UDP timeout, retrying with TCP &#xA;[rtsp @ 0xaddr1] ...&#xA;... Stalls waiting for additional packets&#xA;

    &#xA;