# Media : ffmpeg : Cookbook ``` To copy 30m subsection starting 15m in: $ ffmpeg -i <input> -ss 00:15:00 -t 1800 -acodec copy -vcodec copy <output> To convert to H.265 (HEVC): (lower CRF = large size, better quality) $ ffmpeg -i <input> -c:v libx265 -preset medium -crf 22 -c:a aac -b:a 128k <output> To concatenate files using a manifest file: Create a filelist file with the list of file inputs (rel or abs paths, # comments supported): # mylist.txt file '/path/to/file1' file '/path/to/file2' file '/path/to/file3' Then you can use the file stream copy or re-encode your files: $ ffmpeg -f concat -i mylist.txt -c copy <output> To create a time-lapse video from another video: ffmpeg -i <input> -r 1 -f image2 tmpdir/%05d.png ffmpeg -r 15 -start_number 00001 -i tmpdir/%05d.png -vcodec libx264 output.mp4 ```