ffmpeg Converting i.e 10GB movie into 2GB

Categories: NON ANDROID like

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 positions there is video and specific audio. ffmpeg -i input.mkv After we find out positions, we declares them (stream in 0:0 is video, stream in […]

ffmpeg add hardcoded subtitles to video

Categories: NON ANDROID like

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 120s to 300s ffmpeg -ss 120 -t 300 -i video.mp4 -vf “subtitles=subtitle.srt:force_style=’Fontsize=32,PrimaryColour=&H00ffff&'” output.mp4 And this is the default command just to add subtitles ffmpeg -i […]

Helper to compare i.e two months in different years

Categories: ANDROID like

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 date is: 2017-10-10 10:00 First we convert it to milliseconds using `SimpleDateFormat`. We want know only time for 2017-10 So after we get millisecond, we […]

Converting transparency color to hex

Categories: ANDROID like

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 pair of letters, the AA, represent the Alpha Channel. You must convert your decimal opacity values to a Hexdecimal value. Here are the steps: Alpha […]