Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (7370)

  • Getting RTSP/1.0 404 Not Found after ANNOUNCE message

    21 décembre 2019, par Joseph Matan

    I’m trying to stream a video with FFmpeg to Gstreamer-RTSP-Server (it’s actually a docker that runs the Gstreamer-RTSP-Server).
    The OPTION message gets a "RTSP/1.0 200 OK" response. However, the ANNOUNCE message gets "RTSP/1.0 404 Not Found" response.

    This the FFmpeg command (which works OK with a different RTSP-Server) :

    ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -intra -an -f rtsp -rtsp_transport tcp rtsp://192.168.1.10:8554/test

    This is the messages sequence snapshot from Wireshark :

    OPTIONS rtsp://192.168.1.10:8554/test RTSP/1.0
    CSeq: 1
    User-Agent: Lavf58.20.100

    RTSP/1.0 200 OK
    CSeq: 1
    Public: OPTIONS, DESCRIBE, ANNOUNCE, GET_PARAMETER, PAUSE, PLAY, RECORD, SETUP, SET_PARAMETER, TEARDOWN
    Server: GStreamer RTSP server
    Date: Sat, 21 Dec 2019 18:23:03 GMT

    ANNOUNCE rtsp://192.168.1.10:8554/test RTSP/1.0
    Content-Type: application/sdp
    CSeq: 2
    User-Agent: Lavf58.20.100
    Content-Length: 287

    v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=No Name
    c=IN IP4 192.168.1.10
    t=0 0
    a=tool:libavformat 58.20.100
    m=video 0 RTP/AVP 96
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z3oQHry4FAe0IAAAAwAgAAAHgIA=,aO4PLIs=; profile-level-id=7A101E
    a=control:streamid=0
    RTSP/1.0 404 Not Found
    CSeq: 2
    Server: GStreamer RTSP server
    Date: Sat, 21 Dec 2019 18:23:03 GMT

    Any idea why the ANNOUNCE message fails ?

    The Gstreamer-RTSP-Server is part of a docker, and I guess it runs with a default Gstreamer pipeline parameters - maybe that’s can cause the issue ?

  • pydub not encoding file correctly

    21 décembre 2019, par geoffr98

    I’m trying to use pydub to take an audio stream in opus format and save it as a wav. I am currently using a file instead of a stream and it is not working.

    My code :

    myfile = open("Short_Test.opus", 'rb')
    opus_audio_bytes = myfile.read()
    myfile.close()
    opus_data = BytesIO(opus_audio_bytes)
    sound = AudioSegment.from_file(opus_data, codec="ogg")
    print("Export now")
    mywave_file = sound.export("mashup.wav","16k")

    It does create mashup.wav, however it is not created correctly. Here is the log output from pydub :

    subprocess.call(['ffmpeg', '-y', '-i', '-', '-acodec', 'pcm_s32le', '-vn', '-f', 'wav', '-'])

    Export now

    subprocess.call(['ffmpeg', '-y', '-f', 'wav', '-i', 'C:\\Users\\Geoff\\AppData\\Local\\Temp\\tmppjaomlf6', '-f', '16k', 'C:\\Users\\Geoff\\AppData\\Local\\Temp\\tmp3tserc9q'])
    subprocess output: b'ffmpeg version git-2019-12-19-99f505d Copyright (c) 2000-2019 the FFmpeg developers'
    subprocess output: b'  built with gcc 9.2.1 (GCC) 20191125'
    subprocess output: b'  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf'
    subprocess output: b'  libavutil      56. 36.101 / 56. 36.101'
    subprocess output: b'  libavcodec     58. 65.100 / 58. 65.100'
    subprocess output: b'  libavformat    58. 35.101 / 58. 35.101'
    subprocess output: b'  libavdevice    58.  9.101 / 58.  9.101'
    subprocess output: b'  libavfilter     7. 69.101 /  7. 69.101'
    subprocess output: b'  libswscale      5.  6.100 /  5.  6.100'
    subprocess output: b'  libswresample   3.  6.100 /  3.  6.100'
    subprocess output: b'  libpostproc    55.  6.100 / 55.  6.100'
    subprocess output: b'Guessed Channel Layout for Input Stream #0.0 : mono'
    subprocess output: b"Input #0, wav, from 'C:\\Users\\Geoff\\AppData\\Local\\Temp\\tmppjaomlf6':"
    subprocess output: b'  Duration: 00:00:06.90, bitrate: 1536 kb/s'
    subprocess output: b'    Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32, 1536 kb/s'
    subprocess output: b"[NULL @ 0000021fd2900580] Requested output format '16k' is not a suitable output format"
    subprocess output: b'C:\\Users\\Geoff\\AppData\\Local\\Temp\\tmp3tserc9q: Invalid argument'
    Traceback (most recent call last):
     File "C:/Users/Geoff/Documents/Geoff-Microsemi(Other)/Smart-OR/Savant_V1/Cobalt/G_opus_Cobalt.py", line 176, in <module>
       mywave_file = sound.export("mashup.wav","16k")
     File "C:\Users\Geoff\AppData\Local\Programs\Python\Python37\lib\site-packages\pydub\audio_segment.py", line 877, in export
       p.returncode, conversion_command, p_err))
    pydub.exceptions.CouldntEncodeError: Encoding failed. ffmpeg/avlib returned error code: 1
    </module>

    Command :[’ffmpeg’, ’-y’, ’-f’, ’wav’, ’-i’, ’C :\Users\Geoff\AppData\Local\Temp\tmppjaomlf6’, ’-f’, ’16k’, ’C :\Users\Geoff\AppData\Local\Temp\tmp3tserc9q’]

    Output from ffmpeg/avlib :

    b"ffmpeg version git-2019-12-19-99f505d Copyright (c) 2000-2019 the FFmpeg developers\r\n  built with gcc 9.2.1 (GCC) 20191125\r\n  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --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-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf\r\n  libavutil      56. 36.101 / 56. 36.101\r\n  libavcodec     58. 65.100 / 58. 65.100\r\n  libavformat    58. 35.101 / 58. 35.101\r\n  libavdevice    58.  9.101 / 58.  9.101\r\n  libavfilter     7. 69.101 /  7. 69.101\r\n  libswscale      5.  6.100 /  5.  6.100\r\n  libswresample   3.  6.100 /  3.  6.100\r\n  libpostproc    55.  6.100 / 55.  6.100\r\nGuessed Channel Layout for Input Stream #0.0 : mono\r\nInput #0, wav, from 'C:\\Users\\Geoff\\AppData\\Local\\Temp\\tmppjaomlf6':\r\n  Duration: 00:00:06.90, bitrate: 1536 kb/s\r\n    Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 48000 Hz, mono, s32, 1536 kb/s\r\n[NULL @ 0000021fd2900580] Requested output format '16k' is not a suitable output format\r\nC:\\Users\\Geoff\\AppData\\Local\\Temp\\tmp3tserc9q: Invalid argument\r\n"

    I am confused as to why it isn’t working because the following ffmpeg command on the command line works, so I’m sure it’s my parametes in pyusb :

    ffmpeg -i Short_Test.opus -b:a 16000 mashup.wav

    Any ideas as to how to fix my problem ?

  • ffmpeg and libx264 videos do not play on video player

    24 décembre 2019, par Tobi

    for a few months now I encountered a problem using FFmpeg in combination with the video code h264. The video generation works fine and without any errors. I am using the following script since 2015 to build my videos from single pictures :

    #!/bin/bash                                                                    
    # ------------------------------------------------------------------------------
    #                                                                              
    # Video generator                                                              
    # Tobias Holzmann                                                              
    # Date: 18.03.15                                                                
    # Update: 24.12.2019                                                            
    # Switch back to ffmpeg from avconv                                            
    #                                                                              
    # ------------------------------------------------------------------------------

    frameRate=30                                                                    
    vcodec="h264"                                                                  
    crf=18              # Between 0-51; 23 is default. 0 = lossless                


    # ------------------------------------------------------------------------------

    ffmpeg \                                                                        
       -f image2 \                                                                
       -r $frameRate \                                                            
       -i animation.%4d.png \                                                      
       -r $frameRate \                                                            
       -crf $crf \                                                                
       -vcodec $vcodec \                                                          
       AVideo.flv                                                                  


    # ------------------------------------------------------------------------------

    Today I made it a bit more fancy and easier to use. However, the problem is, that all videos I generate with h264 do not play at all using the vlc player or the common Ubuntu video player. I get errors such as :

    shorty@animation: vlc AVideo.flv
    VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
    [000055c0e70af420] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    [NULL @ 0x7fe318c2c2a0] Invalid NAL unit size (30490 > 15039).
    [NULL @ 0x7fe318c2c2a0] missing picture in access unit with size 15733
    [h264 @ 0x7fe318c2c2a0] Invalid NAL unit size (30490 > 15039).
    [h264 @ 0x7fe318c2c2a0] Error splitting the input into NAL units.
    [00007fe324c1c420] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  430.50  Thu Sep  5 22:38:52 CDT 2019 for hardware decoding
    [h264 @ 0x7fe325428ac0] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324c1fb00] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324eb9d80] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324ed6080] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324ef2400] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324f0e780] hardware accelerator failed to decode picture
    [h264 @ 0x7fe325428ac0] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324c1fb00] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324eb9d80] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324ed6080] hardware accelerator failed to decode picture
    [h264 @ 0x7fe324ef2400] hardware accelerator failed to decode picture
    [00007fe324c1c420] main decoder error: buffer deadlock prevented
    [h264 @ 0x7fe324f0e780] hardware accelerator failed to decode picture
    ...
    ...

    I am wondering if someone does know where the problem is located. Any hint or feedback is appreciated. Thank you in advance and kind regards, Tobi.