Page 1 of 1

ffmpeg vs tsmuxer

Posted: Fri Jul 13, 2012 10:26 am
by Jeymz
I've been playing with ffmpeg lately and I managed to produce an m2ts file that my picky Sharp TV actually was willing to play.

Maybe it is time to move away from tsmuxer? Not that I dislike tsmuxer, I had a lot of fun with it. However, tsmuxer isn't open source and there is no ARM version. If UMS can function in the same way with ffmpeg then smaller NAS would finally be able to serve mkv's.

I'm not an expert, but I assume ffmpeg might be able to include subtitles?

What's your opinion?

Re: ffmpeg vs tsmuxer

Posted: Mon Jul 16, 2012 4:41 pm
by SubJunk
They both have different purposes, so one probably won't replace the other; tsMuxeR is used by UMS to send separate video and audio streams together, which allows us to mix and match video/audio for compatibility, while FFmpeg is used for encoding.
It's probable that in the future FFmpeg will replace MEncoder, but not tsMuxeR (though there may be another replacement for tsMuxeR)

Re: ffmpeg vs tsmuxer

Posted: Mon Jul 16, 2012 9:32 pm
by Jeymz
I was indeed specifically talking about remuxing, although ffmpeg can of course both remux and reencode.
I should have made myself more clear: I managed to remux an mkv containing h264 into an m2ts with just ffmpeg. (Both my TVs cannot play mkv's)
This didn't work with earlier versions of ffmpeg (Earlier ffmpeg-produced m2ts-files where unplayable on my TVs) and seems to be a new development, which I'm trying to bring your attention to. ffmpeg may not be perfect in this aspect yet, but I still think it is worth investigating, because of the transparency (due to open-source) and the new possibilities like subtitles and ARM-support.

Re: ffmpeg vs tsmuxer

Posted: Mon Jul 16, 2012 9:56 pm
by SubJunk
Jeymz wrote:because of the transparency (due to open-source) and the new possibilities like subtitles and ARM-support.
I do love to always use open-source projects :) It could be good to use FFmpeg instead of tsMuxeR for some things. It couldn't be a full replacement yet but that would be cool eventually, if they end up going down that road.
As it is, we are slowly transitioning from MEncoder to FFmpeg, because FFmpeg already does most things MEncoder can do and does them better. However there is still some functionality that is holding us back from making the full switch.

Re: ffmpeg vs tsmuxer

Posted: Sat Jul 21, 2012 7:10 am
by Skylion
I am curious how is ffmpeg any better? I thought mencoder utilized ffmpeg along with other codecs, so doesn't that mean that any advantageous features that are added to ffmpeg supplement mencoder's features? Just curious as I really I want to make sure I am getting the best possible transcoding quality.

Re: ffmpeg vs tsmuxer

Posted: Sat Jul 21, 2012 7:35 am
by Jeymz
Since they share the same code there will be no difference in quality.

I understand it this way: Mencoder is just a different interface to the ffmpeg-library. I prefer the ffmpeg tool, because I think it is more intuitive and more powerful.

I do not know about the developers' reasons though. I would like to know that as well.

Re: ffmpeg vs tsmuxer

Posted: Sun Jul 22, 2012 5:31 pm
by SubJunk
You're right that MEncoder does use FFmpeg for some things, but it isn't as simple as that. The main thing is audio synchronisation; in MEncoder it is a big problem, for years we have had to make workarounds in UMS (and PMS before that) to try to make up for MEncoder's unreliable audio/video synchronisation. FFmpeg is much more stable in this regard, most files just work.
Also, MEncoder development has slowed to a crawl in the last 2 years, and in the last couple of months their most active developer (Reimar, who is also a FFmpeg developer) has all but stopped developing for MPlayer, so basically the project is dead. The only updates it is getting now are for codec support, there are almost no bugfixes let alone new features. On the other hand, FFmpeg is very active with good development of bugfixes and improvements.
Thirdly, FFmpeg development constantly breaks MPlayer compilation, it has always been that way and the MPlayer devs have just had to play catchup by fixing those mixmatches when they occur, but because of the second point I made about hardly any development I'm worried that soon no one will be around to keep it being able to compile with the latest FFmpeg.

Right now the only thing I'm aware of that MEncoder can do that FFmpeg can't is handle embedded ASS/SSA subtitles. It's on their developer wishlist, which basically means they want it to be implemented but no one is interested in coding it, so MEncoder will probably remain around just for ASS/SSA support while FFmpeg will do everything else.
Note that this is in the far-ish future because there is a lot of code to be written to make UMS use FFmpeg as nicely as it currently uses MEncoder, but it is how I see the project evolving over the coming months.

Re: ffmpeg vs tsmuxer

Posted: Thu Jul 26, 2012 7:27 am
by squadjot
The reason i discarded Serviio was because it's did not support subtitles. the last time i asked at their forum they said it was because FFMPEG did not support it

Re: ffmpeg vs tsmuxer

Posted: Fri Jul 27, 2012 5:10 am
by SharkHunter
1st ffmpeg can do subs it is just real complicated not as easy as mencoder. There are some gaps in the ffmpeg sub handling that needs to be fixed in order to make ffmpeg the unified encoder. That said I'm not willing to get rid of mencoder just yet.

In mencoder you write

Code: Select all

mecoder movie.some format -sub mysub.srt opts
and everything works. In ffmpeg doing this on an mp4 with srt simply just fails. You need do make it to dvdsub which then crashes. So there are some gaps. On the other hand mencoder don't support rtmp which ffmpeg does. So if SubJunk (or some one else) fixes ffmpeg sub handling I'm all for dumping mencoder since it is more active and new features are actually added there.