This is a follow-up to my previous video, [How I Render My Videos for LBRY](lbry://@MH#5/Rendering#4). This is the script I use to transcode my videos before posting them on LBRY. The script should work right out of the box on most _normal_ Linux distros, just put it in your `$PATH` and start transcoding:
`tc.sh input-video.mkv mp4`
The transcoded video will have a filename ending with `_tc.mp4`, ready to be posted on LBRY!
You might want to get rid of the `.sh` extension of the script, I just added the extension to make sure LBRY would recognize it as a script.
I recommend keeping the quality between 18-23. Below 18 and the filesize is getting too big without much improvement in quality, above 23 and the quality is starting to fall apart. Every 5 steps will make the video halve/double in filesize, so 23 will be about half the size of 18 etc.
The max bitrate depends on the quality you've set, the resolution and framerate of the video and the content of the video itself. If in doubt, follow suggestions. Experiment and see what works for you.
The rule of thumb I use for myself is that an hour long video should be around 1GB in filesize, which means a 30 min video should be around 500MB, a 15 min video around 250MB and so on. I usually end up going a bit above, but for me that's the sweet spot for the quality/filesize ratio.
If the script doesn't work do the following in your terminal...
Make sure bash is installed:
`cat /etc/shells`
Make sure bash is the current shell:
`grep $USER /etc/passwd`
Make sure coreutils and ffmpeg are installed:
`whereis coreutils ffmpeg`
Make sure the script is executable:
`chmod +x
`
You can find the path to the script under **_File Details_** and **_Downloaded to_** below. For me that is `/home/michael/Downloads/LBRY/tc.sh`, so I'd do:
`chmod +x /home/michael/Downloads/LBRY/tc.sh`
Make sure the script is in your `$PATH`:
`echo "$PATH"`
I keep my scripts in `.local/bin`, so I'd copy the script there by doing:
`cp ~/Downloads/LBRY/tc.sh ~/.local/bin/tc.sh`
Feel free to leave questions/comments/suggestions below :)
---
## Support the channel
* **Bitcoin Core (BTC)**: `bc1qrzhu0t0sydgc73vf200z0qpj78jma4vuzl2x3m`
* **Bitcoin Cash (BCH)**: `1Lwnk2xcnSsqd6tpPYKEnV3dDDyG8wcJCs`
* **Monero (XMR)**: `4B2ECUw9pxfZdPHiViJGcWCztk6RYKnSwAdHYBLUNenT8gA281WZQGh7jc9dtEYjm9GWdEcaPKHUN8Noa4aXUgT2FHfJyZU`
![QR Codes](https://thumbs.spee.ch/view/a/6d91888d0b280531.png "QR Codes for Bitcoin Core (Left), Bitcoin Cash (Middle) and Monero (Right)")