summaryrefslogtreecommitdiff
path: root/guides/ffmpeg.org
blob: eded0e965051c6d8a6005c0563c9b32a5b777476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ffmpeg recipes I should stuff into config files or scripts, but
haven't yet.
* Extracting parts of videos
~-c copy -map 0~ ensures all streams (audio & subtitles) are kept.
The timestamp syntax is described in the "Time duration" section of
=ffmpeg-utils(1)=; =MM:SS= works fine.

#+begin_src sh
ffmpeg -i $input -c copy -map 0 \
       -ss $tstart -to $tend    \
       $output
#+end_src

* Reduce file size
** with =-vf=: ~-vf "scale=iw/2:ih/2"~
** with H.265
openSUSE Tumbleweed's ffmpeg is not built with H.265 support AFAICT.

1. Install =libx265-devel=
2. Clone =https://git.ffmpeg.org/ffmpeg.git=
3. ~./configure --enable-libx265 --enable-gpl~
4. ~ffmpeg -i $input -vcodec libx265 -crf 28~