Difference between revisions of "Video Encoding"

From TheBeard Science Project Wiki
Jump to: navigation, search
(Created page with " = Encoding in H.265 = I've seen very good quality and significantly smaller file sizes in videos encoded with H.265. <source> ffmpeg -i infile.mp4 -c:v libx265 outfile.pm4...")
 
(AV1 Codec Testing)
 
(11 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
<source>
 
<source>
ffmpeg -i infile.mp4 -c:v libx265 outfile.pm4
+
ffmpeg -i infile.mp4 -c:v libx265 outfile.mp4
 
</source>
 
</source>
 +
 +
= Deinterlacing =
 +
 +
<source>
 +
ffmpeg -i 000000.MTS -vf yadif -c:v libx265 outfile.mp4
 +
</source>
 +
 +
= Timelapse From Image Files =
 +
 +
In the terminal, go into your folder full of images.
 +
<source lang="sh">
 +
neuro@gamma:~/timelapse$ ls
 +
DSC05145.JPG  DSC05163.JPG  DSC05181.JPG  DSC05199.JPG  DSC05217.JPG
 +
DSC05146.JPG  DSC05164.JPG  DSC05182.JPG  DSC05200.JPG  DSC05218.JPG
 +
DSC05147.JPG  DSC05165.JPG  DSC05183.JPG  DSC05201.JPG  DSC05219.JPG
 +
DSC05148.JPG  DSC05166.JPG  DSC05184.JPG  DSC05202.JPG  DSC05220.JPG
 +
...
 +
</source>
 +
 +
Create a timelapse of all files, with a framerate of 20fps:
 +
<source>
 +
ffmpeg -r 20 -f image2 -pattern_type glob -i "*.JPG" -c:v libx265 ../out.mp4
 +
</source>
 +
 +
Create a timelapse starting from file 05200, with a total of 30 frames:
 +
<source>
 +
ffmpeg -r 20 -f image2 -start_number 05200 -i DSC%05d.JPG -frames:v 30 -c:v libx265 ../out.mp4
 +
</source>
 +
<i>Note: the "%05d" means zero-padded 5-digit number.</i>
 +
 +
= AV1 Codec Testing =
 +
 +
I decided this section would be cleaner if I put it on its own page: [[AV1 Codec Testing]]

Latest revision as of 17:32, 11 March 2020

Encoding in H.265

I've seen very good quality and significantly smaller file sizes in videos encoded with H.265.

ffmpeg -i infile.mp4 -c:v libx265 outfile.mp4

Deinterlacing

ffmpeg -i 000000.MTS -vf yadif -c:v libx265 outfile.mp4

Timelapse From Image Files

In the terminal, go into your folder full of images.

neuro@gamma:~/timelapse$ ls
DSC05145.JPG  DSC05163.JPG  DSC05181.JPG  DSC05199.JPG  DSC05217.JPG
DSC05146.JPG  DSC05164.JPG  DSC05182.JPG  DSC05200.JPG  DSC05218.JPG
DSC05147.JPG  DSC05165.JPG  DSC05183.JPG  DSC05201.JPG  DSC05219.JPG
DSC05148.JPG  DSC05166.JPG  DSC05184.JPG  DSC05202.JPG  DSC05220.JPG
...

Create a timelapse of all files, with a framerate of 20fps:

ffmpeg -r 20 -f image2 -pattern_type glob -i "*.JPG" -c:v libx265 ../out.mp4

Create a timelapse starting from file 05200, with a total of 30 frames:

ffmpeg -r 20 -f image2 -start_number 05200 -i DSC%05d.JPG -frames:v 30 -c:v libx265 ../out.mp4

Note: the "%05d" means zero-padded 5-digit number.

AV1 Codec Testing

I decided this section would be cleaner if I put it on its own page: AV1 Codec Testing