Uncategorized


Increase volume in video using ffmpeg

A quick note on how to boost the audio stream in a video using the volume filter in ffmpeg

#;For newer versions of ffmpeg
ffmpeg -i input.mkv -filter:a "volume=4.0" output.mkv;
#For older versions of ffmpeg (we use multiples of 256)
ffmpeg -i input.mkv -vol 1024 -vcodec copy output.mkv;

Using the above command we were able to make the audio LOUDER!


Lenovo Legion Y520 – Black Screen After RAM Upgrade to 32GB (2x16GB)

Recently, we updated the RAM modules of a Lenovo Legion Y520 from 16GB (2x8GB) to 32GB using two HyperX Impact DDR4 16GB, 2400MHz CL14 SODIMM modules.

Right after installing the new modules, after power on the laptop it would show a black screen, the fans would work at full speed but nothing else would happen. We tried placing the old RAM back inside but with no success, the same bad behavior would occur.

Since the battery of this laptop is bolted onto the chassis we thought that we might have to give it a “hard restart” or something to get it started.

Our solution

1) We powered off the laptop by long pressing the power button. 2) Then we released the button and long pressed it again until the laptop powered on and off again.
The next time we powered on the laptop it was working perfectly again!!


Some rough notes on merging videos side by side with ffmpeg 2

ffmpeg \
-i "v1.mp4" \
-i "v2.mp4" \
-filter_complex " \
nullsrc=size=1900x950 [base]; \
[0:v] setpts=PTS-STARTPTS, scale=950x950 [left]; \
[1:v] setpts=PTS-STARTPTS, scale=950x950 [right]; \
[base][left] overlay=shortest=1 [tmp1]; \
[tmp1][right] overlay=shortest=1:x=950 \
" \
-c:v libx264 output2.mkv

ffmpeg \
-i "v1.mp4" \
-i "v2.mp4" \
-i "v3.mp4" \
-i "v4.mp4" \
-filter_complex " \
nullsrc=size=1900x1900 [base]; \
[0:v] setpts=PTS-STARTPTS, scale=950x950 [upperleft]; \
[1:v] setpts=PTS-STARTPTS, scale=950x950 [upperright]; \
[2:v] setpts=PTS-STARTPTS, scale=950x950 [lowerleft]; \
[3:v] setpts=PTS-STARTPTS, scale=950x950 [lowerright]; \
[base][upperleft] overlay=shortest=1 [tmp1]; \
[tmp1][upperright] overlay=shortest=1:x=950 [tmp2]; \
[tmp2][lowerleft] overlay=shortest=1:y=950 [tmp3]; \
[tmp3][lowerright] overlay=shortest=1:x=950:y=950 \
" \
-c:v libx264 output4.mkv

ffmpeg \
-i "video.mp4" \
-i "drones/0/video.mp4" \
-i "drones/1/video.mp4" \
-i "drones/2/video.mp4" \
-i "drones/3/video.mp4" \
-i "drones/4/video.mp4" \
-filter_complex " \
nullsrc=size=2850x1900 [base]; \
[0:v] setpts=PTS-STARTPTS, scale=950x950 [upperleft]; \
[1:v] setpts=PTS-STARTPTS, scale=950x950 [uppermiddle]; \
[2:v] setpts=PTS-STARTPTS, scale=950x950 [upperleft]; \
[3:v] setpts=PTS-STARTPTS, scale=950x950 [lowerleft]; \
[4:v] setpts=PTS-STARTPTS, scale=950x950 [lowermiddle]; \
[5:v] setpts=PTS-STARTPTS, scale=950x950 [lowerright]; \
[base][upperleft] overlay=shortest=1 [tmp1]; \
[tmp1][uppermiddle] overlay=shortest=1:x=950 [tmp2]; \
[tmp2][upperleft] overlay=shortest=1:x=1900 [tmp3]; \
[tmp3][lowerleft] overlay=shortest=1:y=950 [tmp4]; \
[tmp4][lowermiddle] overlay=shortest=1:y=950:x=950 [tmp5]; \
[tmp5][lowerright] overlay=shortest=1:y=950:x=1900 \
" \
-c:v libx264 output6.mkv