
Recherche avancée
Médias (1)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
Autres articles (8)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Le plugin : Podcasts.
14 juillet 2010, parLe problème du podcasting est à nouveau un problème révélateur de la normalisation des transports de données sur Internet.
Deux formats intéressants existent : Celui développé par Apple, très axé sur l’utilisation d’iTunes dont la SPEC est ici ; Le format "Media RSS Module" qui est plus "libre" notamment soutenu par Yahoo et le logiciel Miro ;
Types de fichiers supportés dans les flux
Le format d’Apple n’autorise que les formats suivants dans ses flux : .mp3 audio/mpeg .m4a audio/x-m4a .mp4 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (3543)
-
discord.py Heroku FFmpeg issue
6 avril 2022, par No.BoDhi I'm trying to deploy a discord bot on heroku. i'm using ffmpeg to stream music to a voice channel. i tried it local on my windows and got it working but when I deployed it on heroku, throws this exception and says nothing !


I use these buildpacks :


- 

- heroku/python
- https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git






I appreciate if someone can help

here's a sample code :

vid = pafy.new("https://www.youtube.com/watch?v=gdL7s0kw0SM")
print("Pafy Vid Created!")
audio = vid.getbestaudio()
print("Pafy Audio Created!")
try:
 // self.FFMPEG_OPTIONS = {'before_options': '-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5', 'options': '-vn'}
 self.vc[ctx.guild.id].play(FFmpegPCMAudio(Song['source'], **self.FFMPEG_OPTIONS), after=lambda _: E.set())
 print("Playing Music!!!")
except Exception as ex:
 print(ex)



and here's what I got :


2021-09-20T14:31:19.958645+00:00 app[worker.1]: Pafy Vid Created!
2021-09-20T14:31:19.958889+00:00 app[worker.1]: Pafy Audio Created!
2021-09-20T14:31:20.447278+00:00 app[worker.1]:



-
Sending frames from memory to FFMPEG command line program .NET 6
15 septembre 2021, par Alessandro MartinelliI'm trying to use the pipe to send frames generated by my program to ffmpeg command line utility without saving them on disk. Please note I was able to generate a video by first saving frames on disk as images and then having FFMPEG generate a video from such images, but that approach is worse performance-wise and implies writing more data on SSD.


I could use the help of this post, but I have FFMPEG returning an error on frame size, and I don't know how to solve it.


My code is the following :


//object storing single frame returned from camera
mv.impact.acquire.Request pRequest; 
string outputPath = ...;
List frames = new List();

[...]

// Single frame is saved into memory
MemoryStream stream = new MemoryStream();
using (RequestBitmapData data = pRequest.bitmapData) {
 data.bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp);
 // Please note that now printing data.bitmap.PixelFormat would return Format24bppRgb
}
frames.Add(stream.ToArray());

[...] 

Console.WriteLine(frames.Count + " frames collected. First one length is " + frames.First().Length);

string ffmpegArgument = "/C " + _ffmpegPath + "\\ffmpeg -y -f rawvideo -pix_fmt rgb24 -framerate 3 -video_size 728x544 -i - -c:v libx264 -preset 9 -c:a libvo_aacenc " + outputPath;

Process cmd = new Process();
cmd.StartInfo.FileName = "cmd.exe";
cmd.StartInfo.Arguments = ffmpegArgument;
cmd.StartInfo.UseShellExecute = false;
cmd.StartInfo.RedirectStandardError = false;
cmd.StartInfo.RedirectStandardInput = true;

Console.WriteLine("Executing command " + ffmpegArgument + "...");
cmd.Start();
foreach (byte[] frame in frames) {
 cmd.StandardInput.Write(frame);
}
cmd.StandardInput.Flush();
cmd.StandardInput.Close();



However, when I execute the program, I have the following output :


492 frames collected. First one length is 1188150
Executing command /C ExternalTools\FFmpeg\ffmpeg -y -f rawvideo -pix_fmt rgb24 -framerate 32 -video_size 728x544 -i - -c:v libx264 -preset ultrafast -c:a libvo_aacenc -b:a 128k "Output\TemporaryVideo\2021-09-13 18_58_58.mp4"...
ffmpeg version 2021-06-27-git-49e3a8165c-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.3.0 (Rev2, Built by MSYS2 project)

[...] (configurations)

[rawvideo @ 00000241d34feac0] Packet corrupt (stream = 0, dts = 0).
Input #0, rawvideo, from 'pipe:':
 Duration: N/A, start: 0.000000, bitrate: 304152 kb/s
 Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 728x544, 304152 kb/s, 32 tbr, 32 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
pipe:: corrupt input packet in stream 0
[rawvideo @ 00000241d3511640] Invalid buffer size, packet size 6396 < expected frame_size 1188096
Error while decoding stream #0:0: Invalid argument

[...] (cpu capabilities)

Output #0, mp4, to 'Output\TemporaryVideo\2021-09-13 18_58_58.mp4':
 Metadata:
 encoder : Lavf59.3.101
 Stream #0:0: Video: h264 (avc1 / 0x31637661), yuv444p, 728x544, q=2-31, 32 fps, 16384 tbn
 Metadata:
 encoder : Lavc59.2.100 libx264
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!



The value expected by FFMPEG seems correct (1188096 = 728 x 544 x 3), but I don't understand where FFMPEG gets that "packet size 6396" from. Furthermore, that value (6396) changes at every program execution.


I'm pretty sure frames are not corrupted since, if I save such frames on disk, the image is generated correctly.


Thank you for your time,
Alessandro


-
FFMPEG Aligning Timestamps in m3u8 Stream
16 septembre 2021, par maxwellrayI'm receiving an m3u8 stream with the following structure


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-MEDIA-SEQUENCE:1193
#EXT-X-PROGRAM-DATE-TIME:2021-09-15T22:57:30+00:00
#EXT-X-TARGETDURATION:11
#EXTINF:10.054589,
20210915220000/20210915225710.ts
#EXTINF:10.008855,
20210915220000/20210915225720.ts



Every 10 seconds, the playlist is updated with a new media file path and the oldest media path is removed. Each media file path contains a clip that is approximately 10 seconds long (i.e., over a very long time, the average length of each clip should be 10 seconds). Each media path is timestamped, rounded to 10 seconds.


I run a system where I record continuous 32-minute clips of this stream using
ffmpeg
, and I need to know the exact timestamp where I start to record and where I stop. I'm encountering a sort of race condition where ffmpeg will start recording at the beginning of the oldest clip in the playlist instead of when it actually gets kicked off. The problem is illustrated below

Clip 1: |==========|
Clip 2: |==========|
FFMPEG: |==================| <= ffmpeg is kicked off at t=3
OUTPUT: |=====================| <= but video would actually start at t=0



I'm wondering if there's a way to ensure that the clips I record actually start when ffmpeg is kicked off, not from the start of the earliest clip in the stream.


Thanks !