Skip to content

Commit

Permalink
add documentation for Doom game formats and FFmpeg usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfab1 committed Jan 21, 2025
1 parent 7034d18 commit 1bbcbb7
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 4 deletions.
8 changes: 7 additions & 1 deletion docs/tech/art/games/doom.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ There are [plenty](https://doomwiki.org/wiki/Doom_on_legacy_systems) of [collect

So this is just my list of favorite things that run doom or versions of doom.

[Doom in a PDF](_doom.pdf)
## PDF

[Doom in a PDF](_doom.pdf) and the [Source](https://github.com/ading2210/doompdf)

## Word

[Doom in Word File](https://github.com/wojciech-graj/doom-docm)
16 changes: 16 additions & 0 deletions docs/tech/cloud/azure/tools/vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# VScode

The combination of [Github CoPilot](https://github.com/features/copilot) + [VScode](https://code.visualstudio.com/) + [GitHub Copilot for Azure](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azure-github-copilot) provides an interactive experience through the @azure chatbot, enabling developers to learn about Azure services, manage resources, diagnose issues, monitor costs, and utilize the Azure Developer CLI (azd).

Here are some possible use cases:

- Understanding Azure services like AI, compute, containers, databases, and security.
- Comparing services (e.g., Azure Container Apps vs. Azure Kubernetes Service).
- Fetching information on resources (e.g., URLs of web apps).
- Summarizing resource usage and answering resource-specific queries.
- Diagnosing problems with Azure services like API Management, Kubernetes, or Redis.
- Summarizing logs for applications in services like Azure Container Apps.
- Estimating and reviewing historical Azure costs.
- Identifying the most expensive resources in a subscription.
- Searching and deploying application templates.
- Receiving step-by-step deployment guidance.
83 changes: 80 additions & 3 deletions docs/tech/tools/cli/ffmpeg.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,30 @@ Change the title of input.mp4 to "My Title"
ffmpeg -i input.mp4 -map_metadata -1 -metadata title="My Title" -c:v copy -c:a copy output.mp4
```

Get a list of audio/video/subtitle encoders

``` sh
ffmpeg -hide_banner -encoders
```

Get only audio encoders

``` sh
ffmpeg -hide_banner -encoders | grep "^ A"
```

Get only video encoders

``` sh
ffmpeg -hide_banner -encoders | grep "^ V"
```

Analyze video frames, timecode and metadata

``` sh
ffmpeg -i input.mp4 -vf showinfo -f null -
```

## Download video streams

Locate the playlist file, e.g. using Chrome > F12 > Network > Filter: m3u8
Expand Down Expand Up @@ -160,6 +184,20 @@ In this example by 3.14 seconds
ffmpeg -i input.mp4 -itsoffset 3.14 -i in.mp4 -map 0:v -map 1:a -vcodec copy -acodec copy output.mp4
```

## Stream Video

### Stream local file to RTMP

The command below takes an input.mp4 file and streams it over the [RTMP protocol](https://ffmpeg.org/ffmpeg-all.html#rtmp). The -listen 1 parameter instructs FFmpeg to wait for an incoming connection. Once a client, such as ffplay, VLC, or any RTMP-compatible video player, connects, FFmpeg begins transmitting the video frames over RTMP. The -c copy parameter ensures that FFmpeg streams the video without re-encoding, preserving the original size, bitrate, and encoding.

``` sh
# RTMP server
ffmpeg -re -i input.mp4 -listen 1 -c copy -f flv rtmp://localhost/live

# RTMP client
ffplay rtmp://127.0.0.1/live
```

## Manipulate Video

### Stack Videos in a Grid
Expand Down Expand Up @@ -199,6 +237,28 @@ For a 90 degrees rotation use one of the following options:
- Example: ```ffmpeg -i input.mp4 -vf "transpose=1" output.mp4```
- 180 degrees run this command: ```ffmpeg -i input.mp4 -vf "transpose=2,transpose=2 output.mp4"```

## Draw with FFMPEG

### Generate test video color pattern

``` sh
ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 testsrc.mpg
```

### Generate Game of life

Simple version:

```sh
ffmpeg -f lavfi -i life=size=640x480:rate=30 -frames:v 300 _ffmpeg_game_of_life1.mp4
```

Using colors:

```sh
ffmpeg -f lavfi -i "life=s=960x540:mold=10:r=60:ratio=0.1:death_color=#C83232:life_color=#00ff00,scale=960:540:flags=16" -c:v libx264 -crf 41 -frames:v 1800 -r 60 -t 30 _ffmpeg_game_of_life2.mp4
```

## Video Stabilization

Requires `libvidstab` additionally to ffmpeg
Expand Down Expand Up @@ -231,6 +291,18 @@ Then use [ffmpeg](https://trac.ffmpeg.org/wiki/Slideshow) [concat](https://ffmpe
ffmpeg -f concat -i input.txt -vsync vfr -pix_fmt yuv420p output.mp4
```

Alternatively create an animated WebP with numbered PNGs:

``` sh
ffmpeg -r 1 -i /%d.png -vcodec libwebp -pix_fmt yuv420p -loop 0 -r 1 output.webp
```

Or create a looping WebP animation with numbered PNGs:

``` sh
ffmpeg -i /%d.png -vcodec libwebp -pix_fmt yuv420p -loop 0 -s 720:720 -quality 50 output.webp
```

## Resize Video

- Smaller MP4 (with sound) e.g. for Messenger: ```ffmpeg -i input.mp4 -vf "scale=-2:480" -c:v libx264 -preset slow -crf 21 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 25 -g 50 -c:a aac -b:a 160k -r:a 44100 -f mp4 output.mp4```
Expand Down Expand Up @@ -275,6 +347,14 @@ Export all video frames as images
ffmpeg -i "%1" frames/out-%03d.jpg
```

Remove GoPro TimeCode from MP4

The command `-write_tmcd 0` will ensure not to write the timecode to the output file

``` sh
ffmpeg -i input.mp4 -c:a copy -c:v copy -write_tmcd 0 output.mp4
```

### VOB preparation

To merge multiple VOB files simple run:
Expand Down Expand Up @@ -322,6 +402,3 @@ This uses `libmp3lame` with default settings. The script will convert all media
``` ps1
Get-ChildItem -file -exclude *.mp3 | Foreach-Object { ffmpeg -i ('"' + $_.Name + '"') -map_metadata -1 -acodec libmp3lame ('"' + $_.BaseName + '.mp3"') }
```

## Sort this

23 changes: 23 additions & 0 deletions docs/tech/tools/cli/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,29 @@

![xkdc-git](_xkdc-git.png)

```txt
+---------------------------------------------------------------+
| * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * |
+---------------------------------------------------------------+
\
\ ^ /^
\ / \ // \
\ |\___/| / \// .\
\ /V V \__ / // | \ \ *----*
/ / \/_/ // | \ \ \ |
@___@` \/_ // | \ \ \/\ \
0/0/| \/_ // | \ \ \ \
0/0/0/0/| \/// | \ \ | |
0/0/0/0/0/_|_ / ( // | \ _\ | /
0/0/0/0/0/0/`/,_ _ _/ ) ; -. | _ _\.-~ / /
,-} _ *-.|.-~-. .~ ~
* \__/ `/\ / ~-. _ .-~ /
\____(Oo) *. } { /
( (..) .----~-.\ \-` .~
//___\\\\ \ DENIED! ///.----..< \ _ -~
// \\\\ ///-._ _ _ _ _ _ _{^ - - - - ~
```

## Tools and Helper

- Github quick stats: <https://github.com/arzzen/git-quick-stats>
Expand Down

0 comments on commit 1bbcbb7

Please sign in to comment.