Recherche avancée

Médias (91)

Autres articles (112)

Sur d’autres sites (11316)

  • on2avc : change a comment at #endif to match actual define

    23 avril 2014, par Kostya Shishkov
    on2avc : change a comment at #endif to match actual define
    
    • [DBH] libavcodec/on2avcdata.h
  • nvenc : Make sure that enum and array index match

    24 septembre 2016, par Luca Barbato
    nvenc : Make sure that enum and array index match
    

    And use a macro to reduce the boilerplate.

    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>
    Signed-off-by : Diego Biurrun <diego@biurrun.de>
    Signed-off-by : Luca Barbato <lu_zero@gentoo.org>

    • [DBH] libavcodec/nvenc.c
  • How to modify this Windows script to do a match ?

    21 janvier 2016, par Andrei Clear

    ffmpeg can resize a video/image file .. first is input_file .. parameters .. output_file ..

    ffmpeg -i input.avi -vf scale=320:240 output.avi

    or

    ffmpeg -i 20140724_071746.mp4 -vf scale=640:-1 20140724_071746_LOW_640.mp4

    more info here : https://trac.ffmpeg.org/wiki/Scaling%20%28resizing%29%20with%20ffmpeg

    I want it to downscale all the videos on my microSD card to create space (I have originals backed-up)

    So I want it to go throw all the files in all the sub-directories overnight and resize all the files. Chances are that the script might stop or crash and I would need to run it again, or if I add new files I would want to run it again.

    So I would want it to skip processing all the files that have been processed AND their resized versions.

    In my case if a FILE_NAME.mp4 also has FILE_NAME_LOW_640.mp4 SKIP it
    AND
    if a FILE_NAME_LOW_640.mp4 has *640 SKIP it

    Here is my Windows batch script so far

    REM @echo off
    REM just save as "DOS"
    REM cd /d C:\s

    setlocal enabledelayedexpansion
    for %%j in (*.mp4) do (
    set filename=%%~nj
    echo %%j

    ffmpeg -i %%j -vf scale=640:-1 %%j_LOW_640.mp4

    REM but now I want to add the two checks to skip files that have been resized .. or if they are the resized version

    REM if not "!filename!"=="%%j_LOW_640.mp4" AND IF FILE !COINTAIN *640* THEN ffmpeg -i %%j -vf scale=640:-1 %%j_LOW_640.mp4

    )

    pause
    REM AND I would also want it to process all the sub-directories  

    In other words my questions for help are :

    1. How can I do a check for a string if it contains a string match ?

    2. How can I have my script also process all the subdirectories ?