Share your knowledge at the LQ Wiki.
Go Back > Blogs > linux-related notes
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

Speeding up and reducing the quality of podcasts (saving disk space)

Posted 04-29-2017 at 10:49 PM by the dsc
Updated 10-24-2020 at 12:25 AM by the dsc (video-related tip)

An interesting method I now realize is possible:

ffmpeg -i in-normal.mp3 -filter:a "atempo=1.4" -f wav - | lame -q 2 -v --vbr-new -V 9 -b8 -B 20 - out_speedup.mp3
A previous method I was using had sox and for some reason mpg123 or 321 I guess, to generate a "physical" temporary wav somewhere, this method use a pipe instead of an actual temporary file.

The input file isn't necessarily mp3, it can be m4a/aac at least, possibly also webm, I guess, whatever ffpeg can read, which I suppose is a lot of things.

In some cases you can do it all just with ffmpeg, but I just can't find clear documentation on how to achieve a comparable level compression, regardless of reencoding to mp3 or something else. The options are somewhat different, like, instead of specifying the variable bitrate range (given there by "-b 8 -B 20"), you chose just a "quality" level from 1 to 3 or to 5, and that would require to me at least a little bit of testing to see if quality 1 (worst) is simply unintelligible or unecessarily "higher" quality for this purpose.

(and once again I first close "code" with "quote")


I don't know how to speed-up video, but I've just found out how to use variable frame-rates with ffmpeg and x265:

for f in *.mp4 ; do nice -n 18 ffmpeg -i "${f}" -codec:v libx265 -crf 33 -vsync vfr -r 10 -vf mpdecimate  -acodec copy ../"${f}" ; done
That will convert all the mp4 on a folder to x265, copying the audio (but lowering its quality will also be of great help reduzing file size), and drastically reducing the FPS. Adequate only for classes, talks, slide presentations, not anything really movie-like, with such a low FPS.

Where "-r 10" would define an upper limit of 10 frames per second, if I'm not mistaken, and "-vf mpdecimate" would actually drop the most similar frames. Whereas "vsybc vfr" was something that was theoretically supposed to do that, but apparently it does not. Well, maybe conjointly with the other stuff. Movies have traditionally used 24 or 23.97 FPS, animation could go at about 16-12, whereas youtube these days has 30 or maybe 60. But the CRF is possibly doing even more of the size shrinkage than the FPS reduction.
Posted in Uncategorized
Views 2124 Comments 1
« Prev     Main     Next »
Total Comments 1


  1. Old Comment
    Thanks for the great tip!
    Posted 05-29-2017 at 06:08 AM by Kefijoo Kefijoo is offline


All times are GMT -5. The time now is 12:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration