Recherche avancée

Médias (0)

Mot : - Tags -/objet éditorial

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

Autres articles (99)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

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

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

  • 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