From 560ecac9425349c9e6a4ed439371db4199651191 Mon Sep 17 00:00:00 2001 From: o0nd7ots <124466962+o0nd7ots@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:50:28 +0000 Subject: [PATCH] ffmpeg: update page (#12443) * ffmpeg: update page --------- Co-authored-by: Fazle Arefin Co-authored-by: K.B.Dharun Krishna Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/common/ffmpeg.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/common/ffmpeg.md b/pages/common/ffmpeg.md index f8d6ede14..9335be752 100644 --- a/pages/common/ffmpeg.md +++ b/pages/common/ffmpeg.md @@ -7,6 +7,10 @@ `ffmpeg -i {{path/to/video.mp4}} -vn {{path/to/sound.mp3}}` +- Transcode a FLAC file to Red Book CD format (44100kHz, 16bit): + +`ffmpeg -i {{path/to/input_audio.flac}} -ar 44100 -sample_fmt s16 {{path/to/output_audio.wav}}` + - Save a video as GIF, scaling the height to 1000px and setting framerate to 15: `ffmpeg -i {{path/to/video.mp4}} -vf 'scale=-1:{{1000}}' -r {{15}} {{path/to/output.gif}}` @@ -15,13 +19,9 @@ `ffmpeg -i {{path/to/frame_%d.jpg}} -f image2 {{video.mpg|video.gif}}` -- Quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: - -`ffmpeg -ss {{mm:ss}} -i {{path/to/video.mp4}} -frames 1 -s {{128x128}} -f image2 {{path/to/image.png}}` - - Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end): -`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/video.mp4}} -codec copy {{path/to/output.mp4}}` +`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/input_video.mp4}} -codec copy {{path/to/output_video.mp4}}` - Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23: