ffmpeg vs tsmuxer

If you have a suggestion for a feature, post it here
Post Reply
Jeymz
Posts: 12
Joined: Wed Jul 11, 2012 12:49 am

ffmpeg vs tsmuxer

Post by Jeymz » Fri Jul 13, 2012 10:26 am

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?

User avatar
SubJunk
Lead Developer
Posts: 2878
Joined: Sun May 27, 2012 4:12 pm

Re: ffmpeg vs tsmuxer

Post by SubJunk » Mon Jul 16, 2012 4:41 pm

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)

Jeymz
Posts: 12
Joined: Wed Jul 11, 2012 12:49 am

Re: ffmpeg vs tsmuxer

Post by Jeymz » Mon Jul 16, 2012 9:32 pm

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.

User avatar
SubJunk
Lead Developer
Posts: 2878
Joined: Sun May 27, 2012 4:12 pm

Re: ffmpeg vs tsmuxer

Post by SubJunk » Mon Jul 16, 2012 9:56 pm

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.

Skylion
Posts: 17
Joined: Mon Jun 04, 2012 6:05 am

Re: ffmpeg vs tsmuxer

Post by Skylion » Sat Jul 21, 2012 7:10 am

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.

Jeymz
Posts: 12
Joined: Wed Jul 11, 2012 12:49 am

Re: ffmpeg vs tsmuxer

Post by Jeymz » Sat Jul 21, 2012 7:35 am

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.

User avatar
SubJunk
Lead Developer
Posts: 2878
Joined: Sun May 27, 2012 4:12 pm

Re: ffmpeg vs tsmuxer

Post by SubJunk » Sun Jul 22, 2012 5:31 pm

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.

User avatar
squadjot
Moderator
Posts: 651
Joined: Fri Jun 01, 2012 4:24 am

Re: ffmpeg vs tsmuxer

Post by squadjot » Thu Jul 26, 2012 7:27 am

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

User avatar
SharkHunter
Developer
Posts: 669
Joined: Fri Jun 01, 2012 9:36 pm

Re: ffmpeg vs tsmuxer

Post by SharkHunter » Fri Jul 27, 2012 5:10 am

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.
We reject: kings, presidents and voting.
We believe in: rough consensus and running code.

Post Reply