Drag'n'drop to compress video using ffmpeg

Written by pmd - - no comments

1. Download ffmpeg

Link to download ffmpeg: https://github.com/BtbN/FFmpeg-Builds/releases

2. Create a *.bat file

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
FOR %%A IN (%*) DO (
    ECHO %%A
    SET input=%%A
    ECHO !input!
    SET "output=!input!.compressed.mp4"
    ECHO !output!
    "C:\path\to\ffmpeg-master-latest-win64-gpl\bin\ffmpeg" -y -i !input! -vcodec h264 -acodec mp3 !output!
)
pause
RET  OTHER THING YOU COULD PUT IN THE COMMAND LINE:
RET  ----------------------------------------------
RET  TO CHANGE OUTPUT RESOLUTION =>   -s "640x360"
RET  TO KEEP ONLY SOME TIME      =>   -ss 00:01:00 -to 00:02:00

Discussion about ffmpeg command line to use: Compress mp4 using FFMPEG · GitHub

Setting a variable into a for loop (batch)

3. Create a shortcut on Desktop and drag'n'drop

It will create a new file in same path than the video you want to compress with following name: "original_file_name.extension.compressed.mp4".
You can drag'n'drop several files.

 

AutoHotkey scripts for keyboard shortcuts

Written by pmd - - no comments

How do I put my hotkeys and hotstrings into effect automatically every time I start my PC?

There are several ways to make a script (or any program) launch automatically every time you start your PC. The easiest is to place a shortcut to the script in the Startup folder:

  1. Find the script file, select it, and press Ctrl + C.
  2. Press Win + R to open the Run dialog, then enter shell:startup and click OK or Enter. This will open the Startup folder for the current user. To instead open the folder for all users, enter shell:common startup (however, in that case you must be an administrator to proceed).
  3. Right click inside the window, and click "Paste Shortcut". The shortcut to the script should now be in the Startup folder.

Source

Activate a AutoHotkey script

Double-click to run *.ahk script. It will show up in the notification area.

Script #1: Insert Date in Any Program Using Keyboard Hotkey

^!d::                                               ; CTRL + ALT + D
    KeyWait, d                                      ; wait for d to be released
    KeyWait, d, D T0.2                              ; and pressed again within 0.2 seconds
    If ErrorLevel {                                 ; if timed-out (only a single press)
        FormatTime, CurrentDateTime,, yyyy_MM_dd_
        SendInput, %CurrentDateTime%
    }
    Else {                                          ; if not timed-out (double press)
        FormatTime, CurrentDateTime,, dd/MM/yyyy
        SendInput, %CurrentDateTime%
    }
return

Press Ctrl + Alt + D and it will print a date in this format: « 2022_01_14_ »
Press Ctrl + Alt + D + D and it will print a date in this format: « 14/01/2022 »

Source + FormatTime - Syntax & Usage | AutoHotkey

Script #2: Cursor Highlighter

Source

 

Classified in : Office - Tags : none

Excel tricks

Written by pmd - - no comments

1- Generate a calendar in Excel

Here is how to generate a calendar in Excel. Using Excel 2010 in my case.

In cell B1 (by example), put a date :

01/06/2018

In cell B2 :

=IF(
MONTH(DATE(YEAR(B$1);MONTH(B$1);CELL("row";B2)-CELL("row";B$1)))=MONTH(B$1);
DATE(YEAR(B$1);MONTH(B$1);CELL("row";B2)-CELL("row";B$1));"")

Then you just have to drag-n-drop down and right (or left).

To highlight saturdays and sundays :

=IF(ISBLANK(B2)=FALSE;OR(IF(WEEKDAY(B2)=7;TRUE;FALSE);IF(WEEKDAY(B2)=1;TRUE;FALSE));FALSE)

Here is the result :<image>

2- Number of days in one month

Put a date in cell B1. Then in another cell, formula is :

=DAY(DATE(YEAR(B1);MONTH(B1)+1;0))

It will return the number of days of the month in cell B1.

Rss feed of the category