
Recherche avancée
Médias (17)
-
Matmos - Action at a Distance
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
DJ Dolores - Oslodum 2004 (includes (cc) sample of “Oslodum” by Gilberto Gil)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Danger Mouse & Jemini - What U Sittin’ On ? (starring Cee Lo and Tha Alkaholiks)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Cornelius - Wataridori 2
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Rapture - Sister Saviour (Blackstrobe Remix)
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Chuck D with Fine Arts Militia - No Meaning No
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (50)
-
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (4090)
-
Problem with FFmpeg breaking when streaming the entire screen and switching tabs
2 octobre 2024, par Ibad AhmadI'm working on a screen recording and streaming setup where the user records their entire screen and streams it to Twitch. The setup works fine initially, but when I switch tabs during recording, the stream breaks on the backend, and I get the following FFmpeg errors :


FFmpeg STDERR: [matroska,webm @ 0x7f9dcb904580] EBML header parsing failed
[in#0 @ 0x7f9dcb904380] Error opening input: Invalid data found when processing input
Error opening input file -.
Error opening input files: Invalid data found when processing input



My frontend code captures the screen and microphone and streams it via a WebSocket to the backend, where FFmpeg processes the stream. Below is my relevant frontend code :


const startRecording = async () => {
 try {
 const screenStream = await navigator.mediaDevices.getDisplayMedia({
 preferCurrentTab: true,
 systemAudio: 'include',
 surfaceSwitching: 'include',
 monitorTypeSurfaces: 'include',
 video: {
 displaySurface: 'browser',
 height: 720,
 width: 1280,
 frameRate: { ideal: 24, max: 30 },
 },
 });

 screenStream.getVideoTracks()[0].onended = () => {
 console.log('Screen sharing ended. Stopping the recorder.');
 stopRecording();
 };

 const micStream = await navigator.mediaDevices.getUserMedia({
 audio: true,
 });

 const combinedStream = new MediaStream([
 ...screenStream.getVideoTracks(),
 ...micStream.getAudioTracks(),
 ]);

 const recorder = new MediaRecorder(combinedStream, {
 mimeType: 'video/webm; codecs=vp8,opus',
 videoBitsPerSecond: 3 * 1024 * 1024,
 });

 const timeslice = 1000;

 recorder.ondataavailable = async (event) => {
 if (socket?.current?.connected && event.data.size > 0) {
 console.log('Sending chunk data:', socket.current.id);
 socket?.current.send(event.data);
 recordedChunks.current.push(event.data);
 } else if (!socket?.current?.connected) {
 handleSocketDisconnection();
 }
 };

 mediaRecorder.current = recorder;
 recorder.start(timeslice);
 setIsRecording(true);
 } catch (error) {
 console.log('Error starting screen recording:', error);
 toast.error('Failed to start screen recording: ' + error);
 }
};

const stopRecording = () => {
 if (socket?.current && mediaRecorder) {
 mediaRecorder?.current?.stop();
 socket.current.close();
 setIsRecording(false);
 downloadRecordedVideo();
 }
};




And here’s my backend code with FFmpeg settings for Twitch streaming :


const inputSettings = [
 '-f', 'webm', '-i', '-', '-v', 'error', '-analyzeduration', '1000000', '-probesize', '5000000',
];

const twitchSettings = (twitch) => {
 return [
 '-c:v', 'libx264', '-preset', 'veryfast', '-tune', 'zerolatency',
 '-g', '60', '-b:v', '2500k', '-maxrate', '3000k', '-bufsize', '8000k',
 '-r', '30', '-vf', 'tpad=stop_mode=clone:stop_duration=2',
 '-c:a', 'aac', '-ar', '44100', '-b:a', '96k',
 '-use_wallclock_as_timestamps', '1', '-async', '1',
 '-err_detect', 'ignore_err', '-reconnect', '1',
 '-reconnect_streamed', '1', '-reconnect_delay_max', '5',
 '-y', '-f', 'flv', twitch,
 ];
};




Problem : When switching tabs during screen sharing, it seems like the frame rate drops or the stream gets interrupted, leading to FFmpeg errors like
EBML header parsing failed
andInvalid data found when processing input
. I suspect this happens because the browser deprioritizes resources when the tab is not active, which might lead to corrupt chunks being sent to FFmpeg.

Questions :


- 

- Could switching tabs during screen capture be causing the issue by disrupting the frame rate or dropping frames ?
- Is there a way to ensure FFmpeg doesn’t break due to these interruptions ?
- Any suggestions on handling the stream more reliably when switching tabs or optimizing the FFmpeg setup for this scenario ?








I tried adjusting the bitrate, frame rate, and buffer size but still experienced the same issue. I'm trying to figure out if the issue is related to how browsers handle screen capture when tab switching or something specific with FFmpeg handling the video stream.


Any insights would be greatly appreciated.
Thanks in advance !


-
Configuration error when configuring the FFMPEG compilation with NVCC/CUDA [closed]
3 février, par LerennI'm trying to compile the last FFMPEG version (
49726a922fd2b358feb7753488d415180da5121c
) on Fedora 41 with some libraries, including the CUDA libraries.

Everything works well when compiling without CUDA, but I have 2 cryptic errors when trying to run the
configure
command with the NVCC :

nvcc -gencode arch=compute_60,code=sm_60 -O2 -std=c++11 -m64 -ptx -c -o /tmp/ffconf.q0uMcStN/test.o /tmp/ffconf.q0uMcStN/test.cu
 nvcc warning : Support for offline compilation for architectures prior to '<compute></compute>sm/lto>_75' will be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
 /usr/include/c++/14/type_traits(1610): error: "__is_nothrow_new_constructible" is not a function or static data member
 constexpr bool __is_nothrow_new_constructible
 ^

 /usr/include/c++/14/type_traits(1610): error: "constexpr" is not valid here
 constexpr bool __is_nothrow_new_constructible
 ^

 2 errors detected in the compilation of "/tmp/ffconf.q0uMcStN/test.cu".
 ERROR: failed checking for nvcc.



I tried compiling it with default gcc (
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
) but my NVCC version (Build cuda_12.8.r12.8/compiler.35404655_0
) seems to support only the GCC version 13.2 : https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html.

I have compiled it and ran the
configure
command again but it seems that I have the same errors.

Here is the
configure
command :

PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" \
 ./configure \
 --cc=gcc-13.2 \
 --extra-libs=-lpthread --prefix="/usr/local" \
 --extra-cflags="-I/usr/local/include -I/usr/local/cuda/include" \
 --extra-ldflags="-L/usr/local/lib -L/usr/local/cuda/lib64" \
 --pkg-config-flags="--static" --enable-gpl --enable-nonfree \
 --enable-libfdk-aac --enable-libmp3lame --enable-libopus \
 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 \
 --enable-libvidstab --enable-libaom \
 --enable-cuda-nvcc --enable-libnpp \
 --disable-static --enable-shared



If you have any idea or lead on the matter, I would be really grateful.


-
lavc/vvc : Fix derivation of inverse LMCS idx
2 février, par Frank Plowmanlavc/vvc : Fix derivation of inverse LMCS idx
The clamping of idxYInv from H.266(V3) section 8.8.2.3 was missing.
This could lead to OOB reads from lmcs->pivot or input_pivot.I also changed the derivation of the forward LMCS idx to use a shift
rather than a division for speed and as this is actually how the
variable is declared in the specification (8.7.5.2).Signed-off-by : Frank Plowman <post@frankplowman.com>