Recherche avancée

Médias (91)

Autres articles (98)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Submit enhancements and plugins

    13 avril 2011

    If you have developed a new extension to add one or more useful features to MediaSPIP, let us know and its integration into the core MedisSPIP functionality will be considered.
    You can use the development discussion list to request for help with creating a plugin. As MediaSPIP is based on SPIP - or you can use the SPIP discussion list SPIP-Zone.

Sur d’autres sites (12361)

  • lavfi/mp : try to pass interlaced & tff flags

    22 mai 2013, par Paul B Mahol
    lavfi/mp : try to pass interlaced & tff flags
    

    This makes mp=softpulldown actually useful.

    Signed-off-by : Paul B Mahol <onemda@gmail.com>

    • [DH] libavfilter/vf_mp.c
  • Revision 9f53661e8b : Merge "Fix another crash in vpxenc with —pass=1 and —test-decode." into experi

    9 novembre 2012, par Ronald S. Bultje

    Merge "Fix another crash in vpxenc with —pass=1 and —test-decode." into experimental

  • How to pass BGR NumPy arrays directly to FFMPEG with CUDA support

    4 juillet 2022, par Ξένη Γήινος

    I am using cv2 to edit images and create a video from the frames with FFMPEG. See this post for more details.

    &#xA;

    The images are 3D RGB NumPy arrays (shape is like [h, w, 3]), they are stored in a Python list.

    &#xA;

    Yep, I know cv2 has a VideoWriter and I have used it before, but it is very inadequate to meet my needs.

    &#xA;

    Simply put, it can only use an FFMPEG version that comes with it, that version does not support CUDA and uses up all CPU time when generating the videos while not using any GPU time at all, the output is way too big and I can't pass many FFMPEG parameters to the VideoWrite initiation.

    &#xA;

    I downloaded precompiled binaries of FFMPEG for Windows with CUDA support here, I am using Windows 10 21H1 x64, and my GPU is NVIDIA Geforce GTX 1050 Ti.

    &#xA;

    Anyways I need to mess with all the parameters found here and there to find the best compromise between quality and compression, like this :

    &#xA;

    command = &#x27;{} -y -stream_loop {} -framerate {} -hwaccel cuda -hwaccel_output_format cuda -i {}/{}_%d.png -c:v hevc_nvenc -preset 18 -tune 1 -rc vbr -cq {} -multipass 2 -b:v {} -vf scale={}:{} {}&#x27;&#xA;os.system(command.format(FFMPEG, loops-1, fps, tmp_folder, file_name, quality, bitrate, frame_width, frame_height, outfile))&#xA;

    &#xA;

    I need to use exactly the binary I downloaded and specify as many parameters as I can to achieve the optimal result.

    &#xA;

    Currently I can only save the arrays to a disk as images and use the images as input of FFMPEG, and that is slow but I need exactly that binary and all those parameters.

    &#xA;

    After hours of Google searching I found ffmpeg-python, which seems perfect for the job, and I even found this  : I can pass the binary path as an argument to the run function, this

    &#xA;

    import ffmpeg&#xA;import io&#xA;&#xA;&#xA;def vidwrite(fn, images, framerate=60, vcodec=&#x27;libx264&#x27;):&#xA;    if not isinstance(images, np.ndarray):&#xA;        images = np.asarray(images)&#xA;    _,height,width,channels = images.shape&#xA;    process = (&#xA;        ffmpeg&#xA;            .input(&#x27;pipe:&#x27;, format=&#x27;rawvideo&#x27;, pix_fmt=&#x27;rgb24&#x27;, s=&#x27;{}x{}&#x27;.format(width, height), r=framerate)&#xA;            .output(fn, pix_fmt=&#x27;yuv420p&#x27;, vcodec=vcodec, r=framerate)&#xA;            .overwrite_output()&#xA;            .run_async(pipe_stdin=True, overwrite_output=True, pipe_stderr=True)&#xA;    )&#xA;    for frame in images:&#xA;        try:&#xA;            process.stdin.write(&#xA;                frame.astype(np.uint8).tobytes()&#xA;            )&#xA;        except Exception as e: # should probably be an exception related to process.stdin.write&#xA;            for line in io.TextIOWrapper(process.stderr, encoding="utf-8"): # I didn&#x27;t know how to get the stderr from the process, but this worked for me&#xA;                print(line) # &lt;-- print all the lines in the processes stderr after it has errored&#xA;            process.stdin.close()&#xA;            process.wait()&#xA;            return # cant run anymore so end the for loop and the function execution&#xA;

    &#xA;

    However I need to pass all those parameters and possibly many more to the process and I am not sure where these parameters should be passed to (where should stream_loop go ? What about hwaccel, hwaccel_output_format, multipass...?).

    &#xA;

    How do I properly pipeline a bunch of NumPy arrays to an FFMPEG process spawned by an binary that supports CUDA and pass all sorts of arguments to the initialization of that process ?

    &#xA;