Uploaded March 2021 | Updated November 2026, 2 days ago
FFmpeg is an open source tool that allows you to edit, encode, decode, transcode and more audio or video from your command line. This can make it a really useful tool when you need to change file formats for a video or quickly cut out parts of a video. Here we're going to look at the use case of editing a stream's intro and outro scenes from a video for YouTube. By doing this in FFmpeg instead of through my normal video editor I can avoid re-encoding the edited video. This means that the process is significantly faster. Cutting a few minutes from a multi-hour video takes only a few minutes (on my machine). This can make FFmpeg a useful addition to your video editing pipeline if you're already familiar with command line tools.
To cut a 5 minute long clip out of a larger video named `original-video.mp4` we'd run a command like:
```sh
ffmpeg -i original-video.mp4 -ss 00:05:00 -to 00:10:00 -c copy edited-video.mp4
```
* `-i ./source.mp4`: is used to specify an input source. In this case we're referring to a video file named `source.mp4`.
* `-ss 00:05:00`: is used to set a start time offset. This will skip the amount of time specified forward in the input source and then begin the edited clip.
* `-to 00:10:00`: is used to set an end time for the clip. This will cause the exported clip to only include content up to the provided time in the input source.
* `-c copy`: is used to specify a codec. In this case the `copy` codec is used to help improve the speed of encoding. `copy` is a special value in `FFmpeg` that tells `FFmpeg` not to reencode your video.
Note: both `-ss` and `-to` are optional if you'd like to include content from the start or end of the source video.
Using FFmpeg to quickly trim a video is only touching the surface of what the tool is capable of. If you'd like to learn more I recommend diving into the [documentation](ffmpeg.org/documentation.html).
Explore more about FFmpeg at the official website ffmpeg.org
Learn how to install FFmpeg: ffmpeg.org/download.html
If you'd like to use FFmpeg for other things (like converting video snippets to GIFs) check out this blog post from GIPHY: engineering.giphy.com/how-to-make-gifs-with-ffmpeg
Join the World of Zero Discord Server: discord.gg/hU5Kq2u
FFmpeg is an open source tool that allows you to edit, encode, decode, transcode and more audio or video from your command line. This can make it a really useful tool when you need to change file formats for a video or quickly cut out parts of a video. Here we're going to look at the use case of editing a stream's intro and outro scenes from a video for YouTube. By doing this in FFmpeg instead of through my normal video editor I can avoid re-encoding the edited video. This means that the process is significantly faster. Cutting a few minutes from a multi-hour video takes only a few minutes (on my machine). This can make FFmpeg a useful addition to your video editing pipeline if you're already familiar with command line tools.
To cut a 5 minute long clip out of a larger video named `original-video.mp4` we'd run a command like:
```sh
ffmpeg -i original-video.mp4 -ss 00:05:00 -to 00:10:00 -c copy edited-video.mp4
```
* `-i ./source.mp4`: is used to specify an input source. In this case we're referring to a video file named `source.mp4`.
* `-ss 00:05:00`: is used to set a start time offset. This will skip the amount of time specified forward in the input source and then begin the edited clip.
* `-to 00:10:00`: is used to set an end time for the clip. This will cause the exported clip to only include content up to the provided time in the input source.
* `-c copy`: is used to specify a codec. In this case the `copy` codec is used to help improve the speed of encoding. `copy` is a special value in `FFmpeg` that tells `FFmpeg` not to reencode your video.
Note: both `-ss` and `-to` are optional if you'd like to include content from the start or end of the source video.
Using FFmpeg to quickly trim a video is only touching the surface of what the tool is capable of. If you'd like to learn more I recommend diving into the [documentation](ffmpeg.org/documentation.html).
Explore more about FFmpeg at the official website ffmpeg.org
Learn how to install FFmpeg: ffmpeg.org/download.html
If you'd like to use FFmpeg for other things (like converting video snippets to GIFs) check out this blog post from GIPHY: engineering.giphy.com/how-to-make-gifs-with-ffmpeg
Join the World of Zero Discord Server: discord.gg/hU5Kq2u


.
Moq is a framework for .NET that makes it easy to generate and test mocked code. Given a class you are able to replace that class with a clone that matches all of the type requirements of the class but has none of the implementation leaving the rest up to you. It is compatible with most testing frameworks, but because were hoping to later integrate with Unity 3D as part of our [Platforming game](https://www.youtube.com/playlist?list=PLEwYhelKHmigkz97T76r2bCt7wfG_1pPE) well be testing our integration of Moq with [NUnit](https://nunit.org/).
This framework is new to me so lets explore it together and cover some of the basic use cases that Id like to employ Moq for: Mocking the value of object Properties, Mocking the value of object Functions and Mocking the results of a specific function invocation. From that hopefully well be able to build a better understanding of the capabilities of Moq and how we can best use it to improve the quality of our testing.
***
To add Moq to your dotnet project you can run:
```ps1
dotnet add package Moq
```
Moq is also on GitHub. You can browse the source and see code samples there: https://github.com/moq/moq4
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Im Learning Moq - A .NET Mocking Framework for Unit Tests](https://i.ytimg.com/vi/EJZ2xWGfFQw/mqdefault.jpg)
 in an earlier video series. You can accomplish a lot with basic distance formula to create a number of very cool effects!
If you have suggestions for how we could improve this shader or ideas on what we should do with it next let me know in the comments!
Join the World of Zero Discord channel: https://discord.gg/hU5Kq2u A Static Glowing Ring - Ripple Shader - Part 1](https://i.ytimg.com/vi/EhkBdCdNx-Y/mqdefault.jpg)





 for recommending the use of `ContextMenu`s. You can find more of their content as a guest in videos at Infallible Code: https://www.youtube.com/user/charlesamat
### Code Examples
Some example uses of Unity 3Ds `ContextMenu` and `ContextMenuItem` Attributes:
#### `ContextMenu`
A `ContextMenu` Attribute is attached to functions in your `MonoBehavior`. When that menu item is clicked it will invoke the function the attribute is assigned to:
```csharp
[ContextMenu(Context Menu Example)]
void HelloContextMenu() {
Debug.Log(Context Menu Clicked!);
}
```
#### `ContextMenuItem`
A `ContextMenuItem` Attribute is attached to a field and requires you to provide the name of a function that will be invoked when the menu item is clicked.
```csharp
[ContextMenuItem(Context Menu Item Example, nameof(InvokeContextMenuItem))]
public float someVariable;
void InvokeContextMenuItem() {
Debug.Log(Context Menu Item Clicked!);
}
```
[`nameof`](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/nameof) is a C# function that returns a string representation for the name of the class, function, field, property etc that is referenced. Using this allows things like refactorings to function better and provides compiler errors if you spell a function name incorrectly (`nameof(FunctionName)` will throw an error if `FunctionName` is not defined).
Note: The functions invoked by both `ContextMenu` and `ContextMenuItem` should not have any arguments.
***
Unitys documentation on the `ContextMenu` Attribute: https://docs.unity3d.com/ScriptReference/ContextMenu.html
Unitys documentation on the `ContextMenuItem` Attribute: https://docs.unity3d.com/ScriptReference/ContextMenuItemAttribute.html
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Using ContextMenu and ContextMenuItem in Unity 3D](https://i.ytimg.com/vi/GKG-vUFt3D4/mqdefault.jpg)
