PDA

View Full Version : Problem with ffdshow and srt in mp4


quake74
7th January 2007, 11:31
I am trying to use ffdshow to display srt subtitles embedded in mp4, but I get this weird behaviour:
http://img322.imageshack.us/img322/5359/grab23205bl2.jpg (http://imageshack.us)

So, first I'd like the subs to be MUCH bigger (and changing the sliders in ffdshow doesn't make any difference), and second, why is the second line so much smaller (unreadable on a tv)?

Ah, I've tried with ffdshow_rev744_20070106_Q and ffdshow_beta1_20061211_clsid and it doesn't matter.

KoD
7th January 2007, 12:10
subtitle support in ffdshow is not the best possible. Vsfilter is the only reliable subtitler around. Also, if said subtitles are ttxt, I don't believe there is any reliable subtitler for that format.

quake74
7th January 2007, 13:48
subtitle support in ffdshow is not the best possible. Vsfilter is the only reliable subtitler around. Also, if said subtitles are ttxt, I don't believe there is any reliable subtitler for that format.

Well, vsfilter (2.37_nt) is not so much better. At least both lines have same font size, but I cannot make it bigger. I dialed up all sliders in the DirectVobSub config, but to no avail.

http://img353.imageshack.us/img353/3807/snapshot20070107134314tm4.jpg (http://imageshack.us)

bond
7th January 2007, 15:18
convert the .srt to .ttxt subtitle format with mp4box (i think the switch is -ttxt!?)

in that .ttxt file you can set a specific font size you like (and much more, like color, scrolling: http://gpac.sourceforge.net/doc_ttxt.php)

secondly it has to be mentioned that the haali mp4 splitter doesnt pass all the advanced subtitle info to the subtitle decoder (iirc it does pass the size tough)
if you want to make full use of the subtitles use gabest's mp4 splitter and vsfilter

quake74
7th January 2007, 15:29
convert the .srt to .ttxt subtitle format with mp4box (i think the switch is -ttxt!?)

in that .ttxt file you can set a specific font size you like (and much more, like color, scrolling: http://gpac.sourceforge.net/doc_ttxt.php)

secondly it has to be mentioned that the haali mp4 splitter doesnt pass all the advanced subtitle info to the subtitle decoder (iirc it does pass the size tough)
if you want to make full use of the subtitles use gabest's mp4 splitter and vsfilter

Thnx bond. Gabest's mp4 splitter work wonders on subtitles :) unfortunately now I have all the sound tracks playing at once :scared: I guess I'll just have to use vlc to read mp4 files after all...

SeeMoreDigital
7th January 2007, 17:30
Thnx bond. Gabest's mp4 splitter work wonders on subtitles :) unfortunately now I have all the sound tracks playing at once :scared: I guess I'll just have to use vlc to read mp4 files after all...That's very odd...

I use MediaPlayer Classic (set to output in VMR9 (renderless) mode) together with it's built-in MP4/MOV splitter. Along with FFdshow's MPEG-4 video decoder filter and FFdshow's AAC decoder filter. And no other filters... not even VSfilter.

I don't have any problems displaying most of the common "text based" subtitle formats. Including TTXT and VOBsubs "graphic based" subtitles in MP4.

Switching between AAC (and MP3) audio streams in MP4 is also not a problem...


Cheers

quake74
7th January 2007, 17:56
That's very odd...

I use MediaPlayer Classic (set to output in VMR9 (renderless) mode) together with it's built-in MP4/MOV splitter. Along with FFdshow's MPEG-4 video decoder filter and FFdshow's AAC decoder filter. And no other filters... not even VSfilter.

I don't have any problems displaying most of the common "text based" subtitle formats. Including TTXT and VOBsubs "graphic based" subtitles in MP4.

Switching between AAC (and MP3) audio streams in MP4 is also not a problem...


Cheers

I am guessing that you don't have any problems because of the internal mpc subtitles handling, and I'm quite sure mpc plays nice with gabest's splitter ;) I did my tests in graphedit and windows media player.

foxyshadis
7th January 2007, 18:03
Well, vsfilter (2.37_nt) is not so much better. At least both lines have same font size, but I cannot make it bigger. I dialed up all sliders in the DirectVobSub config, but to no avail.

What "slider" would that be? The transparency sliders? The font size is a bog standard font picker:

[removed]

SRT is 100% client controlled (unlike SSA and TTXT), so as long as the font is sizable there's no reason it should mess up.

In ffdshow, if Autosize is checked, strange things happen to the font size. (But subtitles in ffdshow are quite strange as it is, compared to MPC/VSFilter.)

quake74
7th January 2007, 18:55
What "slider" would that be? The transparency sliders? The font size is a bog standard font picker:

SRT is 100% client controlled (unlike SSA and TTXT), so as long as the font is sizable there's no reason it should mess up.

In ffdshow, if Autosize is checked, strange things happen to the font size. (But subtitles in ffdshow are quite strange as it is, compared to MPC/VSFilter.)

I chose 72 as a font size, and 500 percent for scale, and most other things in between and it doesn't make any difference. The subs are always of the same size. But thinking about it, mp4 can only containt ttxt subs, and I kinda remember mp4box saying that he's gonna use font Georgia size 22 (yeah, just checked) so I guess he transform the srv in ttxt on the fly, and directvobsub cannot change that 22. Weird, since it's only a text file, why would you want to choose a fixed size? It's like forcing a size for a svg...

EDIT: Clarification: it's not a complaint against mp4box, but the mp4 format.

SeeMoreDigital
7th January 2007, 19:53
Well here's what my SRT subtitles look like in MediaPlayer Classic (on a 4:3 monitor), without having to fiddle about with any weird and wonderful FFdshow settings: -

http://img412.imageshack.us/img412/3766/srt768x576zm7.jpg


And here are some TTXT (font size 36) examples: -

This one is with MediaPlayer Classic's "Plain Text" subtitle option selected: -

http://img413.imageshack.us/img413/9881/ttxt768x576plaintextzs5.jpg

This one is without MediaPlayer Classic's "Plain Text" subtitle option selected: -

http://img122.imageshack.us/img122/9714/ttxt768x576bk1.jpg


Cheers

foxyshadis
7th January 2007, 19:54
That's my biggest complaint about SSA & TTXT, actually, and I've considered modifying VSFilter to allow a forced override. But lately I haven't been watching anything with soft subtitles, so I haven't been bothered by it.

SMD: Where do you have a "plain text" option?

bond
7th January 2007, 20:52
Thnx bond. Gabest's mp4 splitter work wonders on subtitles :) unfortunately now I have all the sound tracks playing at once :scared: I guess I'll just have to use vlc to read mp4 files after all...as with most splitters you need an own stream switcher filter

haali has this inbuilt. you can also use player having those, like MPC

clsid
8th January 2007, 01:08
Perhaps the embedded subs are vobsubs instead of srt? The fontsize and scale functions of vsfilter don't work with vobsubs.

quake74
8th January 2007, 08:27
Perhaps the embedded subs are vobsubs instead of srt? The fontsize and scale functions of vsfilter don't work with vobsubs.

I produced the srt files myself so I'm positive they are srt. However srt in mkv behave much better, so I might switch to matroska after all (if ffdshow doesn't improve in the near term).

SeeMoreDigital
8th January 2007, 12:07
SMD: Where do you have a "plain text" option?Here: -

http://img259.imageshack.us/img259/7642/mpcplaintexttg4.jpg


Cheers

haruhiko_yamagata
11th February 2007, 02:53
I have fixed something in text positioning. Is your problem fixed?

quake74
11th February 2007, 18:18
I have fixed something in text positioning. Is your problem fixed?

I just tried ffdshow_rev788_20070117_Q and the subtitles are placed correctly in the middle of the frame, and no more weird 2nd line problem. The font does not respond to scaling just like before, but I guess that's ttxt fault...

haruhiko_yamagata
12th February 2007, 00:43
I have fix the problem at rev888. So please test the latest builds from clsid or drevil_xxl.
The second problem may not be untouched though.

Btw, Is "Font"->"Autosize" checked?

quake74
12th February 2007, 09:17
I have fix the problem at rev888. So please test the latest builds from clsid or drevil_xxl.
The second problem may not be untouched though.

Btw, Is "Font"->"Autosize" checked?

I tried ffdshow_rev906_20070210_clsid and the situation is just the same: no response to any kind of scaling, but the two line subs are the same size and correctly placed in the center of the screen. I can't believe I am the only one who is seeing this, am I?

Edit: yes, i tried autosize too, as i said, no effect whatsoever.

haruhiko_yamagata
12th February 2007, 09:24
Please post a sample.

quake74
12th February 2007, 09:53
I uploaded a small mp4 (yes, the AR is wrong) at rapidshare

http://rapidshare.com/files/16127358/xmen_002.mp4.html

and using haali media splitter 1.6.400.11 and ffdshow ffdshow_rev906_20070210_clsid here is what I get

http://img383.imageshack.us/img383/8379/grab00209fq7.jpg (http://imageshack.us)

whatever I click (autosize or change font size by hand) the font size is the same. I tested using graphedit.

Since the problem with the second line is gone, I think this is now usable, even at this font size.

haruhiko_yamagata
17th February 2007, 03:13
Sorry for late reply.
Thank you for the sample.
The problem is confirmed.

haruhiko_yamagata
17th February 2007, 08:49
The file have embedded ASS2 subtitle.[Script Info]
ScriptType: v4.00++
ScaledBorderAndShadow: yes
PlayResX: 704
PlayResY: 416
[V4++ Styles]
Style: Text,Arial,12,&H00ffffff,&H0000ffff,&H00000000,&H80000000,0,0,0,0,100,100,0,0.00,3,0,0,2,0,0,0,0,1,1
This is what I can see in CodecPrivate(extradata) format. The style seems not to by aplied corrently.
In this case, you can't configure the size of the font.

cc979
17th February 2007, 16:32
i've just had a look because i've problems with subs before, first i noticed that file AR did not have any signaling - so i extracted all the files with yamp2 (found that it outputted a .srt) then made a new mp4 with the a 16:9 pal signal (using properties on the h264 file)

now using on 100% zoom using mpc with mpc's mp4 splitter this what i get

001 using the first sub it shows:
subs are not in center there are more to right

http://img182.imageshack.us/img182/3796/subs1re5.png

002 now using the second sub (plain text) it shows:
looks ok to me

http://img401.imageshack.us/img401/3137/subs2tj5.png

003 now in fullscreen:
it puts them in the border

http://img401.imageshack.us/img401/4007/subs2fswt6.png

004 now using ffdshow 16/9 sub display - with the vertical pos to 100%

looks ok

http://img167.imageshack.us/img167/9908/subs4ffdshowyt4.png


005 now using ffdshow 4/3 sub display - with the vertical pos to 100%

judge for yourself

http://img167.imageshack.us/img167/7196/subs5ffdshowty0.png

using ffdshow rev926 subs sizes and fonts do change, looks ok to me

using mpc subs i could not change the sizes

conclusion ffdshow subs seem better for me

cc979
17th February 2007, 16:47
i've found when subs do get extended into the border in 4/3 display, it works when using vmr9 but does not using haali

SeeMoreDigital
17th February 2007, 18:03
How do you get on with this TTXT_Subs_01 (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/TTXT_Subs_01.zip) sample?

Sadly, I can't get the "overlap" bit to work...

cc979
17th February 2007, 19:02
How do you get on with this TTXT_Subs_01 (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/TTXT_Subs_01.zip) sample?

Sadly, I can't get the "overlap" bit to work...

in ffdshow i had to enable 'Accept embedded subtitltes' - changing sizes & fonts works fine

in 16/9 sub display with 100% vertical pos worked as normal,

in 4/3 sub display had to get the font size to less than 20 so it did'nt place on top of the video or with bigger font use 80% vertical pos

what do you mean "overlap" bit ?

SeeMoreDigital
17th February 2007, 19:24
what do you mean "overlap" bit ?You display one line of text first first. And while that line stays on screen, you display another line of text above or below it.

cc979
17th February 2007, 21:31
You display one line of text first first. And while that line stays on screen, you display another line of text above or below it.

i did not see it

SeeMoreDigital
17th February 2007, 21:38
i did not see itLike I said... I could not get it to work!

haruhiko_yamagata
18th February 2007, 00:39
i've just had a look because i've problems with subs before, first i noticed that file AR did not have any signaling - so i extracted all the files with yamp2 (found that it outputted a .srt)
Weird.
I guess quake74 have encoded correctly (apart from the aspect ratio), and the mov spliter have converted from srt to ASS2. I use MPC's internal one.

cc979
18th February 2007, 05:29
i've just doubled checked the original but with mediainfo - it shows

Timed text (3GPP)

me bad, sorry for mistake

haruhiko_yamagata
18th February 2007, 10:34
i've just doubled checked the original but with mediainfo - it shows

Timed text (3GPP)

me bad, sorry for mistake
Well, I'm not sure.
Then it may be stored as Timed text (3GPP) internally.
I just found MPC's internal splitter demux it into ASS2.
I need help from people who know containers well.

note : I'm talking about xmen_002.mp4.

quake74
19th February 2007, 08:40
Weird.
I guess quake74 have encoded correctly (apart from the aspect ratio), and the mov spliter have converted from srt to ASS2. I use MPC's internal one.

Thanks for the tests, I'll do mine when I get back home. If it matters, the AR is wrong because I made an anamorphic mkv (since I had problems with mp4 subs), and to make a test file I extracted the tracks with mkvextract and made an mp4 with mp4box (and I didn't want to do the calculations to fix the par/sar/dar).