Python Local Server

Ever felt the need to have a local server set up so that you can test your webpages or just outright share some stuff(on same wifi that is). This can be easily achieved by any computer that has python on it as it comes with its own server which can be accessed by the following command: python -m http.server 1234 Here 1234 is the port number which can be any open port of your choice. ...

September 29, 2025 · 2 min · 309 words · Me

Create GIFs using ffmpeg

Sometime you need a GIF for your README or presentations but those online convertors are very annoying filled to the brim with ads and limited options. So in order to get rid of this I tried ffmpeg to convert video files into GIFs. You must have ffmpeg installed in your device to proceed, download link here. The following command will do the trick: ffmpeg -ss [start_time] -t [duration/no_of_seconds_from_start] -i [input].[extension(.mp4)/(.mkv)] -vf "fps=10,scale=[width]:[height]:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 [output].[extension(.mp4)/(.mkv)] Summary Let me break it down for you: ...

November 15, 2024 · 2 min · 292 words · Me