PHP – convert parameter to boolean
In short, here is the snippet converting parameter from POST/GET to boolean: if (isset($_GET['debug'])) { $DEBUG = filter_var($_GET['debug'], FILTER_VALIDATE_BOOLEAN); }
In short, here is the snippet converting parameter from POST/GET to boolean: if (isset($_GET['debug'])) { $DEBUG = filter_var($_GET['debug'], FILTER_VALIDATE_BOOLEAN); }
Here is the batch script: @echo off for %%i in (*.mp4) do ( ffmpeg.exe -i "%%i" "%%i".gif move "%%i".gif gif move "%%i" mp4 )
ffmpeg -i input.mkv -c:v libx265 -crf 23 output.mkv If selecting video and audio is important for us, then we call first the code below to find out on what…
for %%f in (*.m4a) do ( Â ffmpeg -i "%%f" -acodec libmp3lame -ab 320k "%%f.mp3" )
for %%f in (*.m4a) do ( ffmpeg -loop 1 -i bear.jpg -i "%%f" -c:a aac -c:v libx264 -crf 0 -preset veryfast -shortest "video-%%f.mp4" )
This command converts video to video with hardcoded subtitles with forced font size 30 with color yellow ffmpeg -i video.mp4 -vf "subtitles=subtitle.srt:force_style='Fontsize=30,PrimaryColour=&H00ffff&'" "output.mp4" And this command converts only sample from…
This method will help in comparing two dates by trimming date format to our specific format. So we avoid unnecessary data. Sample: We compare two months in different years. First…
Here is simple script in bash to covert epub to mobi. #!/bin/bash clear; for entry in *.epub; do ebook-convert "$entry" "$entry.mobi" done
Here is very interesting post I have found on stackoverflow. I though it is worth to repost here. Android uses Hex ARGB values, which are formatted as #AARRGGBB. That first…