<---- template headericclude ----->
VHS - Video Handler Script, using ffmpeg
FedoraForum.org - Fedora Support Forums and Community

View Poll Results: Was the script helpfull?

Voters
5. You may not vote on this poll
  • Yes

    4 80.00%
  • No

    0 0%
  • Didnt get it to work

    1 20.00%
  • AHHHHHHHHH

    0 0%
Page 1 of 5 123 ... LastLast
Results 1 to 15 of 63
  1. #1
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up VHS - Video Handler Script, using ffmpeg

    Hello everyone

    I'd like to present my newest script: VHS, given the name, its all about videos.
    It is a wrapper/handler for ffmpeg which is also available by the rpmfusion repos.
    NOTE: It also requires TUI (Text User Interface), for which installation GIT will be required, please install GIT in advance. (this is not required if you use the repo)

    It has reached: final release 2.0
    See my BLOG about it.
    If no bug reports are made, i assume it works perfectly fine for you too. (exception: vobcopy!! i already told the author)

    The main purpose for this script is to convert a video to another container, so i can watch them saved on the NAS on my TV.
    Since i'm german speaking, but i like original speaking too, it lets you set 2 languages within the config file, lang_force_both is false by default, so if you wish to have 2 languages in your fresh encoded videos, you have to change it to true.
    This said, the 'main' lang is ger, the 2nd is 'eng', so you will need (want) to change this.
    The configuration screen will show up upon first call of the script, please take your time to make the proper adjustments.

    As the script, grew and i dig into the ffmpeg docs, i found examples for other nice usage of ffmpeg.
    And at this time i also want to thank the guys in the ffmpeg channel for their help.

    This said, the functionality includes:
    1) Convert a video to another container
    1.1) Get rid of unwanted audio streams
    1.2) Include subtitles only when required
    1.3) Make the videos smaller, but maintain a good quality
    1.4) Easy option to either down- or upcode them (eg: downcode for the mobile phone, or upcode before writing a video dvd)
    2) Record Screen / Desktop
    3) Record Videologs using the webcam (internal or usb)
    4) Record a 'Desktop' guide ; record your Desktop & Webcam as PiP
    5) Extract the soundtrack of a music video (or just an intro)
    6) Include external audio or subtitle tracks
    7) Put a logo to top left corner
    8) Put a video as pip overlay
    9) Play streams audio/video
    10) Streamcast: Audio, Desktop, Guide, Webcam, Video

    Upon first call, it will open the setup dialog.
    Please take your time to change the values to your prefered defaults.
    This is required, so VHS requires much less arguments to be passed upon calling.

    Once configured, the 'regular' calls should look like:
    Code:
    vhs [options] [/path/to/]file1 * ..	# Encode video files
    vhs -i [/path/to/]file			# Show stream info of a media file
    vhs -S		# Record screen
    vhs -W		# Record from webcam
    vhs -G		# Record a 'Guide' (both of the above)
    vhs -D		# Encode a DVD, -DQ dvd recomended!
    In an ideal situation, this is how i convert all videos within the current folder:
    Code:
    vhs *
    Or if i want to save space because i think that this 10gb 1080p video is too large, this will reduce its size to about 1.3 gb:
    Code:
    vhs -Q fhd *
    For a list of all arguments, please refer to the help screen (vhs -h)


    NOTE:
    The script expects the commands it generates to be working.
    However, this cannot be promissed in all cases, so if it fails, use the '-v' (verbose of ffmpeg) option to analyze the cause.
    There are options available to the script to 'fix' or 'bypass' most common errors that may occour, at least once you have the info from the verbose output.

    Furthermore, it saves the commands within a logfile, which can be viewed by vhs -L, and i suggest to clear it after every 400 encoded videos by vhs -x, as it can grow quite large (1mb+)

    Bugs & Errors
    For 'bug reports' please post here the output of the 'verbose' (-Vv) call, and either attach the log or put the regarding text in [ code ] tags.
    For later updates (few months after post date), please refer to: https://github.com/sri-arjuna/vhs

    Known Issues
    • DvD encoding (actualy copy the vobfiles using vobcopy) does only work for most, ~75% with default mode or 'longest playtime'.


    Video Guide / Introduction, done with VHS
    (Playlist)
    How to install & Configure VHS
    Examples: Audio Extraction
    Examples: Debug'ing, this case - subtitle codec
    Examples - Downcoding

    NOTES:
    Now available by repositry.... (Requires rpmfusion to be installed too!)
    Code:
    su
    wget http://sea.fedorapeople.org/sea-devel.repo -O /etc/yum.repos.d/sea-devel.repo
    yum install -y vhs
    Hope this helps
    Enjoy
    Last edited by sea; 29th March 2015 at 04:17 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  2. #2
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.5.2:
    Files: Scan for audio streams always show streams if more than 1
    DVD: Encode non-copy-protected dvd's works now

    Roadmap:
    * Fully implement container handling (blocker of webm improvments)
    * Improve "webm/ogg" encoding - its death slow atm (high prio!)
    * Reduce webcam/dvd 'menu' - test all their/its options (low prio)
    Last edited by sea; 29th May 2014 at 04:25 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  3. #3
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.5.3
    Included TUI installer
    Improved webm encode speed (using max cpu|threads - 1)
    Improved container handling
    Reduced DVD menu to: encode from disk or create/use local copy
    Depricated: Quality option, not yet removed.

    Roadmap:
    * Add more containers (video/audo codec combinations)
    * add 'pass 1|2' option

    Got any suggestions/recomendations?
    Please let me know!
    Last edited by sea; 22nd July 2014 at 07:05 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  4. #4
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.6.0
    * Added option-toggle for 2-Pass video encoding ('-p')
    * Added (upon success) removal of tempfiles for 2pass encoding, input file remains untouched of course!

    Info:
    To play an encoded video on your TV from the NAS, use single pass (no '-p' supplied)

    Preview:
    Last edited by sea; 22nd July 2014 at 02:13 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  5. #5
    Join Date
    Mar 2009
    Location
    Lancaster, UK
    Posts
    932
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler by sea, using ffmpeg

    I think I am missing somethign. What codecs are things encoded to. How do I change this?

  6. #6
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler by sea, using ffmpeg

    By default, tt uses the 'default' (according to several websites at least) codecs specific to their container (mkv,webm,mp4,ogg).

    Code:
    ✔ ~/.config/vhs/containers $ cat webm ogg mkv mp4 
    # vhs (0.6) - Container definition
    container=webm
    ext=webm
    audio_codec=libvorbis
    video_codec=libvpx
    codec_extra=true
    file_extra=true
    
    # vhs (0.6) - Container definition
    container=ogg
    ext=ogg
    audio_codec=libvorbis
    video_codec=libtheora
    codec_extra=true
    file_extra=true
    
    # vhs (0.6) - Container definition
    container=mkv
    ext=mkv
    audio_codec=ac3
    video_codec=libx264
    codec_extra=false
    file_extra=false
    
    # vhs (0.6) - Container definition
    container=mp4
    ext=mp4
    audio_codec=aac
    video_codec=libx264
    codec_extra=true
    However, you always can overwrite those codecs, with a similar line as in the examples.
    Code:
    vhs -c vlibtheora -c alibvorbis files
    Or manualy change the entry in the container files for permament use.
    Or keep the existing codecs of the source file by passing '-y'.

    Hope this helps

    EDIT:
    Note the 'a' and the 'v' in front of the actual values for both: -b and -c. (bitrate & codec)
    Last edited by sea; 28th September 2014 at 02:01 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  7. #7
    Join Date
    Mar 2009
    Location
    Lancaster, UK
    Posts
    932
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler by sea, using ffmpeg

    Cheers and making character limit... Thanks

  8. #8
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler using ffmpeg

    0.8.0
    * Added lazy quality options 'RES': screen clip vhs dvd hdr fhd
    -Q RES : Set scale and bitrates to RES' defaults
    -q RES : Set scale to RES defaults
    -d RES : Set scale-DIMENSON to keep aspect ratio (:-1)
    See help (-h) for their default values
    -i VIDEO : Prints the streams of the video (much easier to read than "ffmpeg -psnr VIDEO")

    * First attempt to shorten video names if they are too long for a single line
    * You may now add (keep actualy) multiple audio streams, by supplying "-l LNG", where LNG is a 3 char abrevihation of your langauge (see video info for its value) (BETA).
    * First attempt to also include subtitles (BETA)


    Roadmap
    * Trying to add 'buffers' in the hope to increase quality further, high prio (currently, the use of buffers removes the video!?)
    * Improve "webm/ogg" encoding - its death slow atm, med prio
    * Still want more containers, low prio as i have no use for more atm (let me know of your suggestions!)

    Info:
    If you feel the (default) bitrates (for -Q) are too low, please share yours in: Video Bitrates
    Just encoded a 24min full hd video from 1gb to 230mb - with (almost) none (but within the intro) visual quality loss
    And just to be clear on this again, once you've chosen your favorite container AND set your favorite languages (ger & eng for me that is), the following examples will re-encode all videos within that folder to it.
    Code:
    vhs *
    The options are ALL optional, obviously
    Last edited by sea; 24th September 2014 at 03:10 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  9. #9
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.8.1
    Hotfix: If only 1 audiosream was found - uses now the proper audio id, rather than expecting it to be on stream 1
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  10. #10
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.8.2
    Hotfix: Screen- and Webcam- recordings work again, usage for Webcam simplyfied.

    EDIT:
    Just figured, it doesnt record audio along (for neither of the two)... This might take a bit as the options/parameters are passed.
    I was just focused to get the video files stored, at the right place, with the proper name, that i had forgotten the audio to check.
    Sorry for the inconvieniance.
    Last edited by sea; 27th September 2014 at 10:01 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  11. #11
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.8.3
    Hotfix: Audio for Webcam- and Screen- recording works now
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  12. #12
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.8.4
    * Droped idea to use CRF, as that increases the file size WAY too much
    * Added 'buffer'
    * Subtitle codec "ssa" seems to be the only working, but hey, it does subtitles

    Info:
    To use subtitiles at all, you must pass: -t
    Subrip looked wierd upon testing, but might been the input.. idk
    Please report your experience with other subtitle codecs.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  13. #13
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.8.5
    * Re-use existing preview-image, mostly used in (but not limited to) matroska videos (-j)
    * Added audio extraction: wav, dts, ac3, aac, mp3 (this is part of upcoming multipass -p 2|3 and therefor BETA)

    There are days where code is just flowing from mind to a script and is working....
    If you encounter any errors with anything added during 0.8.x (sunday) please post the output from:
    Code:
    vhs -Vv [your_options] "videoname"
    EDIT'ed for silent hotfix: (had 'bumped' enough for one day, and this feature isnt that important)
    * Added the "-j" option to getopts
    * Added info on filesize update when using '-j' option
    Last edited by sea; 28th September 2014 at 11:56 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  14. #14
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    Me had a chat on #ffmpeg@irc, and they suggested me to either use CRF only, or to increase the bitrates to get rid of the pixelish start of videos, i have decided to increase bitrates - keeps the video smaller, also, that way only 'HD' videos use the higher bitrates...
    I've added '4k' support only due to the 'hype' and since it was easy to implement those 3 values

    0.9.0
    * Increased Bitrates of hdr (768->1024) and fhd (1024->1280) when invoked by '-Q'
    * Added '4k' to the list of available quality presets (4096x2160 ; 384k audio ; 2560k video)
    * Added handler for channel downcode (eg: dts to stereo - default)
    * Updated the 'help screen'
    * Added support for FPS 'overwrite'
    * Improved audio extraction procedure, but still BETA
    * Improved 'genFilename' for the use with forced output name '-O NAME' (only works for audio!)
    * Added encoder info to metadata: vhs & ffmpeg with their versions

    NOTE:
    It is highly recomended to delete current configuration (vhs -X) and let the script rewrite everything!
    If you dont do so, you might get unexpected behaviour.
    I do not own any device capable of playing 4k content, if you do, please drop a line of your impression.

    Between 0.9.0 and 1.0.0 *drums*, i'll be optimizing for multi pass encoding, but that to work, and test enough will take some time, so i'm uplading this version now.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

  15. #15
    Join Date
    May 2011
    Location
    Confoederatio Helvetica (Swissh)
    Age
    44
    Posts
    4,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: VHS - Video Handler Script, using ffmpeg

    0.9.1
    * Added an option to encode just a specific timeframe. Eg: "-z 1:00[-5:00]" without the optional part, it will encode 1 minute from the start time (very nice for sample files : required for me to test the upcomming multi-pass encoding)
    * Removed the 'no menu' message
    * Fixed 4k resolution to 3840, dont know why i've chosen a real 4k (IT) value, over the double of the regular FullHD size (2*1920)

    Example of the day:
    Code:
    vhs -jtl jpn -z 0:45-1:30 "S01E03 A Dull Light in Despair (Dual Audio) (1920x1080).mkv"
    Creates a sample file starting from 45secs to 1m 30s, reusing the mjpeg icon of the input, adding japanes to the list of languages, which applies to audio (japanes available) and subtitles as those are invoked too (this video provided only english subtitles though).
    In comparison, the same command in 'plain ffmpeg' would look like this:
    Code:
    ffmpeg -v quiet -i "S01E03 A Dull Light in Despair (Dual Audio) (1920x1080).mkv" -strict -2  -map 0:0 -c:v libx264   -ac 2 -c:a ac3   -c:s ssa  -map 0:3  -map 0:1 -map 0:2 -ss 0:45 -to 1:30  -map 0:4 -map 0:5 -map 0:6  "S01E03 A Dull Light in Despair (Dual Audio) (1920x1080).0.mkv"
    I'm so excited.. *sing & dance*
    Last edited by sea; 29th September 2014 at 08:49 PM.
    * Shell Wrapper and Runtime Modifier (SWARM): https://github.com/sri-arjuna/SWARM
    * Yet Another Simple Script Installer (YASSI): https://forums.fedoraforum.org/showthread.php?323099
    * EFI Cheatsheet :: http://forums.fedoraforum.org/showthread.php?t=298546
    * Windows 8+ & Fedora 20+ Dualboot :: http://forums.fedoraforum.org/showthread.php?t=298161

Page 1 of 5 123 ... LastLast

Similar Threads

  1. [FFMPEG] Encoding video with [2|3]-Pass
    By sea in forum Media software
    Replies: 0
    Last Post: 13th August 2014, 02:44 PM
  2. [SOLVED]
    Bash script, ffmpeg batch help needed
    By AndrewSerk in forum Using Fedora
    Replies: 3
    Last Post: 18th December 2011, 01:02 AM
  3. add title to video with ffmpeg? is it possible?
    By tunisiano1978 in forum Using Fedora
    Replies: 2
    Last Post: 24th June 2010, 10:44 PM
  4. ffmpeg shell script help
    By HaydnH in forum Using Fedora
    Replies: 2
    Last Post: 18th October 2007, 04:05 PM
  5. ffmpeg - recording video, but no sound...
    By code_astronomer in forum Using Fedora
    Replies: 2
    Last Post: 27th April 2006, 06:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]