NihAV: released!

NihAV was a fine joke that had been running for far too long. But today, on no particulate date at all, I release it for public to ignore or to briefly look and forget immediately. Some decoders (Bink2, ClearVideo and Vivo 2) are still far from perfect, some features have simple or sketchy implementations, but despite all of that here it is.

The official website is here, source code is here.

Many thanks to people from former Libav project for hosting.

10 Responses to “NihAV: released!”

  1. Paul says:

    WOW this is very interesting.

  2. DrMcCoy says:

    Yay! And thanks πŸ™‚

    The player seems to deadlock (even ctrl-c doesn’t work) with the Bink2 samples I have here, after ~ 2 frames of video and ~ one second of audio. They’re KB2j.

    No such issues with Bink1 or VMD.

    In case that’s not a known issue and/or you’re interested in looking at that, I can provide you with those samples. (Otherwise, I’ll probably have to tackle that some time in the future once I find time for that.)

    And to lay my cards on the table, I’m obviously interested in that Bink2 decoder, for my GPLv3+ (i.e. with the the “or later” clause) project xoreos, since one port of a targetted game uses Bink2 instead of Bink1. I’d welcome your blessing there.

  3. Kostya says:

    That is a known issue related to audio synchronisation (and indirectly – performance) and the reason why I mostly run “player” with -an switch. And that’s one of the reasons why I want to write a proper player instead of what I currently have.

    As for Bink2 – even if the decoder is not perfect (hopefully I can fix the missing bits in some distant future) you’re welcome to reuse it under GPLv3.0+. And maybe there will be VX decoder too one day.

  4. lu_zero says:

    From the intro: `like β€œcan’t you give all of the code under N-clause BSD?”—you’re not rust-av as it is the only project to which I can allow that;`

    Thank you so much Kostya! I hope to get the codecs (and demuxers) working within rust-av w/out annoying you too much πŸ™‚

  5. Bradley says:

    Been reading along for some time now. Congrats and thanks for sharing this development with the larger community. πŸ™‚

  6. Paul says:

    Is there way for SIMD code?

  7. Kostya says:

    In Rust itself you can use SIMD intrinsics from core::arch or modify crate build.rs to invoke e.g. Nasm (like rav1e does). As for NihAV, I didn’t have a need for it so far.

  8. Marcus says:

    Hey Kostya, glad you finally released NihAV, I’ve got my own multimedia framework that I’ve just refactored to split out formats and codecs, and to support containers which can contain some combination of them.

    Anyway, I noticed you have a Codec Registry in NihAV, that’s the same kind of setup I’m trying to do in C with a struct for each decoder/encoder/muxer/demuxer and a designated initializer for each instance.

    The only problem is, I can’t figure out how to have the compiler add all the designated initializers to a global array at compile time (without manually hardcoding it, anyway)

    Do you have any ideas on how to solve this problem?

  9. Marcus says:

    Sorry, forgot to mention, my multimedia framework is called OVIA, it’s a pronounceable acronym for Input, Output, Audio, Video.

    It’s only dependency is my other library, FoundationIO which includes support for bit reading/writing, complete support for Unicode, command line argument parsing/automatic help page generation, logging, string formatting, random number generation/cryptography, and I’m trying to write a user space network stack and test framework.

    Currently OVIA supports PNG/lossless JPEG/bmp/pnm and FLAC/WAV/W64/AIF audio codecs/formats.

    The link is clickable in my name if you’re interested.

  10. Kostya says:

    Hej Marcus, there’s an old trick for what you’re trying to do. It’s not very portable but should work fine for ELF and probably for PE: you declare a special segment for your array and tell compiler that all individual entries should be put into this segment. IIRC tcvp used that and you can see the same trick employed in omapfbplay (from the same author). For M$VC there’s const_seg/data_seg pragma that should work the same.

    And looks like your project has grown up significantly since the last time you mentioned it here. I hope it’s both fun and learning for you.