Advanced search

Medias (2)

Tag: - Tags -/documentation

Other articles (17)

  • Publier sur MédiaSpip

    13 June 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

  • Configuration spécifique pour PHP5

    4 February 2011, by

    PHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
    Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
    Modules spécifiques
    Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)

  • La sauvegarde automatique de canaux SPIP

    1 April 2010, by

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

On other websites (5658)

  • How to use ffmpeg to upscale video resolution with libplacebo?

    30 July 2023, by Ironbox

    In Vapoursynth, it is convenient to download and use plugins to change the frame rate of videos. However, it seems that using FFmpeg has more limitations (or maybe I haven't found the right method). Anime4K is a video enhancement algorithm suitable for anime and similar videos. In MPV, their plugins can be imported and used for real-time frame rate conversion.

    


    In FFmpeg, how can I use the algorithms in glsl files to change the video frame rate, instead of using FFmpeg's built-in algorithms?

    


    In FFmpeg, i can use libplacebo filters can also be used to apply GLSL shaders. In my tests, using command like:

    


    libplacebo=custom_shader_path=Anime4K_Upscale_CNN_x2_VL.glsl


    


    this leads to noticeable GPU usage, but the output video resolution remains the same as the original.

    


    I can pass in the w and h parameters when calling the libplacebo filter:

    


    libplacebo=w=iw*2:h=ih*2:custom_shader_path=shaders/Anime4K_Upscale_CNN_x2_VL.glsl


    


    This achieves the purpose of super resolution, but is it essentially using anime4k for upscaling behind the processing?
Is it using the upscaling algorithm in libplacebo first, before applying anime4k? How can I achieve my original goal that only use anime4k to upscale?
here's my full command (in python):

    


    [
    'ffmpeg -hide_banner',
    '-hwaccel', 'cuda',
    '-i', '"{input_ab_path}"',
    '-filter_complex',
    '"[0:v]libplacebo=custom_shader_path=libplacebo=custom_shader_path=shaders/Anime4K_Upscale_CNN_x2_VL.glsl,subtitles="{sub_file}":si=0[out]"',
    '-map', '0:a',
    '-map', '"[out]"',
    '-c:v', 'libsvtav1',
    '-svtav1-params', 'scm=2:scd=1:enable-overlays=1:enable-tf=0:tune=0:preset=7:crf=18',
    '-c:a', 'libvorbis',
    '-qscale:a', '10',
    '-pix_fmt', 'yuv420p10le',
    '-y', '"{output_ab_path}"'
]


    


  • FFMPEG, MPV, SVP 4 Pro : not converting as original resolution problem, yuv420p10 -> p010 [closed]

    12 August 2023, by LeeShey

    I am using SVP4 Pro(Frame rate conversion).
The SVP 4 Pro setting :
RIFE AI engine setting
encoder commands
Transcoding 4K(3840x2160) video exports 3840x2144 resolution.
I think converting yuv420p10 -> p010 causes video height loss.

    


    I did transcoding FHD video(just for test), but it worked lossless.
Problems to 4K, but not FHD??

    


    Here's the log :

    


    19:36:05.942: ===== Starting mpv ======
19:36:05.942: Command line: C:\Program Files (x86)\SVP 4\mpv64\mpv.exe D:/Candy/prob3.mov --o=D:/Candy/prob3.SVP.VO.mov --no-audio --no-sub --no-sub-auto --input-ipc-server=mpvencodepipe --input-media-keys=no --no-msg-color --vf=lavfi=[yadif=send_frame],vapoursynth:[C:\Users\????\AppData\Roaming\SVP4\scripts\ffff.py]:4:16 --ovc=hevc_nvenc --ovcopts=preset=lossless,time_base=1000/120000,threads=16
19:36:05.982: (+) Video --vid=1 (*) (prores 3840x2160 60.000fps)
19:36:05.982: Audio --aid=1 --alang=eng (*) (pcm_s16le 2ch 48000Hz)
19:36:06.277: vstrt: TensorRT version mismatch, built with 2135 but loaded with 2136; continue but fingers crossed...
19:36:06.856: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
19:36:06.930: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
19:36:07.005: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
19:36:07.079: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
19:36:09.683: [autoconvert] Converting yuv420p10 -> p010
19:36:09.693: VO: [lavc] 3840x2144 p010
19:36:09.693: [vo/lavc] Opening encoder: NVIDIA NVENC hevc encoder [hevc_nvenc]
19:36:09.695: [ffmpeg] hevc_nvenc: The selected preset is deprecated. Use p1 to p7 + -tune or fast/medium/slow.
19:36:10.130: [encode] Opening output file: D:/Candy/prob3.movprob3.SVP.VO.mov
19:36:10.131: [encode] Opening muxer: QuickTime / MOV [mov]
19:36:10.131: [ffmpeg] mov: WARNING codec timebase is very high. If duration is too long,
19:36:10.131: [ffmpeg] file may not be playable by quicktime. Specify a shorter timebase
19:36:10.131: [ffmpeg] or choose different container.
19:36:10.136: [autoconvert] Converting yuv420p10 -> p010
19:36:10.145: V: 00:00:00 / 00:00:15 (0%) {0.0min 0.0MB}
19:36:11.087: -- PAUSED --



    


  • yt-dlp how to download a specific video using timestamps, and limiting the download resolution?

    30 September 2023, by ignacM

    I am running a python program to download a video, this is the command I use:

    


    command = ['powershell.exe ffmpeg',
                   '-ss', str(start),
                   '-i', '$(yt-dlp',
                   '-f', 'bestvideo[ext=webm]',

                   '-g', '"%s")' % (url_base + video_identifier),
                   '-t', str(end - start),
                   '-c:v', 'libx264', '-c:a', 'copy', '%s' % output_filename]

command = ' '.join(command)
output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT)


    


    This prints something like
powershell.exe ffmpeg -ss 10 -i $(yt-dlp -f bestvideo[ext=webm] -g "https://www.youtube.com/watch?v=Z15erfLqNKo") -t 10 -c:v libx264 -c:a copy C:\Users...\video.mp4

    


    This works perfectly fine. However, I tried to download a video that had very high resolution (4K) and I want to limit the resolution when downloading. I have found that placing [height<=1080] as so should work:

    &#xA;

    powershell.exe ffmpeg -ss 10 -i $(yt-dlp -f bestvideo[ext=webm][height<=1080] -g "https://www.youtube.com/watch?v=Z15erfLqNKo") -t 10 -c:v libx264 -c:a copy C:\Users...\video.mp4

    &#xA;

    However this does not work for me and gives me the error:&#xA;Error command "" returned non-zero exit status 1.&#xA;Output: b'The system cannot find the file specified.\r\n'

    &#xA;

    I also have noticed that only limiting the resolution does not work for me either:

    &#xA;

    powershell.exe ffmpeg -ss 10 -i $(yt-dlp -f bestvideo[height<=1080] -g "https://www.youtube.com/watch?v=Z15erfLqNKo") -t 10 -c:v libx264 -c:a copy C:\Users...\video.mp4

    &#xA;

    Actually, placing [height<=1080] after bestvideo never works, no matter what I do.

    &#xA;

    What could be the problem? Or what command can I run to achieve both tasks (limit resolution and download specific timeframe (not whole video and cutting it)) ?

    &#xA;