
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (111)
-
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 (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
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 (9595)
-
Performance issue in streaming desktop out of a Raspberry with FFMPEG
30 avril 2021, par skynetI'm quite a newbie in FFMPEG and I apologize in advance for any inaccuracy I may write.


My goal is to stream over UDP a Full HD (1920x1080) desktop connected to a Raspberry PI 4 - 4 GB RAM.


I made many attempts, and currently this the setup with better performance I found (I used the knowledge in https://www.willusher.io/general/2020/11/15/hw-accel-encoding-rpi4).


- 

- I installed the 64-bit Raspbian OS on the PI from this link : https://www.raspberrypi.org/forums/viewtopic.php?t=275370




This because the HW H264 encoder (h264_v4l2m2m) is faster than the 32-bit encoder h264_omx


- 

- I downloaded and installed FFMPEG 4.4, using this configuration
./configure —prefix="$HOME/ffmpeg_build" —pkg-config-flags="pkg-config —static" —extra-cflags="-I$HOME/ffmpeg_build/include" —extra-ldflags="-L$HOME/ffmpeg_build/lib" —extra-libs="-lpthread -lm" —bindir="$HOME/bin" —enable-gpl —enable-gnutls —disable-libaom —enable-libass —enable-libfdk-aac —enable-libfreetype —enable-libmp3lame —enable-libopus —enable-libvorbis —enable-libvpx —enable-libx264 —disable-libx265 —enable-nonfree —arch=aarch64 —disable-libxml2 —enable-libwebp—enable-libdrm




I used FFMPEG 4.4 because of compatibility issues with h264_v4l2m2m of the shipped FFMPEG version 4.1.4


- 

-
I use this command


ffmpeg -f x11grab -probesize 42M -s 1920x1080 -i :0.0 -c:a copy -c:v h264_v4l2m2m -num_output_buffers 32 -num_capture_buffers 16 -b:v 8M -minrate 8M -maxrate 8M -pix_fmt rgb24 -f mpegts udp ://239.255.90.60:5004 ?pkt_size=1316






The -pix_fmt rgb24 flag is needed because x11grab in 64 bit OS use BGR0 chroma subsampling... which means red and blue colours are inverted !


This is the output :


ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers 
 built with gcc 8 (Debian 8.3.0-6) 
 configuration: --prefix=/home/pi/ffmpeg_build --pkg-config-flags='pkg-config --static' --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --extra-libs='-lpthread -lm' --enable-gpl --enable-gnutls --disable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --disable-libx265 --enable-nonfree --arch=aarch64 --disable-libxml2 --enable-libwebp --enable-libdrm 
 libavutil 56. 70.100 / 56. 70.100 
 libavcodec 58.134.100 / 58.134.100 
 libavformat 58. 76.100 / 58. 76.100 
 libavdevice 58. 13.100 / 58. 13.100 
 libavfilter 7.110.100 / 7.110.100 
 libswscale 5. 9.100 / 5. 9.100 
 libswresample 3. 9.100 / 3. 9.100 
 libpostproc 55. 9.100 / 55. 9.100 
Input #0, x11grab, from ':0.0': 
 Duration: N/A, start: 1619778505.990981, bitrate: 1988667 kb/s 
 Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1920x1080, 1988667 kb/s, 29.97 fps, 56 tbr, 1000k tbn, 1000k tbc 
Stream mapping: 
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_v4l2m2m)) 
Press [q] to stop, [?] for help 
[h264_v4l2m2m @ 0x5598d14070] Using device /dev/video11 
[h264_v4l2m2m @ 0x5598d14070] driver 'bcm2835-codec' on card 'bcm2835-codec-encode' in mplane mode 
[h264_v4l2m2m @ 0x5598d14070] requesting formats: output=RGB3 capture=H264 
[h264_v4l2m2m @ 0x5598d14070] Failed to set gop size: Invalid argument 
Output #0, mpegts, to 'udp://239.255.90.60:5004?pkt_size=1316': 
 Metadata: 
 encoder : Lavf58.76.100 
 Stream #0:0: Video: h264, rgb24(pc, progressive), 1920x1080, q=2-31, 8000 kb/s, 56 fps, 90k tbn 
 Metadata: 
 encoder : Lavc58.134.100 h264_v4l2m2m 
[mpegts @ 0x5598d12c10] Non-monotonous DTS in output stream 0:0; previous: 0, current: 0; changing to 1. This may result in incorrect timestamps in the output file. 
frame= 799 fps= 16 q=-0.0 size= 16180kB time=00:00:49.19 bitrate=2694.2kbits/s speed= 1x 



As you can see my issue is that the fps value is about 15 when streaming an HD video with VLC in full-screen mode (the fps value depends on what is displayed on screen, which I find odd being the encoding process should be done in HW).


So the question is : any hope I can get close to 25 fps, so to have a smooth display on the receiver ? Either using a better FFMPEG command or tweaking the Raspberry ?


Thanks for any help !


-
ffmpeg : segmenting webcam video output on windows (dshow)
2 mai 2021, par Arthur Hebert-RyanI want to do exactly what is described in the post linked below, except on Windows using
dshow
instead ofv4l2
:

FFMPEG : Create contiguous videos from webcam


My attempts all result in a single output file as though the segment options are being ignored. Here is my most basic command to try to get a series of 30s video files from my webcam :


ffmpeg -f dshow -video_pin_name 1 -i video="USB Camera" -copyinkf -vcodec copy -f segment -segment_time 30 video_segment_%03d.mp4



Command output :


D:\videos>ffmpeg -f dshow -video_pin_name 1 -i video="USB Camera" -copyinkf -vcodec copy -f segment -segment_time 30 video_segment_%03d.mp4
ffmpeg version 4.3.2-2021-02-27-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
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
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, dshow, from 'video=USB Camera':
Duration: N/A, start: 869580.415000, bitrate: N/A
 Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 1920x1080, 30 fps, 30 tbr, 10000k tbn, 20000k tbc
[segment @ 000001e814655640] Opening 'video_segment_000.mp4' for writing
Output #0, segment, to 'video_segment_%03d.mp4':
Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 1920x1080, q=2-31, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 171 fps= 34 q=-1.0 size=N/A time=00:00:05.26 bitrate=N/A speed=1.04x



I've tried :


- 

- using
ssegment
instead ofsegment
- different output containers (.mp4, .h264, .avi, .mkv)
- adding
-map 0
and-an
options - verifying that I'm getting keyframes from the output every second using the
ffprobe
command described here - adding
-g 60












But I get only one output file, which grows indefinitely. How do I capture from my webcam continuously into files of equal duration ?


Here is a log of the same command using the
-report
option during 2+ minutes of capture (the log too big to paste into SO).

- using
-
Image generated by System.Drawing.Image is 10x larger than original file
13 mai 2021, par NinburaI've written a Powershell script that extracts one frame from a dshow capture device using FFmpeg, and then copies the output image from a file to my clipboard :


$screenshot = [System.Drawing.Image]::FromFile((Get-Item -Path $outputFilePath))
[System.Windows.Forms.Clipboard]::SetImage($screenshot)
$screenshot.Dispose()



The original file is a 1MB JPEG, but the image in my clipboard is an 11MB PNG. When I go to paste this file into something like Discord the file size is too large, unless you have Discord Nitro.


Is there any way to avoid this file size inflation while using
[System.Drawing.Image]::FromFile()
?

Here's an easy test template :


Add-Type -AssemblyName System.Drawing
Add-Type -AssemblyName System.Windows.Forms

$screenshot = [System.Drawing.Image]::FromFile((Get-Item -Path "Path to picture"))
[System.Windows.Forms.Clipboard]::SetImage($screenshot)
$screenshot.Dispose()



Edit 2021/05/13 :


Interestingly, it's starting to seem like this is a limitation of copying an image to a clipboard. I decided to dig deeper and see if the image size was increasing when I drew the image with
System.Drawing.Image
or when I pushed it in my clipboard withSystem.Windwos.Forms.Clipboard
. If I save the image before putting it my clipboard like so, it retains the original file size, even if I change the extension to png :

Add-Type -AssemblyName System.Drawing
Add-Type -AssemblyName System.Windows.Forms

$screenshot = [System.Drawing.Image]::FromFile((Get-Item -Path "C:\Users\gabri\Pictures\FFScreenshots\2021-05-12 19-04-26.845.jpeg"))
$screenshot.Save("C:\Users\gabri\Pictures\FFScreenshots\test.jpeg") # test.png makes no difference
$screenshot.Dispose()



So it would seem that the image grows exponentially in size specifically when I push it to my clipboard. I verified this by simply uploading an image to Discord, copying it to my clipboard (click image > Open original > right click and copy result), and uploading it again. Sure enough, the new image pasted from my clipboard was around 10x the size of the original image (1MB vs 12MB). I wondered if this was a "limitation" of Windows so I ran the same test on Ubuntu 20.04. Uploaded an image to Discord, copied the image to my clipboard, and uploaded it again. Once again the image was about 10x larger, though slightly smaller than then when I uploaded the image from my clipboard on my Windows machine (11.4MB VS 12MB). Just to make sure this wasn't limited to Discord, I ran the same test with Gmail in-browser on both operating systems, same result.


Alas, there appears to be something happening when you copy an image to a clipboard that drastically increases file size. One thing's for sure, whatever's happening is definitely over my head.