
Recherche avancée
Autres articles (107)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (8424)
-
lavc/libaribcaption : add MSZ character related options
17 octobre 2023, par TADANO Tokumeilavc/libaribcaption : add MSZ character related options
This patch adds two MSZ (Middle Size ; half width) character
related options, mapping against newly added upstream
functionality :* `replace_msz_japanese`, which was introduced in version 1.0.1
of libaribcaption.
* `replace_msz_glyph`, which was introduced in version 1.1.0
of libaribcaption.The latter option improves bitmap type rendering if specified
fonts contain half-width glyphs (e.g., BIZ UDGothic), even
if both ASCII and Japanese MSZ replacement options are set
to false.As these options require newer versions of libaribcaption, the
configure requirement has been bumped accordingly.Signed-off-by : TADANO Tokumei <aimingoff@pc.nifty.jp>
-
avcodec/h264dec : Use RefStruct-pool API instead of AVBufferPool API
5 août 2022, par Andreas Rheinhardtavcodec/h264dec : Use RefStruct-pool API instead of AVBufferPool API
It involves less allocations and therefore has the nice property
that deriving a reference from a reference can't fail.
This allows for considerable simplifications in
ff_h264_(ref|replace)_picture().
Switching to the RefStruct API also allows to make H264Picture
smaller, because some AVBufferRef* pointers could be removed
without replacement.Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-
Transcode webcam blob to RTMP using ffmpeg.wasm
29 novembre 2023, par hassan moradnezhadI'm trying transcode webcam blob data to a rtmp server from browser by using ffmpeg.wasm .

first, i create a MediaStream.

const stream = await navigator.mediaDevices.getUserMedia({
 video: true,
 });



then, i create a MediaRecorder.


const recorder = new MediaRecorder(stream, {mimeType: "video/webm; codecs:vp9"});
 recorder.ondataavailable = handleDataAvailable;
 recorder.start(0)



when data is available, i call a function called
handleDataAvailable
.

here is the function.

const handleDataAvailable = (event: BlobEvent) => {
 console.log("data-available");
 if (event.data.size > 0) {
 recordedChunksRef.current.push(event.data);
 transcode(event.data)
 }
 };



in above code, i use another function which called
transcode
it's goal is going to send data to rtmp server using useffmpeg.wasm
.

here it is.

const transcode = async (inputVideo: Blob | undefined) => {
 const ffmpeg = ffmpegRef.current;
 const fetchFileOutput = await fetchFile(inputVideo)
 ffmpeg?.writeFile('input.webm', fetchFileOutput)

 const data = await ffmpeg?.readFile('input.webm');
 if (videoRef.current) {
 videoRef.current.src =
 URL.createObjectURL(new Blob([(data as any)?.buffer], {type: 'video/webm'}));
 }

 // execute by node-media-server config 1
 await ffmpeg?.exec(['-re', '-i', 'input.webm', '-c', 'copy', '-f', 'flv', "rtmp://localhost:1935/live/ttt"])

 // execute by node-media-server config 2
 // await ffmpeg?.exec(['-re', '-i', 'input.webm', '-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency', '-c:a', 'aac', '-ar', '44100', '-f', 'flv', 'rtmp://localhost:1935/live/ttt']);

 // execute by stack-over-flow config 1
 // await ffmpeg?.exec(['-re', '-i', 'input.webm', '-c:v', 'h264', '-c:a', 'aac', '-f', 'flv', "rtmp://localhost:1935/live/ttt"]);

 // execute by stack-over-flow config 2
 // await ffmpeg?.exec(['-i', 'input.webm', '-c:v', 'libx264', '-flags:v', '+global_header', '-c:a', 'aac', '-ac', '2', '-f', 'flv', "rtmp://localhost:1935/live/ttt"]);

 // execute by stack-over-flow config 3
 // await ffmpeg?.exec(['-i', 'input.webm', '-acodec', 'aac', '-ac', '2', '-strict', 'experimental', '-ab', '160k', '-vcodec', 'libx264', '-preset', 'slow', '-profile:v', 'baseline', '-level', '30', '-maxrate', '10000000', '-bufsize', '10000000', '-b', '1000k', '-f', 'flv', 'rtmp://localhost:1935/live/ttt']);

 }



after running app and start streaming, console logs are as below.


ffmpeg >>> ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers index.tsx:81:20
ffmpeg >>> built with emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784) index.tsx:81:20
ffmpeg >>> configuration: --target-os=none --arch=x86_32 --enable-cross-compile --disable-asm --disable-stripping --disable-programs --disable-doc --disable-debug --disable-runtime-cpudetect --disable-autodetect --nm=emnm --ar=emar --ranlib=emranlib --cc=emcc --cxx=em++ --objcc=emcc --dep-cc=emcc --extra-cflags='-I/opt/include -O3 -msimd128' --extra-cxxflags='-I/opt/include -O3 -msimd128' --disable-pthreads --disable-w32threads --disable-os2threads --enable-gpl --enable-libx264 --enable-libx265 --enable-libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libopus --enable-zlib --enable-libwebp --enable-libfreetype --enable-libfribidi --enable-libass --enable-libzimg index.tsx:81:20
ffmpeg >>> libavutil 57. 28.100 / 57. 28.100 index.tsx:81:20
ffmpeg >>> libavcodec 59. 37.100 / 59. 37.100 index.tsx:81:20
ffmpeg >>> libavformat 59. 27.100 / 59. 27.100 index.tsx:81:20
ffmpeg >>> libavdevice 59. 7.100 / 59. 7.100 index.tsx:81:20
ffmpeg >>> libavfilter 8. 44.100 / 8. 44.100 index.tsx:81:20
ffmpeg >>> libswscale 6. 7.100 / 6. 7.100 index.tsx:81:20
ffmpeg >>> libswresample 4. 7.100 / 4. 7.100 index.tsx:81:20
ffmpeg >>> libpostproc 56. 6.100 / 56. 6.100 index.tsx:81:20
ffmpeg >>> Input #0, matroska,webm, from 'input.webm': index.tsx:81:20
ffmpeg >>> Metadata: index.tsx:81:20
ffmpeg >>> encoder : QTmuxingAppLibWebM-0.0.1 index.tsx:81:20
ffmpeg >>> Duration: N/A, start: 0.000000, bitrate: N/A index.tsx:81:20
ffmpeg >>> Stream #0:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 15.50 tbr, 1k tbn (default)



the problem is when
ffmpeg.wasm
try to execute the last command.

await ffmpeg?.exec(['-re', '-i', 'input.webm', '-c', 'copy', '-f', 'flv', "rtmp://localhost:1935/live/ttt"])
.

it just calls aGET Request
, I will send further details about this request.

as u can see, i try to use lots of arg sample withffmpeg?.exec
, but non of them works.

the network tab in browser, after
ffmpeg.wasm
execute the command is as below.



it send a
GET request
tows://localhost:1935/

and nothing happened after that.

for backend, i use node-media-server and here is my output logs when
ffmpeg.wasm
trying to execute the args

11/28/2023 19:33:18 55301 [INFO] [rtmp disconnect] id=JL569YOF
[NodeEvent on doneConnect] id=JL569YOF args=undefined



at last here are my ques




- 

- how can i achive this option ?
- is it possible to share webcam to rtmp server ?