Skip to content

Instantly share code, notes, and snippets.

@Mao8a
Last active December 5, 2022 18:34
Show Gist options
  • Save Mao8a/9fd9608adc814b2bbddf0483cb0a24df to your computer and use it in GitHub Desktop.
Save Mao8a/9fd9608adc814b2bbddf0483cb0a24df to your computer and use it in GitHub Desktop.
VIDEO: FFMPG command line add subtitles

Convert video

ffmpeg -i /path/to/original/video.mp4 -vf subtitles=/path/to/subtitles.ass /path/to/video.mp4

Download streem

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "https://embedwistia-a.akamaihd.net/deliveries/bb7d4b29e88178fdd5c6839aa15adadbcb904218.m3u8" -c copy video.mp4

Convert str to ass subtitles

ffmpeg -i video.srt video.ass

Burn bubtitles

ffmpeg -i video.mp4 -vf ass=video.ass video-sub-es.mp4

FFMPEG

get strams for ffmpg from youtube-dl

youtube-dl -g youtube_link_org

extract portion of video or audio

ffmpeg -ss 00:00:00.00 -i "audio_or_video_stream_path" -t 00:00:60.00 -c copy output.mp4

combine audio and videoin one file

ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac output.mp4

crop video

ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment