
Recherche avancée
Médias (2)
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (111)
-
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 (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (15296)
-
Video parameters for best web scrolling performance [duplicate]
22 février 2018, par bivenThis question already has an answer here :
There is web application which provides next workflow. User uploads video -> backend(by using ffmpeg) transform this video for smaller size(320x240) -> web browser plays transformed video. Key feature of this application should be excellent scrolling possibility of video by progress bar. I mean that video should be scrolled as smoothly as possible (without any jumps) when user moves progress bar position back and forward.
I thought that small size of video helps to provide good scrolling possibility. But that’s incorrect. I have 2 different videos, one scrolling perfect(as I want), second has same resolotion(320x240), but it is scrolling with jumps and breaks.
By ffprobe I compared both videos and I have next results :
Video 1(good scrolling) :
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 5.100 / 58. 5.100
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'spacetestSMALL_512kb.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: mp41
creation_time : 1970-01-01T00:00:00.000000Z
title : small test video - http://www.archive.org/details/alanoakleysmalltestvideo
encoder : Lavf51.10.0
comment : license: http://www.copyright.gov/
Duration: 00:00:48.32, start: 0.000000, bitrate: 555 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 320x240, 505 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 45 kb/s (default)
Metadata:
creation_time : 1970-01-01T00:00:00.000000Z
handler_name : SoundHandlerVideo 2(bad scrolling) :
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 5.100 / 58. 5.100
libavdevice 58. 0.101 / 58. 0.101
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'e10b1c93-5325-4500-ae7c-12ccd0f617bd.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.5.100
Duration: 00:00:07.96, start: 0.000000, bitrate: 428 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x240 [SAR 4:3 DAR 16:9], 391 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 33 kb/s (default)
Metadata:
handler_name : SoundHandlerWhat is the key parameter of video which provide possibility for good scrolling in web browser ?
-
FFMpeg cannot start using Process API
8 juin 2021, par Prophet LambSo I am trying to use FFProbe to retrieve media information using the Process API, I am on Net 5 and wish to stay cross-platform compatible.
Before I started fiddling around I tried FFMpeg Core to retrieve metadata, but it works only on windows, and cannot handle multiline tags, only the last line is parsed.
So I tried to manually pipe the output to my application.
Initially I've used CliWrap to neatly pipe the output to a
StringBuilder
as I usually do in other repositories.

var output = new StringBuilder();
var args = new[] { "-i", filePath };
var pResult = await Cli.Wrap(GetFFProbeFilePath())
 .WithArguments(args)
 .WithStandardOutputPipe(PipeTarget.ToStringBuilder(output))
 .ExecuteAsync(cancellationToken);



- 

filePath
: any media file.GetFFProbeFilePath()
: scrubbs %PATH% for ffmpeg, returns "C :\ProgramData\chocolatey\bin\ffprobe.exe".cancellationToken
:None
for test-cases.








But that did not work. The output always stays empty.
So I ran the following command using non-elevated cmd :
C:\\ProgramData\\chocolatey\\bin\\ffprobe.exe -i my/lovely/file.mp3

and the console displays the output fully, with no error.

Naturally it's the fault of CliWrap cause I am perfect ; that's why I replaced it with a plain Process API call :


var output = new StringBuilder();
using (var p = new Process())
{
 p.StartInfo.FileName = "C:\\ProgramData\\chocolatey\\bin\\ffprobe.exe";
 p.StartInfo.Arguments = String.Join(' ', args);
 p.StartInfo.UseShellExecute = false;
 p.StartInfo.RedirectStandardOutput = true;
 p.Start();
 output.Append(await p.StandardOutput.ReadToEndAsync());
 await p.WaitForExitAsync(cancellationToken);
}



Still the output is empty. So instead of using a pipe that I write to the output of a file :


using var p = new Process();
p.StartInfo.FileName = "C:\\ProgramData\\chocolatey\\bin\\ffprobe.exe";
p.StartInfo.Arguments = " -i \"" + filePath + "\" 2> " + "\"C:\\temp\\metadata.log\"";
if (!p.Start())
 throw new Exception();
await p.WaitForExitAsync(cancellationToken);



- 

C:\temp\
: 777




The temporary file is not created, from that I conclude that the process has not exited successfully. Even though no exception is thrown (I tried piping the errors as well : nothing).


Then I proceed to run this command 20x and wonder why it works in ps & cmd, but not in C# :


C:\ProgramData\chocolatey\bin\ffprobe.exe -i my/lovely/file.mp3 2> "C:\temp\metadata.log"


Until I ran it using [Win]+[R], and I got a graphic glich and Windows Error Reporting instead of the process completing, the file was not created. After some experimenting I found that the same behaviour for
start
+ the command in cmd.

Why in (insert deity of preference) name is there a difference between [Win]+[R] and cmd, and why does it crash when run from C# ? How do I overcome this weird behaviour, while still being cross-platform compatible ?


This entire affair works just fine in linux by the way.


Edit :
When starting the cmd process manually, FFProbe is called correctly, but I still do not retrieve any data on the output pipeline, since
cmd.exe
doesn't write anything, and I can't pipe FFProbe.

var output = new StringBuilder();
_ = await Cli.Wrap("cmd.exe")
 .WithArguments("/C ffprobe -i \"my/lovely/file.mp3\" 2> \"C:\\temp\\metadata.log\"") 
 .WithStandardOutputPipe(PipeTarget.ToStringBuilder(output))
 .ExecuteAsync(cancellationToken);



This actually creates the
metadata.log
file, but no output since I only redirect the output ofcmd.exe
, notffprobe
.
My current thought is, that I could open aconhost
and manually pipe theffprobe
output to the console input by providing the pipeline explicitly in the command arguments which again would not work in linux the same way, that kind of defeats the purpose.

-
Random audio/video sync issue with libcamera-vid + ffmpeg on raspberry pi 3a+
8 mai, par kepperiI have been working on camera software, which will stream live fullhd video to Cloudflare Stream via RTMPS protocol. Everything is mostly working nicely, but I have occasional A/V sync issues with the streams : Stream might start with correct A/V sync and it will stay correct until the end (1-2 h stream), but sometimes the A/V sync is misaligned like 1-2 sec so, that the audio is either behind or ahead of the video stream. And it will be like that until the end of the stream, then next stream might be just fine.


I'm using libcamera-vid for the video and ffmpeg for the audio, muxing and sending all to Cloudflare. This is my command :


libcamera-vid 
 --width 1920 --height 1080 --framerate 30 --timeout 0 
 --nopreview true --inline 1 --codec h264 --verbose 0 
 --intra 90 --bitrate 4000000 --output - | 
ffmpeg 
 -use_wallclock_as_timestamps 1 -loglevel error 
 -probesize 10M -analyzeduration 5M 
 -fflags +genpts -thread_queue_size 512 -f h264 -framerate 30 -i - 
 -thread_queue_size 8192 -itsoffset 0.7 
 -f alsa -channels 1 -ar 44100 -i hw:1,0 
 -c:v copy -c:a aac -b:a 96000 -fflags +genpts -async 1 -shortest -f flv - | 
( sleep 5; ffmpeg -re -i - -c copy -f flv "rtmps://live.cloudflare.com:443/live/..."



So I can control initial A/V sync with -itsoffset and it is working, but still I encounter those random sync differences.


I have also added the second ffmpeg command with 5 sec sleep to give the first ffmpeg process enough time to align with video and audio input before sending them to Cloudflare, but this seems not helping.


I have also tried with Gstreamer, which fixed the AV issue completely, but it had weird glitches on video frames if the audio was enabled. Seemed like it tried to match the audio and video timestamps on fly and that caused warps/jumps and ghost frames on video. Audio was just fine.


Here is my Gstreamer command (which will also have the same libcamera-vid piped in via fdsrc)


GST_CLOCK_SYSTEM=1 gst-launch-1.0 -v
 fdsrc blocksize=524288 !
 h264parse config-interval=1 disable-passthrough=true !
 queue max-size-buffers=200 max-size-time=4000000000 max-size-bytes=0 !
 flvmux name=mux streamable=true latency=200 !
 queue max-size-buffers=200 max-size-time=4000000000 max-size-bytes=0 !
 rtmpsink sync=false location="rtmps://live.cloudflare.com:443/live/..."
 alsasrc device=hw:1,0 buffer-time=1000000 latency-time=200000 !
 audio/x-raw,rate=44100,channels=1,format=S16LE !
 queue leaky=downstream max-size-buffers=500 max-size-time=15000000000 max-size-bytes=0 !
 audioconvert ! audioresample ! avenc_aac bitrate=96000 ! aacparse !
 queue max-size-buffers=100 max-size-time=4000000000 max-size-bytes=0 ! mux.



With Gstreamer, I have been experimenting different sizes of buffers, but no luck getting rid of the video glitches. If I remove audio from that gst-launch-1.0 command, video is just perfect.


Hardware :


- 

- RPI 3A+ (tested also with RPI4)
- RPI HQ M12 camera module
- Cheap USB tiny mic (like this : https://www.digikey.fi/fi/products/detail/seeed-technology-co-ltd/114992002/10451894)








I have also tried MUX instead of Cloudflare Stream, both acts identically so I guess the problem is not in receiving end encoding. This is also the reason I have not yet tried to "stream" into file.


Currently I'm in a process of testing the libcamera-vid with raw yuv420 + ffmpeg but with ffmpeg encoding the video instead of just having encoded h264 from libcamera-vid. This is done with RPI4 since it has enough CPU for it.


All help is appreciated !