Marc's Public Blog - Linux Hacking


vvv Click on the categories below to see other topic specific pages vvv



>>> Back to post index <<<

π 2025-08-13 01:01 in Linux
This is an update to My vidcomp script to recompress to h264, h265, VP9 and AV1 amongst other things

After a bit over half a year using it, I figured out that while indeed I don't want to use h265 since it does not decode in every app for licensing issues. At the time, I had also figured out that in ffmpeg, AV1 which is supposed to be even better than VP9, was indeed slower, but not better as far as compression ratio is concerned, or barely enough to matter.

Since then, I came to realize that vp9 is definitely at least 2x slower to encode compare to h264. Originally I considered going back to h264 but then I saw the terrible video quality for lights and lasers, so I'm going to eat the time delay. I will see if for recompressing IG videos before I can merge them, maybe it's fine to use h264 for speed.

vp9 vs av1 comparison and flags:
https://jonathanmh.com/p/encoding-webm-videos-with-ffmpeg-vp9-av1
Gemini says: Compression Efficiency

  • AV1: Offers the best compression efficiency, resulting in smaller file
  • sizes for a given quality level
  • H.265: Provides significant improvements over H.264, offering better
  • compression than VP9 in many cases
  • VP9: While not as efficient as H.265 or AV1, it still offers decent
  • compression and is widely supported.

    Encoding and Decoding Speed:

  • AV1: Requires more computational power for encoding and decoding,
  • which can impact performance on older hardware
  • H.265: Offers a good balance between compression efficiency and
  • encoding/decoding speed.
  • VP9: Generally faster to encode and decode compared to AV1.
  • # x264 (H.264) Fastest # libvpx-vp9 ~5–10× slower than x264 => my test shows single pass is 2x slower than h264 2 pass # libaom-av1 ~20–50× slower than x264 (depending on settings) # # VP9 (libvpx-vp9): VP9 is a more modern and complex codec. It performs a much # more exhaustive analysis of the video to find better ways to compress it. This # allows it to achieve the same visual quality at a 20-50% smaller file size than # H.264, but this complex analysis requires significantly more CPU time.

    # C0012_H264_orig.mp4 (sony camera 1080p h264) # C0012a_mencoder_H264_4:34.mp4 => terrible quality # C0012b_ffmpeg_H264_2:08.mp4 => better quality and 2x faster encode # C0012c_VP9_4:19.webm => decent enough # C0012d_AV1_22:03.webm => tiny bit better?

    # h4 9mn 91MB => join worked # h4ff 15mn 93MB => non matching but can read android h265 that mencoder cannot # vp9 45mn 102MB => join worked # av1 65mn 93MB => join worked

    Vp9 is around 2x slower than h264 but the output quality is definitely better. Doing single pass over 2 pass still gives decent output. Maybe for IG video stories, which has taken over 24H in the past for just 1 to 2H of video, I'm going to go back to h264 for speed's sake.
    Never a dull moment indeed, doing video is really a lot more work than pictures....


    More pages: July 2002 February 2004 March 2004 November 2004 April 2005 August 2005 January 2006 July 2006 August 2007 November 2007 December 2007 January 2008 October 2008 November 2008 December 2008 January 2009 May 2009 July 2009 August 2009 September 2009 November 2009 December 2009 January 2010 March 2010 April 2010 June 2010 August 2010 October 2010 January 2011 July 2011 August 2011 December 2011 January 2012 March 2012 May 2012 August 2012 December 2012 January 2013 March 2013 May 2013 September 2013 November 2013 January 2014 March 2014 April 2014 May 2014 October 2014 January 2015 March 2015 May 2015 January 2016 February 2016 March 2016 June 2016 July 2016 August 2016 October 2016 January 2017 September 2017 January 2018 March 2018 December 2018 January 2019 August 2019 January 2020 May 2020 January 2021 September 2021 March 2023 April 2023 December 2023 June 2024 September 2024 November 2024 July 2025 August 2025 October 2025 November 2025

    >>> Back to post index <<<

    Contact Email