All Projects → suntong → ffcvt

suntong / ffcvt

Licence: MIT license
ffmpeg convert wrapper tool

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ffcvt

Ffmediaelement
FFME: The Advanced WPF MediaElement (based on FFmpeg)
Stars: ✭ 733 (+2190.63%)
Mutual labels:  mp4, codec, audio-processing
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (+206.25%)
Mutual labels:  encoder, video-processing, codec
Minih264
Minimalistic H264/SVC encoder single header library
Stars: ✭ 390 (+1118.75%)
Mutual labels:  encoding, encoder, codec
Fasubrip
FaSubrip autodetects and converts encoding of farsi (persian) subrip files. with additional functionalities.
Stars: ✭ 22 (-31.25%)
Mutual labels:  encoding, subtitle
AnimatedGif
📼 A high performance .NET library for reading and creating animated GIFs
Stars: ✭ 106 (+231.25%)
Mutual labels:  encoding, encoder
Awesome Video
A curated list of awesome streaming video tools, frameworks, libraries, and learning resources.
Stars: ✭ 397 (+1140.63%)
Mutual labels:  encoding, mp4
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (+365.63%)
Mutual labels:  encoding, codec
Qs
Go module for encoding structs into URL query parameters
Stars: ✭ 55 (+71.88%)
Mutual labels:  encoding, encoder
SSffmpegVideoOperation
This is a library of FFmpeg for android... 📸 🎞 🚑
Stars: ✭ 261 (+715.63%)
Mutual labels:  mp4, video-processing
urlpack
Pure JavaScript toolkit for data URLs (MessagePack, Base58 and Base62)
Stars: ✭ 51 (+59.38%)
Mutual labels:  encoder, codec
sms
A Go library for encoding and decoding SMSs
Stars: ✭ 37 (+15.63%)
Mutual labels:  encoding, encoder
gonvert
Golang character encoding converter with an automatic code-estimation.
Stars: ✭ 24 (-25%)
Mutual labels:  encoding, encoder
Ffmediatoolkit
FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
Stars: ✭ 156 (+387.5%)
Mutual labels:  mp4, encoder
Isobmff
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Stars: ✭ 157 (+390.63%)
Mutual labels:  mp4, codec
Faac
Freeware Advanced Audio Coder faac mirror
Stars: ✭ 102 (+218.75%)
Mutual labels:  mp4, encoder
Binary
Generic and fast binary serializer for Go
Stars: ✭ 86 (+168.75%)
Mutual labels:  encoding, codec
codec
Encode keys, values and range options, with built-in or custom encodings.
Stars: ✭ 27 (-15.62%)
Mutual labels:  encoding, codec
Transcoder
🎞 Hardware-accelerated video transcoding using Android MediaCodec APIs. Supports cropping, concatenation, clipping, audio processing, video speed and much more.
Stars: ✭ 404 (+1162.5%)
Mutual labels:  mp4, video-processing
Axiom
An FFmpeg GUI for Windows
Stars: ✭ 560 (+1650%)
Mutual labels:  mp4, encoder
Img Encode
Encode an image to sound and view it as a spectrogram - turn your images into music
Stars: ✭ 157 (+390.63%)
Mutual labels:  encoding, audio-processing

ffcvt

All Contributors

MIT License GoDoc Go Report Card Build Status PoweredBy WireFrame

Transcodes all videos in the given directory and all of it's subdirectories using ffmpeg.

TOC

ffcvt - ffmpeg convert wrapper tool

Latest Update(s)

Release v1.8.0

  • Now able to define your own defaults. Just make a copy of ffcvt.json and customize it to your heart's content, then use the -cfg option to point to it. Better yet, set FFCVT_CFG environment variable and forget all about it afterwards.
    • This means that ffcvt is now not only limited to its own predefined transcoding sets, but you can also define your own transcoding rules and names and then fully enjoy its advanced addon assistants.
    • BTW, If you have a good set, don't forget to send in a PR so that everybody can also benefit from it.
  • Now the subtitles, nfo, html or any files in the source directory will be duplicated into the output (work) directory, first by hard-link and if it fails due to cross storage devices, a copy will be used instead.
  • And when creating par2 checksum/repair files, all files in the output (work) directory will be covered.

Release v1.7.5

  • Now able to speed up playback speed (-Speed). Details in #22
  • Also have added a copy target type that can speed up the Seg (split video) operation (v1.7.4). Details in #21

Release v1.7.3

  • Now able to split video into multiple segments (-S,Seg) by the given time. Details in #16

Release v1.7.2

Release v1.7.1

Added option -C,Cut which allows cutting multiple segments.

For further details, check out the wiki https://git.io/JuK0c, in which the source file of

Nice_scenic_videos_from_dashcam_With_Evening_sunset_view.mp4

is cut-short into

Nice_scenic_videos_from_dashcam_With_Evening_sunset_view_cut.mp4

Release v1.7.0

Added wx type for weixin.

Convert to video that is recognizable and playable by weixin/wechat, by using the -t wx option as the convertion type. Here is a converted sample:

FloatingHeliumBalloonInMovingCar.mp4

(credit here)

For further details, check out the wiki https://git.io/JuK0q

Introduction

  • The next-generation codec like High Efficiency Video codec (HEVC), H.265 or VP9 can produce videos visually comparable to H.264's result, but in about half the file size.
  • Meanwhile the Opus audio codec is becoming the best thing ever for compressing audio -- A 64K Opus audio stream is comparable to mp3 files of 128K to 256K bandwidth.
  • Such fantastic high efficiency audio/video codec/encoding capability has long been available in ffmpeg, but fewer people know it or use it, partly because the ffmpeg command line is not that simple for every one.
  • The ffcvt is designed to take the burden from normal Joe -- All you need to do to encode a video is to give one parameter to ffcvt, i.e., the path and file name of the video to be encoded, and ffcvt will take care of the rest, using the recommended values for both audio/video encoding to properly encode it for you.
  • It can't be more simpler than that. However, beneath the simple surface, ffcvt is versatile and powerful enough to allow you to touch every corner of audio/video encoding. There is a huge list of environment variables (or command-line parameters) which will allow you tweak the encoding methods and parameters to exactly what you prefer instead.
  • Moreover, to encode a directory full of video files, including under its sub-directories, you need just to give ffcvt one single parameter, the directory location, and ffcvt will go ahead and encode all video files under that directory, including all its sub-directories as well.

Quick Usage

There is a quick usage help that comes with ffcvt, produced when it is invoked without any parameters:

$ ffcvt -version

$ ffcvt -version
ffcvt
Version 1.8.0 built on 2022-02-12

$ ffcvt

Usage:
 ffcvt [flags] 

Flags:

  -cfg	cfg file to define your own targets: webm/wx/youtube etc (FFCVT_CFG)
  -t	target type: webm/x265-opus/x264-mp3/wx/youtube/copy (FFCVT_T)
  -ves	video encoding method set (FFCVT_VES)
  -aes	audio encoding method set (FFCVT_AES)
  -ses	subtitle encoding method set (FFCVT_SES)
  -vep	video encoding method prepend (FFCVT_VEP)
  -aep	audio encoding method prepend (FFCVT_AEP)
  -sep	subtitle encoding method prepend (FFCVT_SEP)
  -vea	video encoding method append (FFCVT_VEA)
  -aea	audio encoding method append (FFCVT_AEA)
  -abr	audio bitrate (64k for opus, 256k for mp3) (FFCVT_ABR)
  -crf	the CRF value: 0-51. Higher CRF gives lower quality
	 (28 for x265, ~ 23 for x264) (FFCVT_CRF)

  -d	directory that hold input files (FFCVT_D)
  -f	input file name (either -d or -f must be specified) (FFCVT_F)
  -sym	symlinks will be processed as well (FFCVT_SYM)
  -exts	extension list for all the files to be queued (FFCVT_EXTS)
  -suf	suffix to the output file names (FFCVT_SUF)
  -ext	extension for the output file (FFCVT_EXT)
  -w	work directory that hold output files (FFCVT_W)

  -ac	copy audio codec (FFCVT_AC)
  -vc	copy video codec (FFCVT_VC)
  -an	no audio, output video only (FFCVT_AN)
  -vn	no video, output audio only (FFCVT_VN)
  -vss	video: same size (FFCVT_VSS)
  -C,Cut	Cut segment(s) out to keep. Specify in the form of start-[end],
	strictly in the format of hh:mm:ss, and may repeat (FFCVT_C,CUT)
  -S,Seg	Split video into multiple segments (strictly in format: hh:mm:ss) (FFCVT_S,SEG)
  -Speed	Speed up/down video playback speed (e.g. 1.28) (FFCVT_SPEED)
  -lang	language selection for audio stream extraction (FFCVT_LANG)
  -sel	subtitle encoding language (language picked for reencoded video) (FFCVT_SEL)
  -o	more options that will pass to ffmpeg program (FFCVT_O)
  -ato-opus	audio encode to opus, using -abr (FFCVT_ATO_OPUS)
  -vto-x265	video video encode to x265, using -crf (FFCVT_VTO_X265)

  -p	par2create, create par2 files (in work directory) (FFCVT_P)
  -nc	no clobber, do not queue those already been converted (FFCVT_NC)
  -n	no exec, dry run (FFCVT_N)

  -force	overwrite any existing none-empty file (FFCVT_FORCE)
  -debug	debugging level (FFCVT_DEBUG)
  -ffmpeg	ffmpeg program executable name (FFCVT_FFMPEG)
  -ffprobe	ffprobe program execution (FFCVT_FFPROBE)
  -version	print version then exit (FFCVT_VERSION)

Details:

  -C value
    	Cut segment(s) out to keep. Specify in the form of start-[end],
    		strictly in the format of hh:mm:ss, and may repeat
  -Cut value
    	Cut segment(s) out to keep. Specify in the form of start-[end],
    		strictly in the format of hh:mm:ss, and may repeat
  -S string
    	Split video into multiple segments (strictly in format: hh:mm:ss)
  -Seg string
    	Split video into multiple segments (strictly in format: hh:mm:ss)
  -Speed string
    	Speed up/down video playback speed (e.g. 1.28)
  -abr string
    	audio bitrate (64k for opus, 256k for mp3)
  -ac
    	copy audio codec
  -aea string
    	audio encoding method append
  -aep string
    	audio encoding method prepend
  -aes string
    	audio encoding method set
  -an
    	no audio, output video only
  -ato-opus
    	audio encode to opus, using -abr
  -cfg string
    	cfg file to define your own targets: webm/wx/youtube etc
  -crf string
    	the CRF value: 0-51. Higher CRF gives lower quality
    		 (28 for x265, ~ 23 for x264)
  -d string
    	directory that hold input files
  -debug int
    	debugging level (default 1)
  -ext string
    	extension for the output file
  -exts string
    	extension list for all the files to be queued (default ".3GP.3G2.ASF.AVI.DAT.DIVX.FLV.M2TS.M4V.MKV.MOV.MPEG.MP4.MPG.RMVB.RM.TS.VOB.WEBM.WMV")
  -f string
    	input file name (either -d or -f must be specified)
  -ffmpeg string
    	ffmpeg program executable name (default "ffmpeg")
  -ffprobe string
    	ffprobe program execution (default "ffprobe -print_format flat")
  -force
    	overwrite any existing none-empty file
  -lang string
    	language selection for audio stream extraction (default "eng")
  -n	no exec, dry run
  -nc
    	no clobber, do not queue those already been converted
  -o string
    	more options that will pass to ffmpeg program
  -p	par2create, create par2 files (in work directory)
  -sel value
    	subtitle encoding language (language picked for reencoded video)
  -sep string
    	subtitle encoding method prepend
  -ses string
    	subtitle encoding method set
  -suf string
    	suffix to the output file names
  -sym
    	symlinks will be processed as well
  -t string
    	target type: webm/x265-opus/x264-mp3/wx/youtube/copy (default "webm")
  -vc
    	copy video codec
  -vea string
    	video encoding method append
  -vep string
    	video encoding method prepend
  -version
    	print version then exit
  -ves string
    	video encoding method set
  -vn
    	no video, output audio only
  -vss
    	video: same size (default true)
  -vto-x265
    	video video encode to x265, using -crf
  -w string
    	work directory that hold output files

To reduce output, use `-debug 0`, e.g., `ffcvt -force -debug 0 -f testf.mp4 ...`

Environment Variables

For each ffcvt command line parameter, there is a environment variable corresponding to it. For example you can use export FFCVT_FFMPEG=avconv to use avconv instead of ffmpeg (Don't, I use it for my CommandLineArgs to develop/test ffcvt without invoking ffmpeg each time).

Encoding Help

The detailed guide to choose/provide proper parameters to ffcvt have been moved to wiki. For example,

Please check them out in the wiki, and for other documents like "Most used ffmpeg options", "How to crop a video", etc.

Tools Choices

As suggested before, don't use avconv, use ffmpeg instead (the avconv fork was more for political reasons. I personally believe ffmpeg is technically superior although might not be politically).

As for video/movie play back, use mpv. It is a fork of mplayer2 and MPlayer, and is a true modern all-in-one movie player that can play ANYTHING, and one of the few movie players being actively developed all the time. Download link is in mpv.io, from which Ubuntu repo I get my Ubuntu ffmpeg package as well. If you are unsatisfied with mpv's simple user interface, check out https://wiki.archlinux.org/index.php/Mpv#Front_ends.

Install Debian/Ubuntu package

apt install ffcvt

Download/install binaries

  • The latest binary executables are available as the result of the Continuous-Integration (CI) process.
  • I.e., they are built automatically right from the source code at every git release by GitHub Actions.
  • There are two ways to get/install such binary executables
    • Using the binary executables directly, or
    • Using packages for your distro

The binary executables

  • The latest binary executables are directly available under
    https://github.com/suntong/ffcvt/releases/latest
  • Pick & choose the one that suits your OS and its architecture. E.g., for Linux, it would be the ffcvt_verxx_linux_amd64.tar.gz file.
  • Available OS for binary executables are
    • Linux
    • Mac OS (darwin)
    • Windows
  • If your OS and its architecture is not available in the download list, please let me know and I'll add it.
  • The manual installation is just to unpack it and move/copy the binary executable to somewhere in PATH. For example,
tar -xvf ffcvt_*_linux_amd64.tar.gz
sudo mv -v ffcvt_*_linux_amd64/ffcvt /usr/local/bin/
rmdir -v ffcvt_*_linux_amd64

Distro package

The repo setup instruction url has been given above. For example, for Debian --

Debian package

curl -1sLf \
  'https://dl.cloudsmith.io/public/suntong/repo/setup.deb.sh' \
  | sudo -E bash

# That's it. You then can do your normal operations, like

sudo apt-get update
apt-cache policy ffcvt

sudo apt-get install -y ffcvt

Install Source

To install the source code instead:

go get -v -u github.com/suntong/ffcvt

Author

Tong SUN
suntong from cpan.org

Powered by WireFrame
PoweredBy WireFrame
the one-stop wire-framing solution for Go cli based projects, from init to deploy.

Contributors

Thanks goes to these wonderful people (emoji key):


suntong

💻 🤔 🎨 🔣 ⚠️ 🐛 📖 📝 💡 🔧 📦 👀 💬 🚧 🚇

sanjaymsh

📦

Billy West

🐛 📓

Brian Rozmierski

🐛 📓

Roman Valls Guimera

🐛 📓

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].