mewspring / smk

A Smacker video and audio decoder library in Go.
The Unlicense
5 stars 0 forks source link

Relation to libsmacker #1

Open sskras opened 6 years ago

sskras commented 6 years ago

It seems nice to have independent implementation, but have you ever heard about the libsmacker lib written in C? http://libsmacker.sourceforge.net/

GH mirror / fork: https://github.com/JonnyH/libsmacker

Found it some minutes ago. As both projects rely on information from multimedia.cx, have you thought about contributing to the lib or vice versa?

mewmew commented 6 years ago

Hi @sskras!

It seems nice to have independent implementation, but have you ever heard about the libsmacker lib written in C? http://libsmacker.sourceforge.net/

libsmacker seem like a great resource, especially for implementation in C/C++ game engines. We've not looked at libsmacker specifically, but we've previously looked at the FFMPEG sources for Smacker decoding:

https://github.com/FFmpeg/FFmpeg/blob/master/libavformat/smacker.c

Found it some minutes ago. As both projects rely on information from multimedia.cx, have you thought about contributing to the lib or vice versa?

I would believe that libsmacker is feature complete? Thus, we'll probably keep implementing the Smacker decoder mostly independently, and then use it to cross-validate the implementations. If something differs we'll try to open up issues for either libsmacker or FFMPEG. As such, we'll try to refrain from looking at the source code, at least to start with :)

As with most projects, this is for educational purposes and to have fun.

In the end, I think it makes most sense to convert the *.SMK videos to modern file formats with open specifications, and then use decoders for these to implementing video playback in Devilution for instance, as indicated by @galaxyhaxz in https://github.com/diasurgical/devilution/issues/17#issuecomment-400065929

I think once we get Diablo running on linux, we could make a script which will convert all assets in the MPQ to open source formats. The script could use the Rad tools to convert the .smk to an open source format. Then repack everything back up into a .zip format, so we don't need the MPQ library at all!

sskras commented 5 years ago

BTW, the FFmpeg code is under LGPL license, while this project is under Unlicense. It seems to be illegal even to translate the source code into another language: https://softwareengineering.stackexchange.com/questions/151515/rewrote-gnu-gpl-v2-code-in-another-language-can-i-change-a-license#151516

Which is a bit sad.

mewmew commented 5 years ago

@sskras That's mostly fine I think. No code has been derived from FFmpeg. We only look at the source code in the sense that we treat it as one reference to learn about the file format specification. So, we should still be able to release the source code of this project into the public domain.

That being said, this project is on hold as other things are more exciting to explore as of current :)

Edit: for further reference, the file format specification upon which we base our understanding and implement the code for parsing these video files is located here: https://wiki.multimedia.cx/index.php?title=Smacker

Edit2: also, as noted above in https://github.com/mewmew/smk/issues/1#issuecomment-403118375,

As such, we'll try to refrain from looking at the source code, at least to start with :)