INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: directshow filter combination for mp4 video files  (Read 2927 times)

trott

  • World Citizen
  • ***
  • Posts: 118
directshow filter combination for mp4 video files
« on: November 04, 2007, 06:36:08 am »

Hi all,

After taking a look for the so-many-th time at the files in my video collection I (once again) noticed that it's annoying as well as impractical to keep all these avi's with separate subtitles and artwork.
So once again I decided to put them all in mp4 containers using mp4box. During previous experiments I noticed that this causes some...issues (strangely enough Matroska never gave me any problems but it seems mp4 containers are the up-and-coming thing while mkv is largely ignored by the hardware player industry).
Some issues I noticed in the past:
  • some files remux perfectly, some get audio/video sync issues
  • the subtitle font for timed text (embedded subtitles) is usually much too small to read on a TV and can only be changed when playing back the file in Media Player Classic

I recently noticed however that you can set the font face and size while embedding the subtitle stream so this may solve my problem (or at least one of them).

However, upon further testing it seems that these subtitles are only made bigger when using MPC (Media Player Classic). What I would like is that all directshow-enabled players:
  • Play back with subtitles enabled
  • the subtitles should be in the correct font size
  • respect my language preferences (English audio with Dutch subtitles)
...And (here's the absolutely essential thing) this should happen without having to configure all these separate filters !!!

Now as I understand it, I would first have to choose between splitters. I read that the mp4 splitter from Gabest (which comes with mpc) understands MP4 streams 'better' as regards subs. On the other hand, in Haali I can give a language priority.
To increase choice even further, I can then display these subs using either vsfilter or ffdshow's subtitle filter. It seems however ffdshow does not play back embedded subs in mp4.

So I wonder...Does anyone here have recommendations for both the directshow splitter and the decoding filters to be used (preferably with argumentation; not just 'i use filter X and have no problems') ?

The end result should be:
1) I click an MP4 file
2) it plays with the correct subs

and not:
1) I click an mp4 file
2) I open vsfilter's config dialog
3) I change the language of the subs
4) I change the size of the subs
5) and so on


This may be a tough one...I'm hoping for some good feedback :)
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72444
  • Where did I put my teeth?
Re: directshow filter combination for mp4 video files
« Reply #1 on: November 04, 2007, 07:15:46 am »

Logged

trott

  • World Citizen
  • ***
  • Posts: 118
Re: directshow filter combination for mp4 video files
« Reply #2 on: November 05, 2007, 02:26:43 am »

That is (mostly) audio-related...

Some observations I made yesterday while testing:
1) gabest's mp4splitter: subs do not work using vsfilter, but they do (mostly) work using ffdshow's subtitle support.
2) haali splitter: subs work (mostly) using vsfilter but they don't work with ffdshow's subtitle support
3) when using MPC for playback: all MPC's internal filters are used regardless of what's set in directshow. However, this has the best subtitle support for timed text embedded in mp4 (correct font size and font type). This is very strange since I would assume that MPC uses vsfilter for subtitle playback so in case (2) this should also have worked.

Note: when i say (mostly), I mean that subs are visible but there's something wrong...Things I noticed are combinations of: incorrect font size, incorrect font face and lack of support for high-ascii characters.

This seems all very confusing to me...Can anyone confirm this? Maybe it has something to do with the video rendererer (I'm using Vista), but I'm really guessing here...



Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: directshow filter combination for mp4 video files
« Reply #3 on: November 05, 2007, 06:28:13 am »

Just letting you know that I can't really help.  Being a native english speaker (read "lazy American" if you want), I only rarely need to use subtitles.  When I do I generally have:

a) Subtitles embedded in AVI, for which FFDSHOW works fine, and so does VSFilter if configured properly.
b) Subtitles embedded in MKV or MP4, for which I use Haali + vsfilter.

So consider this one of those "works for me" postings you didn't want.  However... I do have some notes on your original posting:

1) Why have you determined that mp4splitter is "better" than Haali?  It is nice in that "it just works" but Haali's splitter does for the most part as well, and it can also handle MKV, so it is quite a bit more versatile.

2) Why do you have an aversion to using Haali and VSfilter.  As you indicated, it works "mostly".  You then said that it doesn't work with ffdshow's subtitle support.  That may be true, but who cares.  If it works with VSFilter, what is the problem?  VSFilter is designed for that purpose (where FFDSHOW has it hacked on).

3) Perhaps my TV is bigger than yours (though it isn't huge), or perhaps my eyes are better.  I've never had issues reading whatever fonts VSFilter uses by default.  The only thing I've ever had to configure in VSFilter is turning it OFF, and setting my language to English.  When I need to use it (for Anime or foreign films or whatever) I just turn it on then via it's tray icon.  Could you describe in more detail what exactly is happening?  (Though the CCCP Forum or Doom9 forum might really be a more appropriate forum for this topic.)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

trott

  • World Citizen
  • ***
  • Posts: 118
Re: directshow filter combination for mp4 video files
« Reply #4 on: November 05, 2007, 10:18:47 am »

1) MP4splitter supports advanced text layout options for timed text (the default subtitle format for the mp4 container as defined in the mpeg4 standard) such as italics, colours, <<BLINK>> :) and so on while haali does not.
2) I just find it strange that ffdshow can not decode such embedded mp4 subs with haali and it can decode them using mp4splitter. I do not have an aversion to haali.
3) the problem is only there when using timed text substreams in mp4 containers. You cannot change the font size and the font size as defined in the ttxt stream is not respected.

The gist of the problem is that I would prefer to have video files which have subs (and other stuff) embedded rather than in a separate file. I have 2 choices: matroska or mp4. Matroska does not have hardware player support, mp4 does. But with mp4 containers I get these tiny subtitles unless I play the files in MPC (in which I can in fact change the subtitle size). However, I do not want to have to change them, this is directshow so any directshow-capable player should render the files in the same way, right?

Logged

trott

  • World Citizen
  • ***
  • Posts: 118
Re: directshow filter combination for mp4 video files
« Reply #5 on: November 12, 2007, 02:42:35 am »

After some further research (and after reading mp4box's documentation for the nth time) it seems I found the solution at least in part...

(note that my question referred only to mp4 files with mpeg-4's native subtitle format, not with embedded subpictures ripped from dvd as used eg by nero)

One of the features in timed text is that the author of the media file can force a font face, size and type. The default is serif, normal, 18 pt when using mp4box. To be compiant, a player needs to understand both serif and sans-serif as font types. All other fonts apparantly are supported depending on a correct implementation by the player. And 18 point is just much too small. Also, the default is serif which is not the most suitable font for subtitles.
So, passing a font of sans-serif, font face bold and font size of at least 22 points to mp4box solved the issue for me.

It worked without problems in Media Player Classic because this player (developed by the author of vsfilter) uses its internal filters instead of directshow for mp4 files and has support for changing the fonts in the subtitles even though this is supposed to be enforced by whomever encoded the video...

Logged
Pages: [1]   Go Up