Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (65)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
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 (...)
Sur d’autres sites (9107)
-
No Output when transcoding RTP to HLS with ffmpeg
9 juillet 2021, par Adnan AhmedI am running ubuntu 18.04(bionic) and i have generated a live RTP stream from kurento-media-server and i am converting it to HLS with this command of ffmpeg :


ffmpeg -protocol_whitelist file,udp,rtp -i rtp://127.0.0.1:55000 -vcodec libx264 -acodec libfdk_aac -f hls /live-stream/kurento-rtmp/hls/playlist.m3u8


However. it shows this output and doesn't do anything and stays there. Any ideas why this is happening are really appreciated.


ffmpeg version 4.3.1-0york0~18.04 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --prefix=/usr --extra-version='0york0~18.04' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libzimg --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared


 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100


I believe that at this stage ffmpeg is trying to determine the duration of input stream but since it is live it will never finish. If so, how would i flag ffmpeg that it is a live stream and not a local video.


-
Creating video thumbnail with ffmpeg from buffer
28 juillet 2021, par J. CarpenterAttempting to create a child process which spawns ffmpeg command. Should use the buffer from fs.readFile to write to stdin. The
-i -flag tells ffmpeg to source input from stdin but nothing is happening when running this code.

If replace
-i -with-i test.mp4this script works perfectly.

What is wrong with the write to stdin which is not allowing code to generate thumbnail ?


(async () => {
 const spawn = require('child_process').spawn;
 const fs = require('fs/promises');
 const buffer = await fs.readFile('test.mp4');
 await new Promise((resolve) => {
 console.log('Spawning process');
 const process = spawn('ffmpeg',
 [
 '-ss', '00:00:01',
 '-i', '-',
 '-s', '256x256',
 '-vframes', '1',
 '-f', 'image2',
 'output.png'
 ]);
 process.stdin.write(buffer);
 process.stdin.end();
 process.on('close', (done) => {
 console.log("Process closed: ", done);
 resolve();
 });
 });
})();


Edit :


Also tried this :


const ffmpeg = require('fluent-ffmpeg');
module.exports =
 async (stream) => {
 ffmpeg(stream)
 .addOption('-f','rawvideo')
 .inputFormat('mov')
 .toFormat('mp4')
 .thumbnail({
 count:1,
 size:'256x256',
 filename:'test.png',
 timemarks:["00:00:03"]
 })
 .on('stdout',(stdout)=>{
 console.log(stdout);
 })
 .on('stderr',(err)=>{
 console.log(err);
 });
 }


With this error output :


ffmpeg version N-102781-g05f9b3a0a5 Copyright (c) 2000-2021 the FFmpeg developers
 built with gcc 10-win32 (GCC) 20210408
 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
 libavutil 57. 0.100 / 57. 0.100
 libavcodec 59. 1.102 / 59. 1.102
 libavformat 59. 3.101 / 59. 3.101
 libavdevice 59. 0.100 / 59. 0.100
 libavfilter 8. 0.102 / 8. 0.102
 libswscale 6. 0.100 / 6. 0.100
 libswresample 4. 0.100 / 4. 0.100
 libpostproc 56. 0.100 / 56. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] stream 0, offset 0x24: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] Could not find codec parameters for stream 1 (Video: h264 (avc1 / 0x31637661), none(bt709), 640x360, 2630 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
 Metadata:
 major_brand : qt
 minor_version : 0
 compatible_brands: qt
 creation_time : 2021-07-25T11:06:03.000000Z
 Duration: 00:00:17.38, start: 0.000000, bitrate: N/A
 Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
 Metadata:
 creation_time : 2021-07-25T11:06:03.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1(und): Video: h264 (avc1 / 0x31637661), none(bt709), 640x360, 2630 kb/s, 29.98 fps, 29.97 tbr, 600 tbn (default) 
 Metadata:
 creation_time : 2021-07-25T11:06:03.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
 encoder : H.264
 Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
 Metadata:
 creation_time : 2021-07-25T11:06:03.000000Z
 handler_name : Core Media Metadata
 Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
 Metadata:
 creation_time : 2021-07-25T11:06:03.000000Z
 handler_name : Core Media Metadata
Stream mapping:
 Stream #0:1 (h264) -> scale
 split -> Stream #0:0 (libx264)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000025220812340] stream 1, offset 0xb1bf9: partial file
pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:1 after EOF
Error marking filters as finished
Conversion failed!

events.js:292
 throw er; // Unhandled 'error' event
 ^

Error: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input
Cannot determine format of input stream 0:1 after EOF
Error marking filters as finished
Conversion failed!


-
avcodec/mpeg12dec : Remove disabled frame-threading code
29 avril, par Andreas Rheinhardtavcodec/mpeg12dec : Remove disabled frame-threading code
The MPEG-1 decoder has an update_thread_context function set,
yet it was never enabled (missing AV_CODEC_CAP_FRAME_THREADS
flag). So remove it and also the ff_thread_finish_setup() call
as well as the progress reporting.(Simply setting the flag would not be enough. The main problems
are :
a) The update_thread_context function relies on memcpy'ing
the whole context instead of only copying the necessary fields.
This leads to data races which is undefined behaviour.
(Btw : The check for whether the non-MpegEncContext fields
of Mpeg1Context should be copied has been broken in
7f0efe232475d7a704924a3cb308281973e8add3.)
b) Even an AVBufferRef* is simply copied, without creating a new
reference.
c) Copying the whole context happens only during init ; when parameters
change lateron, the change is not propagated to the next thread.
This affects at least the quant matrix (for MPEG-1).
d) The MPEG-1/2 decoders are made to decode both MPEG-1 and MPEG-2.
When MPEG-2 is decoded, another complication arises : In case of
coded fields, both fields can be in one AVPacket or they can be
in separate AVPackets. One would need to parse enough of the data
to be able to determine whether the next thread needs to start
a new frame or decode the second field of the current frame ;
for this one would need to either postpone calling
ff_thread_finish_setup() for coded slices altogether or implement
some form of ff_h2645_packet_split().
One would also need a second ThreadProgress to signal progress
of each field.
e) One would need to reenable waiting in ff_mpv_reconstruct_mb()
for MPEG-1/2 (and H.261).
f) Probably lots of other stuff for invalid input that I am currently
not thinking about.
If this were done, nothing from the current update_thread_context
would remain, so one can just nuke it altogether.)Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>