Recherche avancée

Médias (3)

Mot : - Tags -/image

Autres articles (98)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

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

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (10349)

  • ffmpeg transparent png frames to webm gets autocropped and opaque instead of showing the input frames

    26 mai 2022, par Regda

    i got a webm file that outputs transparency as black if transparency is not supported, but unpacking the webm file to png frames outputs the pngs with transparency.
I tried to repack the transparent png frames into a webm file that behaves like described above (transparent but black if not supported).

    


    The current issue (where i need help) is that it looks like ffmpeg applies some sort of optimization, which creates an area filled with an analyzed color, cropping it to the size of the opaque content/pixels and leaving the rest white.
    
And i don't want this.

    


    Related to VLC the metadata of the original says that Lavc58.65.102 libvpx-vp9 was used as encoder and that the Stream0 has the following informations :

    


    Codec: Google/On2's VP9 Video (VP90)
Language: English
Type: Video
Video resolution: 816x624
Buffer dimensions: 816x640
Frame rate: 30.000300
Decoded format: Planar 4:2:0 YUV
Orientation: Top left


    


    To reproduce the issue i created 2 transparent frames (a green and a blue cross) where the opaque content is smaller then the image size and copied them 10-times to be able to actually preview the webm file in vlc, the 2 frames do look like below :
shows the 2 different frames used for reproducing the transparency issue

    


    Then i clicked together the following ffmpeg command and executed it :
    
ffmpeg -framerate 30 -t 7.2 -i frames/%04d.png -b:v 1307k -c:v libvpx-vp9 -color_range 1 -pix_fmt yuva420p -metadata:s:v:0 alpha_mode="1" out.webm
(changing the pixel format e.g. from yuv to yuva doesn't seem to change anything)

    


    ffmpeg console output :

    


    ffmpeg version N-102605-g4c705a2775 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210408
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-version3 --disable-debug --enable-shared --disable-static --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --disable-avisynth --enable-libdav1d --disable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --disable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libvidstab --disable-libx264 --disable-libx265 --disable-libxavs2 --disable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  1.100 / 59.  1.100
  libavformat    59.  2.101 / 59.  2.101
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.101 /  8.  0.101
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
Input #0, image2, from 'frames/%04d.png':
  Duration: 00:00:00.67, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: png, rgba(pc), 816x624 [SAR 2835:2835 DAR 17:13], 30 fps, 30 tbr, 30 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 000001c97b52b000] v1.10.0
Output #0, webm, to 'out.webm':
  Metadata:
    encoder         : Lavf59.2.101
  Stream #0:0: Video: vp9, yuv420p(tv, progressive), 816x624 [SAR 1:1 DAR 17:13], q=2-31, 1307 kb/s, 30 fps, 1k tbn
    Metadata:
      alpha_mode      : 1
      encoder         : Lavc59.1.100 libvpx-vp9
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
frame=   20 fps=0.0 q=0.0 Lsize=       2kB time=00:00:00.63 bitrate=  21.5kbits/s speed=1.09x
video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 68.316833%


    


    an playback of the webm file in vlc shows something totaly different, the area of the cross is filled in its color and the rest is white where it all should be black and transparent if possible (yes i know in vlc it's not possible...) :
    
out.webm in vlc shows an block instead of the a green or blue cross

    


    It would be nice to have an ffmpeg command that does produce the expected result (webm video showing a cross on black/transparent background)

    


    PS : Related to the Title of this post : I don't know how this issue is called, so feel free to edit the Title, im out of ideas.

    


  • `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()
  • Encrypting a video file with the 3DES algorithm

    14 mai 2022, par Roro98

    I am encrypting a video file using 3DES algorithm and ffmpeg library.In my program, I use two channels, each connected to its own instance of FFmpeg. Basically, I tried to read the images one by one from the input pipe, invert the color of each pixel with the 3DES algorithm, then write the modified images to the output pipe. The input video I'm using is mp4 type, but I have a segmantation problem Can someone help me ?

    &#xA;

    #include &#xA;#include &#xA;#include &#xA;#include &#xA;#include &#xA;//#include "key.txt"&#xA;#define W 720&#xA;#define H 720&#xA;unsigned char frame[H][W][3] = {0}; &#xA;unsigned char frame0[H][W][3] = {0}; &#xA;FILE* out;&#xA;int LEFT[17][32], RIGHT[17][32];&#xA;int IPpixel[64];&#xA;int EXPpixel[48];&#xA;int XORpixel[48];&#xA;int X[8][6];&#xA;int X2[32];&#xA;int R[32];&#xA;int key56bit[56];&#xA;int key48bit[17][48];&#xA;int CIPHER[64];&#xA;int ENCRYPTED[64];&#xA;    &#xA;        int main()&#xA;        { &#xA;            int x,y,count;&#xA;            int32_t L , R ;&#xA;            FILE *pipein0 = popen("ffmpeg -i video2.mp4 -f image2pipe -vcodec rawvideo -pix_fmt rgb24 -", "r");&#xA;            out =  popen("ffmpeg -y -f rawvideo -vcodec rawvideo -pix_fmt rgb24 -s 1280x720 -r 25 -i - -f mp4 -q:v 5 -an -vcodec mpeg4 output1.mp4", "wb"); &#xA;            fclose(out);&#xA;            out = fopen("decrypted.txt", "wb&#x2B;");&#xA;            fclose(out);&#xA;            out = fopen("cipher.txt", "wb&#x2B;");&#xA;            fclose(out);&#xA;            create16Keys();&#xA;            while(1)&#xA;            {&#xA;             // Read a frame from the input pipe into the buffer&#xA;                count = fread(frame, 1, H*W*3, pipein0);&#xA;                if (count != H*W*3) break;&#xA;                // Process this frame&#xA;                for (y=0 ; y<h for="for"></h>///****** il faut divise la valeur de pixel et prandre le left of value and the rigth of value*************////&#xA;                        L =frame[y][x][0];///red&#xA;                         R= frame[y][x][0];&#xA;                         long int n1 = findFileSize() / 8;&#xA;                         convertCharToBit(n1);&#xA;                         encrypt(n1);&#xA;                         decrypt(n1);&#xA;                         frame[y][x][0]=L &amp; R;&#xA;                         L =frame[y][x][1];///green&#xA;                         R= frame[y][x][1];&#xA;                         long int n2 = findFileSize() / 8;&#xA;                         convertCharToBit(n2);&#xA;                         encrypt(n2);&#xA;                         decrypt(n2); &#xA;                         frame[y][x][1]=L &amp; R; &#xA;                         L =frame[y][x][2];///blue&#xA;                         R= frame[y][x][2];&#xA;                         long int n3 = findFileSize() / 8;&#xA;                         convertCharToBit(n3);&#xA;                         encrypt(n3);&#xA;                         decrypt(n3);&#xA;                         frame[y][x][2]=L &amp; R;&#xA;                         fwrite(frame0, 1, H*W*3, out);&#xA;                    }&#xA;            }&#xA;            fflush(pipein0);&#xA;            pclose(pipein0);&#xA;            fflush(out);&#xA;            pclose(out);&#xA;            return 0;&#xA;        }&#xA;

    &#xA;