Why I work on NihAV

I started NihAV as a more or less toy project to play with different concepts and try new stuff like finding out how vector quantisation works or attempting to write an encoder. Having enough experience with libavcodec and libavformat, I did not want to touch them again (and still don’t) and there was a hope that rust-av will provide a viable albeit limited alternative for multimedia playback (it still hasn’t). In theory I’ve achieved my original goals—NihAV supports decoding a lot of exotic formats (some of which are not handled by any other open-source project), it even has some encoders and its own transcoder tool and there’s even two players (one for audio files, another one can also play videos). So I could relax and do something else entirely but yet I’m working on adding new features to NihAV that take a lot of effort and do not bring me joy. Why?

Mostly because jbmpeg is getting uglier by a day and there’s no real alternative to it (many other opensource player rely on it for demuxing and decoding for a lot of things, and rust-av has failed to develop). So I’d rather not to rely on it even if purely out of aesthetic concerns. And considering the way Linux is turning into systemdOS I’ll probably have to switch OSes one day as well so it’s better to have something ready for that time as well.

As for my concerns about the project formerly known as FFmpeg, let me use a car analogy.

There was a guy named Crapo who, fittingly enough, founded an American car company and concentrated on merging new features car brands into his company (which was later renamed to General Motors, you might’ve heard about it). This was more of a mania than business strategy to him so he ended up owning a lot of money, so he was kicked away from the project company. Yet he had not given up, co-founded yet another car company and managed to wrestle control over GM once again (which is a more impressive business accomplishment than Steve Jobs return via NeXT). And yet his merging habits haven’t changed so he was kicked away for the second and final time. There’s an anecdote that there was one even preceding this: at the board meeting he was asked why he decided to merge a company producing refrigerators and his reply was that it’s not that different from a truck—both are essentially boxes with a motor inside.

Back in the day FFmpeg had a problem of not having any rules so certain developers could do whatever they wanted. So other developers decided to join efforts and make the project both cleaner and more organised. This was known as The Split and resulted in an ugly (even is somewhat one-sided) war of CEmpeg and Libav. And even if Libav lost it and now it’s mostly a forgotten project, it induced some positive changes in CEmpeg (for example, it has finally switched to Git and started making releases).

But now the history demonstrates once again that the only lesson it can give is that nobody learns anything from history. A certain developer (those who know, know; those who don’t—it’s not a personal attack) considers the project his private playground and decides to add a certain feature that has no relation to the project goals, is more complex than the rest of the project and thus is met with the resistance from those developers who understand that. And instead of back-pedalling, that developer merely puts it into separate branch in the project (not his own) repository and resolves to various tricks to sneak it into the main repository without opposition or reviews. The reasoning seems to be mostly because it’s a feature and he wants to make existing developers to work on it instead of starting a new project and trying to build a community specifically for that.

Mind you, it provides me with entertainment (replacing Twitter, which no longer easily accessible to a casual lurker without an account like me) and I’m not going to tell what the project should be doing. I merely want to point out that it hints on some internal troubles within the projects and that the things may get ugly in the near future (not necessarily because of this event, there are more developers there believing that no rules in the project apply to them; and they may be right too).

You may ignore it all and live happily despite all those hidden problems in a project you have no reason to care about. I, on the other hand, see this mess and wish not to deal with it even merely by being a user. Since there are no viable alternatives and the usual answer to such complaints is “build your own with blackjack and hookers“, that’s exactly what I’m doing. NihAV: building castles on a swamp since 2015.

11 Responses to “Why I work on NihAV”

  1. I wonder what this feature could be. I bet it’s that damn MSRLE encoder..

  2. Kostya says:

    It could’ve been XML parser or TCP support for all I care.

  3. Peter says:

    Firstly, I love radio comms so happily enjoying the discussion. Also reminded the last time I tried to do something a edgy in FFmpeg (hello AV_SAMPLE_FMT_DSD) that got shot down by the majority. The current FFmpeg DSD solution is utter crap.

    Excellent point about twitter. My daily entropy has gone down, now left to read our propaganda stories on Hacker News about NASA achievements, etc.

  4. Kostya says:

    The main differences with you are a) DSD support was accepted and only the implementation form was discussed and b) you accepted that decision.

    Again, to me it does not matter what the actual feature was discussed but rather the circumstances around it. Even if it’s currently the largest drama, it’s not the first one and it’s not the only developer behaving that way.

    I can compare it to the cracks in bridge support. Maybe that one is not fatal, and neither that one, and that one too—but in general it hints on a problem with bridge integrity so I’d rather take a precaution and not walk on it.

    P.S. Hacker News gets better if you browse its submissions by time and filter out links to the major newspapers. Then you have a chance to pick out something interesting.

  5. Person says:

    I never was a big Hacker News or Twitter person. These days I get my news from 4chan’s /g/ technology board, Reddit, and Lobsters.

    There’s a MPV/FFmpeg/yt-dlp general on /g/ that I follow from time to time.

  6. Kostya says:

    Whatever works for you, though recent Reddit behaviour also proves that it’s always good to have an alternative in mind as some internal squabble may turn ugly for the users.

  7. Paul says:

    Why is DSD support crap? Are you one of those golden plated audiophiles?

  8. Kostya says:

    I suspect he meant the way it’s supported in libavcodec, not the format deficiencies. E.g. it should be a raw audio format that various decoders like WavPack can output to without a need to convert to some other format first.

  9. Peter says:

    @Kostya: Indeed there are a lot of cracks. I like the bridge analogy!

    @Paul: Not audiophile. Just interested in lossless conversion between formats (DSD to DST compressor?) and use of dedicated 1-bit DAC hardware. Decoding the DSD or DST bitstream only to PCM, which is what FFmpeg does now, prevents these capabilities. But I am thankful for you for merging these patches, as it at least enables people to listen to DSD files and SACD rips 🙂

    (FYI: 4chan is blocked by the Australian Government at ISP level. But I will pay closer attn to /g/, thanks!)

  10. Paul says:

    Why this blog almost always propagates viral mindsets like certain FFmpeg developers.

  11. Kostya says:

    Because I was one and I’d like more people to think for themselves?