--- title: "uploadable ffmpeg screen casts" date: 2020-01-11T12:33:07+01:00 draft: false snippet_types: ["ffmpeg", "media"] --- I prefer tools like https://asciinema.org/ when I want to show terminal tricks and cli tools I build, but sometimes you need to show something that breaks out of the terminal. In this case I record a **.mov** screen cast using quicktime then do several transformations using **ffmpeg** to get a small uploaded web friendly **.webm** file. 1. cut down the video if need be ```shell $ ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4 ``` 2. scale down the **.mov** file to something more web friendly ```shell $ ffmpeg -i vim_dic.mov -filter:v scale=512:-1 -c:a copy vim_dic_small.mov ``` 3. convert the **.mov** to **.webm** ```shell $ ffmpeg -i vim_dic_small.mov -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis vim_dic.webm ``` If you don't have **ffmpeg** is available via brew source: - [brew ffmpeg](https://formulae.brew.sh/formula/ffmpeg) - [convert mov to webm](https://davidwalsh.name/convert-to-webm) - [resize mov](https://superuser.com/questions/624563/how-to-resize-a-video-to-make-it-smaller-with-ffmpeg) - [html video element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video) - [cutting video](https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg)