Advanced search

Medias (1)

Tag: - Tags -/epub

Other articles (64)

  • Other interesting software

    13 April 2011, by

    We don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
    The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
    We don’t know them, we didn’t try them, but you can take a peek.
    Videopress
    Website: http://videopress.com/
    License: GNU/GPL v2
    Source code: (...)

  • Des sites réalisés avec MediaSPIP

    2 May 2011, by

    Cette 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.

  • Taille des images et des logos définissables

    9 February 2011, by

    Dans beaucoup d’endroits du site, logos et images sont redimensionnées pour correspondre aux emplacements définis par les thèmes. L’ensemble des ces tailles pouvant changer d’un thème à un autre peuvent être définies directement dans le thème et éviter ainsi à l’utilisateur de devoir les configurer manuellement après avoir changé l’apparence de son site.
    Ces tailles d’images sont également disponibles dans la configuration spécifique de MediaSPIP Core. La taille maximale du logo du site en pixels, on permet (...)

On other websites (4349)

  • ffmpeg continuous live streaming of dynamic files from directory

    4 September 2022, by user72261

    So I have been using ffmpeg to create a live stream from files stored in a folder using concat list.

    


    This works perfectly for local, static content but I have a security system in my warehouse that uploads .mp4 files to my server in the office.

    


    This system doesn't have any live stream functionality so I would like to set up a live stream myself using ffmpeg to continually read the latest files from the folder.

    


    I tried setting up a script to read all files in the directory and sort them based on the file name that is a UNIX timestamp of the date/time the video was taken. Then had the script select the latest segments after that last used segment and create a new concat list such as below

    


    file '00000.mpd'
file '00001.mp4'
file '00002.mp4'
file '00003.mp4'
file '00004.mp4'


    


    After doing some reading I found out to make it loop that file you could reference its self in the list like so

    


    file '00000.mpd'
file '00001.mp4'
file '00002.mp4'
file '00003.mp4'
file '00004.mp4'
file 'concat.txt'


    


    This seemed to work ok until I started getting the error impossible to open concat.txt. This file doesn't exist, which I can only guess is because ffmpeg is trying to open the file as its being updated by the script.

    


    Has anyone come across this before or know another way to do it?

    


  • Sending frames from memory to FFMPEG command line program .NET 6

    15 September 2021, by Alessandro Martinelli

    I'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

    


  • discord.py Heroku FFmpeg issue

    6 April 2022, by No.BoD

    hi 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:

    


      

    1. heroku/python
    2. 


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


    


    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]: