Hacker News new | past | comments | ask | show | jobs | submit login

" FFmpeg is a huge mess compared to libav"

I assume this is an unbiased opinion as much as it can be but could you elaborate on what about FFmpeg is a "mess."

I've used both these libraries in building MythTV from strictly a user perspective. Both code bases are open source. I'm wondering if there is so much turmoil here, why doesn't someone (like VLC) take the best features from both projects and create their own library?

I never understood the OSS communities. It just seems simple to me. If you don't like it, fork it and do your own.

<shrug>




> why doesn't someone (like VLC) take the best features from both projects and create their own library?

Because that in itself would be a huge project, with moving targets as the source projects develop over time. If it were that easy the VLC people would just implement everything themselves and not need either library.

> I never understood the OSS communities. It just seems simple to me. If you don't like it, fork it and do your own.

The problem is, of course, the humans.

People sometimes take things very personally even when not meant that way. A significant fork for no good reason can distract from the work of the core project and dilute the user-base, and people will not always agree on what a good reason is/n't. Sometimes the problem is stated as poor code and/or procedure quality, and this can be taken as a rather direct insult.

Sometimes massive forks happen because of differing priorities between different groups of people and everything is perfectly amicable - you don't hear about these cases much (unless it inconveniences the userbase) because there is no drama to make a noise about. Sometimes these forks later re-merge, sometimes one becomes clearly superior and the other fades out, sometimes they go on to be completely separate projects.

It sounds like three are personal issues involved in this particular mess that we don't exactly know about so can#t hope to fully understand because the discussions started in private and have not been published and as we all know any argument, especially one that has gone on for some time, people can lose track of the true chronology of the issue and that can make reconciliation near impossible.


I agree with everything you say however, if the two things you rely upon are, in their own words, such a mess then I have to imagine that mess consumes an equal if not more inordinate amount of time to integrate with.

I'm a software developer too. In my career I've had to implement logic to work around buggy libraries, spend time looking into bugs in others code... It seems that at some point that the means don't justify the end and having my own code base that I'm familiar with would be easier than fixing theirs and waiting for disputed parties to figure out what they are going to do.

And I never claimed doing your own was easy. All I'm suggesting is that at some point it's easier than dealing with what you got.


> I assume this is an unbiased opinion as much as it can be but could you elaborate on what about FFmpeg is a "mess."

Examples: 2 prores decoders, 2 prores encoders (or 3), 2 different resampling libraries, libstagefright integration that does not work, more global context structures compared to libav, etc... They also refused to remove some very outdated (non-working) code like xvmc.

> why doesn't someone (like VLC) take the best features from both projects and create their own library?

Because it's a lot of work. An enormous work.


If I remember correctly, a big part of the reason that ffmpeg ended up with two resampling libraries is that after they'd created theirs, libav wrote their own with a different, totally incompatible API and ffmpeg wanted to support applications that were written for the libav API.


"There is a reason for everything"

Scott Meyers, talking of the various… quirks of C++. https://www.youtube.com/watch?v=48kP_Ssg2eY


For what it's worth, a lot of production code looks this way. It's not right, it really should be nice and neat and so on. However, I don't see it as a grave sin against the project. Messy code can diverge where needed more easily.

Three different copies of the same code? Yeah, ok. That's ok. One day, when you can, merge them together. You can't merge them together? It's ok. Maybe they shouldn't be merged together.

Is it a barrier to entry for new developers? I feel that any developer who has worked on messy legacy code won't bat an eye. This sounds more like a problem experienced by a young coder fresh out of university.

You definitely can write clean code. Cleanliness can be a priority. There are some surprisingly clean and well-written large codebases out there. However, a lot of people just don't care. They are very smart, capable people who just bang out code that works and don't care to integrate in the proper clean way with the old code.

If you want clean code, an old, large, working C/C++ codebase is not what you want. We often can't spend time cleaning up old code, since there's always more features to implement, bugs to fix, etc. Learn to deal pragmatically with code like that. It's not like that out of malice, or some misguided attempt at writing the largest IOCCC winner. You can work with it. It's just a bit trickier.


I've worked on some of those "old, large, working C/C++ codebases" and the ones that are not clean are the ones where you are terrified of making a small change to fix a bug, especially close to release, because you have absolutely no idea what might break. Two copies of the same code? Great, which one do I fix? Both? How do I test that it worked, I can't even figure out where #2 is activated in the UI?! Is there something a little different about them that I need to watch out for? And test cases for said codebase? Hahahahaha!


Writing clean code is not an academic exercise. It means comprehending it takes longer, writing features takes longer, testing it takes longer. It makes every interaction with the codebase harder.

That might not be quite as bad in a proprietary codebase since you have somewhat more of a captive audience, but in an open source project where you want a long-tail of contributions from many people, that is a serious problem.


Having multiple implementations of a feature does not make it a "mess" unless they step on each other's toes.


I never understood the OSS communities. It just seems simple to me. If you don't like it, fork it and do your own.

https://xkcd.com/927/


> If you don't like it, fork it and do your own.

The issue is the "you" implied there. So you fork it and start working on your own. What do the other contributors working on the previously-existing project do?

This seems to resolve itself when there's a clearly superior project and developers and distributions switch to the newer project.

However, if both projects continue to simultaneously develop...


> I'm wondering if there is so much turmoil here, why doesn't someone (like VLC) take the best features from both projects and create their own library? These days I just use gStreamer which can wrap either one in a sane API and is 1000x easier to extend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: