[sudo-discuss] how to speed up a video file and reduce its size?

Jake jake at spaz.org
Fri Oct 9 13:11:12 PDT 2020


OMG thank you so much, this is great help everyone!!!

some operations take a long time and some are quicker, i'm trying to hone in on
the ones that are quick and dirty, rather than re-encoding everything.  It's so
hard to understand the documentation!!!

I'll try these commands and take notes on what works and what doesn't.  Feel
free to let me know if you're interested in the results!

one thing i've been working with is that i'm doing concatenation at the same
time... so much obscure arcane procedure that you just find on the web and try
until it works.

And i was having troubles until i realized that the hard drives in the server I
was accessing were slowly dying off from overheating...

On Thu, 8 Oct 2020, Sean Greenslade wrote:

> On Wed, Oct 07, 2020 at 11:19:36PM -0700, Carl Gorringe wrote:
>> Hi Jake,
>>
>> According to my notes...
>>
>> To double the speed of a video:
>> $ ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS” output.mp4
>>
>> Use -an to disable audio:
>> $ ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" -an output.mp4
>>
>> Use 0.333 instead of 0.5 for 3x speed. 0.05 for 20x.
>>
>> cheers
>> -Carl
>
> Some other tricks to squash file size:
>
> If you don't need to do any seeking during playback and the scene is
> mostly static, you can extend the keyframe interval with encoder
> parameters. You can also tweak the quality target with crf (0 to 63,
> higher is lower quality):
>
> $ ffmpeg -i input.mp4 -an -filter:v "setpts=0.125*PTS" -c:v libx264 -x264-params "keyint=1000:crf=27" out.mkv
>
> And if the contents of the video have truly static portions (like a
> screencast, for example), you can use the "-tune animation" option.
>
> For encoding speed, I think the libx264 encoder uses all threads by
> default, but there is a -threads N option if it doesn't.
>
> --Sean
>
> _______________________________________________
> sudo-discuss mailing list
> sudo-discuss at lists.sudoroom.org
> https://sudoroom.org/lists/listinfo/sudo-discuss
>


More information about the sudo-discuss mailing list