Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (44)

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

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

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

  • How do I install ffmpeg on one EC2 Amazon Linux instance that can stream a mp4 ? [closed]

    12 septembre 2020, par starpebble

    Good day. How can I install ffmpeg on an EC2 amazon linux machine that can stream a mp4 ?

    


    The goal : an ffmpeg install on EC2 Amazon Linux that can stream one mp4 to one rtmps endpoint. Then, create an integration test suite with it.

    


    Is it just me or is ffmpeg a little crippled on EC2 Amazon Linux ?

    


    Example :

    


    ffmpeg -re -i input.mp4 -c:v libx264 -b:v 6000K -maxrate 6000K -pix_fmt yuv420p -s 1920x1080 -profile:v main -preset veryfast -g 120 -x264opts "nal-hrd=cbr:no-scenecut” -acodec aac -ab 160k -ar 44100 -f flv rtmps:///app/


    


    Linux OS :

    


    Linux version 4.14.193-113.317.amzn1.x86_64 (mockbuild@koji-pdx-corp-builder-60005) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Thu Sep 3 19:08:08 UTC 2020


    


    The stackoverflow answer to similar questions fail to install a ffmpeg that can stream.

    


    An installation script such as Install FFMPEG Library on EC2 Server fail this year.

    


    The static downloads referenced on John Van Sickle-FFmpeg Static Builds fail to stream to IVS. I tried the i686 release, my first guess for an x86_64 instance.

    


    The git source tree compiled binary fails to stream. Example : The tip of the tree isn't what I expected because the binary fails to recognize switches like -preset.

    


    I'd love to be able to explain streaming to anyone. Thanks.

    


  • PyDub : ffmpeg header missing

    7 février 2024, par Ray Siplao

    I made a simple Python program that add short pauses at the start of mp3 files

    


    import os

from pydub import AudioSegment

AUDIO_DIR = 'C:\\Users\\Ray\\Downloads\\sentence-audio'
OUT_DIR = 'C:\\Users\\Ray\\Downloads\\out-audio'

pause = AudioSegment.silent(duration=400)

for fname in os.listdir(AUDIO_DIR):
    print(f'Processing {fname}')
    newf = os.path.join(OUT_DIR, os.path.basename(fname))
    if os.path.isfile(newf):
        print(f'{fname} exists')
        continue
    audio = AudioSegment.from_mp3(os.path.join(AUDIO_DIR, fname))
    new = pause + audio
    new.export(newf, format='mp3')
    print(f'{fname} lengthened')


    


    While running this program, I received the below error message for a particular mp3 file

    


    Traceback (most recent call last):&#xA;  File "C:\Users\Ray\Downloads\lengthen.py", line 16, in <module>&#xA;    audio = AudioSegment.from_mp3(os.path.join(AUDIO_DIR, fname))&#xA;  File "C:\Python39\lib\site-packages\pydub\audio_segment.py", line 796, in from_mp3&#xA;    return cls.from_file(file, &#x27;mp3&#x27;, parameters=parameters)&#xA;  File "C:\Python39\lib\site-packages\pydub\audio_segment.py", line 773, in from_file&#xA;    raise CouldntDecodeError(&#xA;pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1&#xA;&#xA;Output from ffmpeg/avlib:&#xA;&#xA;ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 9.3.1 (GCC) 20200328&#xA;  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-libsrt --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-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf&#xA;  libavutil      56. 42.102 / 56. 42.102&#xA;  libavcodec     58. 77.101 / 58. 77.101&#xA;  libavformat    58. 42.100 / 58. 42.100&#xA;  libavdevice    58.  9.103 / 58.  9.103&#xA;  libavfilter     7. 77.101 /  7. 77.101&#xA;  libswscale      5.  6.101 /  5.  6.101&#xA;  libswresample   3.  6.100 /  3.  6.100&#xA;  libpostproc    55.  6.100 / 55.  6.100&#xA;[mp3float @ 0000016489995380] Header missing&#xA;    Last message repeated 71 times&#xA;[mp3 @ 000001648998b500] decoding for stream 0 failed&#xA;[mp3 @ 000001648998b500] Could not find codec parameters for stream 0 (Audio: mp3 (mp3float), 0 channels, fltp): unspecified frame size&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, mp3, from &#x27;C:\Users\Ray\Downloads\sentence-audio\354.mp3&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Audio: mp3, 0 channels, fltp&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))&#xA;Press [q] to stop, [?] for help&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;[mp3float @ 0000016489995800] Header missing&#xA;Error while decoding stream #0:0: Invalid data found when processing input&#xA;...&#xA;</module>

    &#xA;

    I thought at first that the mp3 file is corrupt, thus it is unplayable. But, when I played the file in a media player, it was fine.

    &#xA;

    I don't know how to resolve this issue. Is there any workarounds ?

    &#xA;

  • youtube stream from ffmpeg is buffering

    1er juin 2020, par Bartonsen

    I'm using ffmpeg running on a Raspberry Pi 3B with 1GB RAM to stream live video on youtube.&#xA;In the beginning the audio+video stream is excellent, but after some minutes I see error messages in YT studio, and video starts buffering.&#xA;After some more time (could be 30 mins or 1 hr) the youtube stream is gone, although ffmpeg is still running.

    &#xA;&#xA;

    ffmpeg is configured like this :

    &#xA;&#xA;

    ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx-rpi&#xA;

    &#xA;&#xA;

    Running ffmpeg :

    &#xA;&#xA;

    pi@raspberrypi:~ $ ffmpeg -thread_queue_size 512 -rtsp_transport udp -i "rtsp://10.x.x.x:554/user=user&amp;password=password&amp;channel=1&amp;stream=0.sdp?real_stream" -c:v copy -c:a aac -f flv rtmp://a.rtmp.youtube.com/live2/mykey&#xA;ffmpeg version git-2020-05-01-3c740f2 Copyright (c) 2000-2020 the FFmpeg developers&#xA;  built with gcc 6.3.0 (Raspbian 6.3.0-18&#x2B;rpi1&#x2B;deb9u1) 20170516&#xA;  configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx-rpi&#xA;  libavutil      56. 43.100 / 56. 43.100&#xA;  libavcodec     58. 82.100 / 58. 82.100&#xA;  libavformat    58. 42.102 / 58. 42.102&#xA;  libavdevice    58.  9.103 / 58.  9.103&#xA;  libavfilter     7. 80.100 /  7. 80.100&#xA;  libswscale      5.  6.101 /  5.  6.101&#xA;  libswresample   3.  6.100 /  3.  6.100&#xA;  libpostproc    55.  6.100 / 55.  6.100&#xA;[udp @ 0x3a8c370] attempted to set receive buffer to size 393216 but it only ended up set as 327680&#xA;[udp @ 0x3a9ea80] attempted to set receive buffer to size 393216 but it only ended up set as 327680&#xA;[udp @ 0x3a8c3e0] attempted to set receive buffer to size 393216 but it only ended up set as 327680&#xA;[udp @ 0x3abf4d0] attempted to set receive buffer to size 393216 but it only ended up set as 327680&#xA;Guessed Channel Layout for Input Stream #0.1 : mono&#xA;Input #0, rtsp, from &#x27;rtsp://10.x.x.x:554/user=user&amp;password=password&amp;channel=1&amp;stream=0.sdp?real_stream&#x27;:&#xA;  Metadata:&#xA;    title           : RTSP Session&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 20 fps, 20 tbr, 90k tbn, 180k tbc&#xA;    Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))&#xA;Press [q] to stop, [?] for help&#xA;[aac @ 0x3ae9f00] Too many bits 8832.000000 > 6144 per frame requested, clamping to max&#xA;Output #0, flv, to &#x27;rtmp://a.rtmp.youtube.com/live2/mykey&#x27;:&#xA;  Metadata:&#xA;    title           : RTSP Session&#xA;    encoder         : Lavf58.42.102&#xA;    Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 20 fps, 20 tbr, 1k tbn, 90k tbc&#xA;    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 8000 Hz, mono, fltp, 48 kb/s&#xA;    Metadata:&#xA;      encoder         : Lavc58.82.100 aac&#xA;

    &#xA;&#xA;

    In youtube studio I see this :

    &#xA;&#xA;

    19:36 Good transmission. The quality is excellent.&#xA;19:39 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.&#xA;19:39 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.&#xA;19:39 Warning: The current bit rate (1974.24 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.&#xA;19:41 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.&#xA;19:41 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.&#xA;19:41 Warning: The current bit rate (2151.41 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.&#xA;19:43 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.&#xA;19:43 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.&#xA;19:45 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.&#xA;19:45 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.&#xA;19:45 Warning: The current bit rate (1737.61 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.&#xA;...&#xA;19:54: Error: YouTube does not receive enough video to maintain consistent streaming. Viewers will therefore experience buffering.&#xA;

    &#xA;&#xA;

    What is the problem ? How can I get rid of the buffering ?&#xA;I've also tried the below two commands, but found the output to be worse...

    &#xA;&#xA;

    ffmpeg -i rtsp://... -c:v libx264  -b:v 4000k -maxrate 4000k -bufsize 8000k -g 40 -preset ultrafast -vf format=yuv420p -c:a aac -f flv output&#xA;ffmpeg -i rtsp://... -c:v h264_omx -b:v 4000k -maxrate 4000k -bufsize 8000k -g 40 -preset ultrafast -vf format=yuv420p -c:a aac -f flv output&#xA;

    &#xA;