VHS - Video Handler Script

This is a 'demonstration' project of mine to visualize the power of TUI.
Q: What is Video Handler Script?
A: It is a powefull wrapper script around ffmpeg.
Q: Why would i use VHS?
A: You might just find the length of some required commands a little bit too long to type.

Video Handler Script, VHS, is a name-homapge to the old video tape recorders.
Initialy, it was just ment to re-encode video files to save discspace, but quickly i figured ffmpeg to be very powerfull, and wanted to provide most of its functions within a single script.

Encoding videos can be annoying, either because you end up having a script within each folder, or having the one script avilable in the shell with the wrong configuration for the folder/files you currently work at.

VHS brings the best of 3 worlds together.
  • Its commandline is much smaller and therfor easier to remember
  • It brings 2 different default values, using preset and config files, both configurable.
  • At any time you can manually change the generated command before its execution to have 100% control of what happens.
This means, you never ever again have to define your favorite container after you set it once in vhs -C. All input will from now on be encoded to whatever you set there as container, default is mkv.
So, recording your desktop or from your webcam, stores as mkv just as passing a wild mix of avi, flv, divx, vob, wma, ogg files will end up in mkv containers, unless you pass vhs -e CONTAINER * to encode all files of the current path to CONTAINER.

Guide for a Screen'ed Webcam:
Recording your desktop or from your webcam with ffmpeg never was that easy:
vhs -S
vhs -SQ yt-1080
vhs -W
vhs -Wq vga
Do you want to record a Guide-Video, with both, your Webcam and Desktop?
For a full desktop recording, with the webcam in top left corner with 320pix width, use:
vhs -G
vhs -Gp br720
vhs -GQ hd -p cr240

Add audiostream and/or subtitle:
Use -y to copy the streams, rather than encode the whole thing.
vhs -ya stream.aac -a stream.srt video.mkv

Append/Join videos:
The output file will be named like the first input file with the proper extension, unless you pass -e in which case the final file will be encoded that its provided container format.
vhs -J video1.mov video2.webm video3.mp4
vhs -Je avi video1.mov video2.webm video3.mp4

2-Pass Encoding:
Yeah baby!
vhs -2 *

Export Audio:
Want to get your favorite theme from a videofile?
vhs -e flac -z 0:01-2:31.15 video.mp4

Play Webradio:
vhs -UP
vhs -Pu [http|rtmp]://adress.ext:port/streamename[.pls|m3u8|ffm]
vhs -PP



Play a Video Webstream:
vhs -vUP
vhs -vPu  [http|rtmp]://adress.ext:port/streamename[.pls|m3u8|ffm]
vhs -vPP

Stream a video file:
vhs -U video.avi
vhs -u [http|rtmp]://adress.ext:port/streamename[.pls|m3u8|ffm] video.avi

Stream your own live session:
vhs -Su [http|rtmp]://adress.ext:port[/streamename[.pls|m3u8|ffm]]
vhs -US
vhs -UW
vhs -UG

Make DVD-Video backups:
This functionality requires libdvdread and vobcopy.
Understand that those are external tools not managed by me
vhs -DQ hd -I "4 2"

I then select to NOT use the default vobcopy settings, then i select the title i want to encode and sit back, having audio stream #4 saved as the first and becoming default audio stream now.


Guess this covers most of the general usage cases.
Like this script?
Support me with a donation, for the next cup of coffee when doing another script like this for free.


Thank you.

2 Kommentare:

Unknown hat gesagt…

Hi... your script seems promising, but for the life of me I can't get it installed.

I followed your instructions on GitHub and right when I run the installer script, it stops with:

mkdir: cannot create directory ‘’: No such file or directory

I cannot understand what is going on...

sea hat gesagt…

Thank you +Kevin Havens for your feedback.
As already stated on https://github.com/sri-arjuna/vhs/issues/1
I do need more info to fix this.

For the life of me, please provide that required info, otherwise i cannot solve the issue, since I cannot reproduce your experienced error on my machine. Therefor I cannot pinpoint its issue.

Please run:
V=2 ./configure --prefix=/usr ; make ; sudo make install
and provide that output to me, so I have a chance of finding the issue.

Thank you