Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (111)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

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

  • Librairies et logiciels spécifiques aux médias

    10 décembre 2010, par

    Pour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
    Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...)

  • Other interesting software

    13 avril 2011, par

    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 : (...)

Sur d’autres sites (9497)

  • `sage -pip install —user ffmpeg` did not make the "`OSError : Error : ffmpeg does not appear to be installed.`" message go away

    2 septembre 2019, par SomeoneElse

    I am running a Docker instance of Cocalc on a Ubuntu 16 server. Everything seems to be working but I am trying to debug why sage -pip install --user ffmpeg did not make the "OSError: Error: ffmpeg does not appear to be installed." message go away, even though it said it had been installed. Here is the full message.

    Error in lines 9-9
    Traceback (most recent call last):
     File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1188, in execute
       flags=compile_flags) in namespace, locals
     File "", line 1, in <module>
     File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2944, in show
       s = show0(objs, combine_all=True)
     File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2903, in show0
       b = show0(a)
     File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2868, in show0
       show_animation(obj, **kwds)
     File "/usr/local/sage/local/lib/python2.7/site-packages/smc_sagews/sage_salvus.py", line 2642, in show_animation
       obj.ffmpeg(t, delay=delay, **kwds)
     File "/usr/local/sage/local/lib/python2.7/site-packages/sage/plot/animate.py", line 885, in ffmpeg
       raise OSError(msg)
    OSError: Error: ffmpeg does not appear to be installed. Saving an animation to
    a movie file in any format other than GIF requires this software, so
    please install it and try again.
    </module>

    For reference, here is the code that gives the error :

    n = var("n")
    frames = []
    xr = (x, 0, 1)
    for k in srange(1, 50):
       g = plot((sum((-1)^(n-1)*sin(n*x)/n,n,1,k)), xr, color="blue", legend_label='k = %d' % k)
       g += plot(x/2, xr, color="green", legend_label="x/2")
       frames.append(g)

    a = animate(frames, ymin=0.0, ymax=1.0, legend_loc=(0.2,0.8))
    a.show()
  • FFmpeg - Issue scaling and overlaying image

    19 juillet 2019, par HB.

    Firstly, the screen dimensions of the device I’m using is 1080 x 2280 pixels, 19:9 ratio, this is important and will be explained later in the question.


    Few months ago I asked this question. The answer provided worked perfectly :

    "-i", video.mp4, "-i", image.png, "-filter_complex", "[0:v]pad=iw:2*trunc(iw*16/9/2):(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", outFPS, output.mp4

    Shortly after I implemented and releasing this, I started getting messages from users complaining that the image that was placed on-top of the video is not at the same position after saving it.
    I noticed that in the command above the ratio for the pad is set for 16:9 ratio, in other words the above will not work on devices that has a screen ratio of 19:9.

    I then asked another question about this issue, and after a long conversation with @Gyan, the command is changed to the following :

    "-i", video.mp4, "-i", image.png, "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad='max(iw\,2*trunc(ih*9/16/2))':'max(ih\,2*trunc(ow*16/9/2))':(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", outFPS, output.mp4

    Testing on a device that has a 16:9 ratio works perfectly.


    Now testing with the device mentioned above, I replace the ratio in the command to the following (19/9/2 and 9/19/2) :

    "-i", video.mp4, "-i", image.png, "-filter_complex", "[0:v]scale=iw*sar:ih,setsar=1,pad='max(iw\,2*trunc(ih*9/19/2))':'max(ih\,2*trunc(ow*19/9/2))':(ow-iw)/2:(oh-ih)/2[v0];[1:v][v0]scale2ref[v1][v0];[v0][v1]overlay=x=(W-w)/2:y=(H-h)/2[v]", "-map", "[v]", "-map", "0:a", "-c:v", "libx264", "-preset", "ultrafast", "-r", outFPS, output.mp4

    Here is the result I get :

    I changed my players background to green to make it easier to see. The blue line is the image that I want to overlay

    Original video

    original

    After processing

    after

    Here is the issues with the above.

    • The line that was drawn on the original video is not scaled, but it is still at the correct position.
    • The video is no longer the original size, the width and hight is reduced and my players background can now be seen on the left and right of the video.

    Here is the result I’m trying to achieve :

    correct

    You will notice the following :

    • The video is not resized, it still has the same dimensions as the original.
    • The line that was drawn is still at the same position and is not scaled
    • Black padding was added to the top and bottom of the video, to fill the remaining space. The green background is no longer visible.

    Any advice to achieve the above would greatly be appreciated.

    I will be giving 300 bounty points to the user that can help me fix this.


    EDIT 1

    Here is an input video, image and the expected output as asked for in the comment section. This is using a device that has 16:9 aspect ratio and screen dimensions of 1920x1080.

    Here is another example of the expected output (I also included the input image and input video).


    EDIT 2

    I think it’s worth mentioning that the input image will always be the size/dimensions of the devices screen, so it will always have the same aspect ratio as the screen as well. The size/dimensions of input video will vary.

  • Programmatically sending bytes to ffmpeg via STDIN to create still image file

    8 octobre 2019, par Sam Marrocco

    I am attempting to use vb.net code to send individual pixel information as bytes to ffmpeg with the purpose of saving a still DPX image file. I have already successfully read DPX files and output them via STDOUT into vb.net code.

    There seem to be many examples out there of piping movie files but there are also discrepancies, such as some people using image2pipe and others using rawvideo. I am uncertain when to use one over the other. The various methods I’ve tried result in ffmpeg returned errors such as "Packet too small for DPX header" or "Error while decoding stream #0:0 : Invalid data found when processing input". As I understand it, I am not providing a header, only the raw individual pixel RGBRGBRGB.... values as a byte array.

    The arguments sent to ffmpeg via command line are :

    -f image2pipe -pix_fmt rgb24 -s 16x16 -bits_per_raw_sample 8 -c:v dpx -i - \MyPath\MyFilename.dpx

    My vb.net code is as follows :

    Dim P As New Process
    P.StartInfo.FileName = m_FFMPEGExecutable_PathFile
    P.StartInfo.Arguments = (see above arguments)
    P.StartInfo.UseShellExecute = False
    P.StartInfo.CreateNoWindow = True
    P.StartInfo.RedirectStandardInput = True
    p.Start


    'Test image: A single red, green, blue, black and white pixel followed by all black

    Dim Tiny((16 * 16) - 1) As Byte

    Tiny(0) = 255
    Tiny(1) = 0
    Tiny(2) = 0

    Tiny(3) = 0
    Tiny(4) = 255
    Tiny(5) = 0

    Tiny(6) = 0
    Tiny(7) = 0
    Tiny(8) = 255

    For i As byte = 9 To ((16x16)-1)
      Tiny(i) = 255
    Next

    'Send the rgb byte array to ffmpeg:
    P.StandardInput.BaseStream.Write(Tiny, 0, Tiny.Length)
    P.StandardInput.Flush()
    P.StandardInput.Close()

    I have tried many variations on the above ffmpeg arguments but cannot seem to avoid these errors. Any suggestions would be appreciated, including information on when to use image2pipe vs. rawvideo.