Compression

FFMPEG video size reduction

What are your techniques to minimize filesize? I'm trying to fit an hour long album into Holla Forums's 8mb limit, and I've gotten it down to 20mb but I need to go further.

What do you recommend?

This is the command I'm using:
ffmpeg -i "file.mp4" -crf 63 -c:v libvpx -b:v 40K -b:a 50K -vf scale=24:24 -r 1 -threads 8 file.webm

Other urls found in this thread:

a.pomf.cat/brvvqo.opus
a.pomf.cat/usgtpv.opus)
a.pomf.cat/brvvqo.opus'Input
a.pomf.cat/brvvqo.opus':
lists.xiph.org/pipermail/vorbis/2003-August/023979.html
pouet.net/prod.php?which=64861
twitter.com/NSFWRedditVideo

You encode the cover image at 1fps for the video stream, dumbfuck. And concat all of the audio together and choose your bitrate there.
Ultimately I recommend using a non-shit site or posting the songs one after the other.

...

Post it on a site where the limit is up to 350MB maybe? What's the point of posting something at ultra-shit-tier quality?

Because I want to

then choose libvpx-vp9 for video, use two passes and lower -b:a even further and use opus for audio
The result will invariably be misunderstood for a whale song but hey have fun wasting time

16kbit/s opus sounds fine tbh

I'm talking about the fact that he's converting a video stream, and not just -r 1 -loop 1 an image, not from a videostream that has already been encoded.
You'd also use concat for all of the audio files.
All of this shit is documented in the ffmpeg wiki.

function flac_to_webm(){ ffmpeg -i "$1" -i "$2" -c:v libvpx-vp9 -crf 10 -pix_fmt yuv420p -vf "sws_flags=lanczos; scale=255:-1" -c:a libopus -ar 48000 -ac 2 -compression_level 10 -$}
Even better, 1 frame per video.

Fug, nano cut it.
ffmpeg -i "$1" -i "$2" -c:v libvpx-vp9 -crf 10 -pix_fmt yuv420p -vf "sws_flags=lanczos; scale=255:-1" -c:a libopus -ar 48000 -ac 2 -compression_level 10 -b:a 96K "${1%.*}.webm"

This is default

Read man ffmpeg-all and look for libopus. There are 2 options there which might interest you:

1. frame_duration -- maybe you can set this higher and get away with a lower bitrate
2. cutoff -- see how much cutoff you can get away with without making it sound like shit

For some reason, with the few songs I've picked, I can't tell the difference between an opus encoded with:
-cutoff 12000 -b:a 20k -frame_duration 60
And one encoded with:
-b:a 30k

But other than that they both don't sound nearly as good as 40k. Acceptable though especially if it's for demonstration purposes.

I use lrzip for folders, webp for images
I don't really want to use 5 gorillion file types so I take the small hit in file size as a compromise.

...

did I dun gud Holla Forums?

you need to do two pass when encoding

ffmpeg -i $1 -c:v libvpx -quality good -threads 3 -qmin 10 -qmax 42 -b:v $2 -pass 1 -f webm /dev/null && ffmpeg -i $1 -c:v libvpx -quality good -threads 3 -qmin 10 -qmax 42 -b:v $2 -pass 2 -f webm ${1}.webm

$1 is filename, $2 is video bitrate

ofc change the other parameters as you need and use vpx9

The only problem with my method, is that you must load the entire webm before it starts playing.

You should download Hybrid (encoder GUI)
It has a "target size" option.

Use VP9 for video and Opus for audio.

If you only want audio, just exclude the video. Chrome plays it fine.

can it be done? overhead is like 500kb or so. than that leaves 7.5mb for audio. even at 16kb there isnt enough room.

It's not 7.5 millibits, it's 7.5 megabytes. 16kbps comes out to 7.2MB per hour.

Turn it into a midi hosted elsewhere or give up.
As if that's not shit enough, you'll be lucky to have it listenable at all at dialup-age 8kb/s or lower.

How about being smart and
JUST MAKE A VIDEO PER SONG

Wasn't shitchan+infinshitty supposed to get MP3 support at some point anyway? Where the fuck is that?

Holy shit, I never realized opus had such good quality for low bitrates. I was going to upload a sample, but it appears I can't upload it here so....
a.pomf.cat/brvvqo.opus

Sorry to say OP, but it seems like with the math done by everyone else 16kb/s CBR Opus is going to be your limit
(which is a.pomf.cat/usgtpv.opus)
which may be impressive on paper, but not so much to the ears.

ffprobe 'a.pomf.cat/brvvqo.opus'Input #0, ogg, from 'a.pomf.cat/brvvqo.opus': Duration: 00:03:12.80, start: 0.000000, bitrate: 52 kb/s Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp Metadata: ENCODER : OpenMPT 1.26.02.00 SOURCEMEDIA : tracked music file TITLE : Nature Suxx DATE : 2016 BPM : 220.588
How retarded are you? Is this Holla Forums?

Not him but stereo makes a huge difference to the quality of a song in my opinion

Don't worry about that format. Let it die. It has no redeeming qualities.

Pretty neat that at that bitrate it sounds almost like a native tracker file.

what's wrong with stereo audio

use CVBR

go be fat somewhere else

It takes double of filesize, retard. When you have extreme constraint, you prefer double the bitrate over two channels.

Unless you are using Opus the quality will suffer tremendously and even with Opus going below ~64k is critical.
Also can't you just upload a .mp3 or in case of Opus a .ogg?
Best way to go is just uploaing it somewhere else where you have more space available.

Another spectacular /lamer/ arguments thread.

If you were worth anything, you would know people already made some attempts with Vorbis (Floggy, lists.xiph.org/pipermail/vorbis/2003-August/023979.html , included in GT3/aoTuV as q-2), and there's probably some way to experiment with Opus to sacrifice its low latency and enable some kind of full length look-ahead to make it behave more like a general purpose compressor with a hundred megabyte window. No one is seriously interested in that because everyone who needs those bitrates only works with speech, and they already have a dedicated speech codec.

Also, people stream videos from floppy on a fucking original Amiga — pouet.net/prod.php?which=64861 — you need to step it up.

Even with joint stero, the losses are big when you gotta go under 32k.

Why do you want your videos to be as shitty as possible?

Fuck off nigger, it works and is useful.


Now stereo is bad? I knew Holla Forums was full of shit and stupid opinions but this takes the cake.


Take your meds.

This was from the one I encoded at 48kb/s though.
The funny thing is, I reencoded the 16kb/s one in mono, and it didn't sound much different, sooooooo.

...

Change your ears, m8. The differences in quality are obvious, even if the loss of stereo is worse for music.

Here, make the difference yourself.

I always forget firejail.

Why are you using CRF and bitrate (via -b:v)? CRF is meant to encode a variable bitrate at a constant quality, but you're also setting a constant bitrate, cancelling that out.

Also, what is "file.mp4"? If it's just a still image with the audio, then you're probably wasting masses on video. Just take an image of the album art or whatever and have that as your video input. WebMs work fine that way.

Please RTFM.

Why am I not surprised it's weebshit you're making weebms of?

Supporting .opus files or at least video-less WebMs would be fine

That's not going to happen, because Jim is a stupid pigfucker.

Is there a free as in free software program to check weather or not a webm i encode is the same or similar to a webm i already have?

pls

who's the artist of that clip?

That's the only example I had in my $HOME. I have 265GB of flac too.
Shit taste, by the way.

This was for the sake of the argument, m8. My source is actually the OST bundled with the BD. Amazing quality with full dynamic range.

nvm found it