Coder Social home page Coder Social logo

ffmpeg-wrappers's Introduction

ffmpeg-wrappers

My collection of wrappers for ffmpeg.

Contents

FileDescription
ffmpeg_checkChecking integrity Audio and Video content
ffmpeg_cutCut from multi-media file
ffmpeg_infoShow multi-media file information
ffmpeg_norm_audioNormalize audio
ffmpeg_rm_mp3metadRemove all metadata from MP3 files
ffmpeg_scalingScaling (resizing) video/image
ffmpeg_to_mp3Convert audio file to mp3

Installation

  • Download ffmpeg-wrappers: git clone https://github.com/yuravg/ffmpeg-wrappers or zip-file
  • Run the installation script, or copy scripts from bin to some your bin directory.

Tips

Run a script for every file matching .mp3 in every directory under the current

for i in **/*.mp3; do script_name "$i" <arg1> <arg2>; done

Converts all mp4 files to mkv in the current directory

for i in *.mp4; do ffmpeg -i "$i" "${i%.*}.mkv" ; done

To manage ape-files you may convert them to flac:

ffmpeg -i <fname.ape> <fname.flac>

Concatenation files

ffmpeg -f concat -i mylist.txt -c copy output
# for absolute path (in mylist.txt):
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output

Where mylist.txt:

# this is a comment
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

Recode videos

edit pixel format (Chroma subsampling)

(fix unsupported format issue during playback, for example for: yuv422p10le)

ffmpeg -i input.mp4 -vf format=yuv420p output.mp4

mkv to mp4

ffmpeg -i <fname.mkv> -c:v libx264 -crf 18 -preset veryslow -c:a copy -o <fname.mp4>

mp4 to mkv

ffmpeg -i input.mp4 -vcodec copy -acodec copy output.mkv

Extract the audio stream without re-encoding

ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac

Delete mkv titles

mkvpropedit mult-10.mkv --delete title

Subtitles

Add to video with ffmpeg:

ffmpeg -i sample_video_ffmpeg.mp4 -vf subtitles=sample_video_subtitle_ffmpeg.srt output_srt.mp4
ffmpeg -i video.mp4 -vf "subtitles=subs.srt:force_style='Fontsize=24,PrimaryColour=&H0000ff&'" -c:a copy output.mp4

Download subtitles

https://www.downloadyoutubesubtitles.com/

Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.