VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    Jun 2020
    Location
    Belgrade
    Search PM
    Hi all. This is the problem. I have 890Gb of mp4 files (from DAHUA surveillance) and i need img files so i can build time laps. If i try to convert it it will gona take a long time, i just need to use ffmpeg on Windows10, so i can extract every 10 min in one img, and i need it to do it in a batch for all files in directory, around 160 files, each about 1.4 Gb. I just found out about ffmpeg, i try googleing out but with no luck, I found the code that extract images but no luck with batch, also i saw -Ultra fast command, if you can get thin in i would be so thankful.
    Quote Quote  
  2. Originally Posted by widuljewic View Post
    I found the code that extract images but no luck with batch
    To batch process it use:
    Code:
    for %%F in (*.mp4) do (put your ffmpeg command line here between the open and close parenthesis)
    In the ffmpeg command line replace the input file spec with "%%F" and the output file spec with "%%~dpnF.output.mp4" or some suitable output name.

    For example, if your files are 25 fps:

    Code:
    for %%F in (*.mp4) do (ffmpeg -y -i "%%F" -r 0.1 -pix_fmt yuvj420p "%%~dpnF.%%5d.jpg")
    will produce a jpg image for every 10 seconds. The jpg images will have a 5 digit number added to the base file name. So Video1.mp4 will become Video1.00000.jpg, video1.00001.jpg, etc.
    Last edited by jagabo; 8th Jun 2020 at 09:03.
    Quote Quote  
  3. Member
    Join Date
    Jun 2020
    Location
    Belgrade
    Search PM
    jagabo i am soo thankful you help me out .. just one more thing if you can help me. What is command to extract every 10 minutes form video file to 1 image? Thanks
    Quote Quote  
  4. 10 minutes is 600 seconds. 1/600 = 0.001667. So replace the "-r 0.1" with "-r 0.001667". Though when I tried it the images weren't evenly spaced at the start. The first image was at 00:00:00.000, the second at 00:00:00.041, then 00:08:59.997, 00:18.59.972, 00:28:59.988, etc.
    Quote Quote  
  5. Member
    Join Date
    Jun 2020
    Location
    Belgrade
    Search PM
    jagabo you are my life saver everything works! Is it too much of me if i just ask you how to put all this images in folder names "Output". Thank you so much for all help!
    Quote Quote  
  6. For a subfolder called Output in the folder with the mp4 files:

    Code:
    REM create the folder if it doesn't already exist
    md Output
    for %%F in (*.mp4) do (ffmpeg -y -i "%%F" -r 0.1 -pix_fmt yuvj420p "Output\%%~nF.%%5d.jpg")
    Quote Quote  



Similar Threads