
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (44)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP 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, parMediaSPIP 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, parLe 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 starpebbleGood 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 SiplaoI 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):
 File "C:\Users\Ray\Downloads\lengthen.py", line 16, in <module>
 audio = AudioSegment.from_mp3(os.path.join(AUDIO_DIR, fname))
 File "C:\Python39\lib\site-packages\pydub\audio_segment.py", line 796, in from_mp3
 return cls.from_file(file, 'mp3', parameters=parameters)
 File "C:\Python39\lib\site-packages\pydub\audio_segment.py", line 773, in from_file
 raise CouldntDecodeError(
pydub.exceptions.CouldntDecodeError: Decoding failed. ffmpeg returned error code: 1

Output from ffmpeg/avlib:

ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9.3.1 (GCC) 20200328
 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
 libavutil 56. 42.102 / 56. 42.102
 libavcodec 58. 77.101 / 58. 77.101
 libavformat 58. 42.100 / 58. 42.100
 libavdevice 58. 9.103 / 58. 9.103
 libavfilter 7. 77.101 / 7. 77.101
 libswscale 5. 6.101 / 5. 6.101
 libswresample 3. 6.100 / 3. 6.100
 libpostproc 55. 6.100 / 55. 6.100
[mp3float @ 0000016489995380] Header missing
 Last message repeated 71 times
[mp3 @ 000001648998b500] decoding for stream 0 failed
[mp3 @ 000001648998b500] Could not find codec parameters for stream 0 (Audio: mp3 (mp3float), 0 channels, fltp): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mp3, from 'C:\Users\Ray\Downloads\sentence-audio\354.mp3':
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0: Audio: mp3, 0 channels, fltp
Stream mapping:
 Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
[mp3float @ 0000016489995800] Header missing
Error while decoding stream #0:0: Invalid data found when processing input
...
</module>


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.


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


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



ffmpeg is configured like this :



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




Running ffmpeg :



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




In youtube studio I see this :



19:36 Good transmission. The quality is excellent.
19:39 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
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.
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.
19:41 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
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.
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.
19:43 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
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.
19:45 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
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.
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.
...
19:54: Error: YouTube does not receive enough video to maintain consistent streaming. Viewers will therefore experience buffering.




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



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