Opened 12 years ago

Last modified 12 years ago

#2081 new defect

m2ts + external subtitles -> no subtitles are shown

Reported by: 4Selur@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

If I call (mp4 input):
[code]mencoder -lavdopts threads=8 -really-quiet -subcp UCS-2 -sub "sampleTest.srt" -ass -ass-force-style Fontname="Arial",Outline=1,Shadow=1,MarginV=10,Alignment=2,Fontsize=20 -of rawvideo -o - -ovc raw -noskip -demuxer lavf -vfm ffmpeg -vf scale,format=i420,ass,scale,format=i420 -nosound -mc 0 "input.mp4" | x264 --preset ultrafast --tune fastdecode --crf 24 --fps 25 --input-res 640x352 --output "mp4SourceOutput.mp4" -code subtitles get embedded, but if I use (m2ts input):
[code]mencoder -lavdopts threads=8 -really-quiet -subcp UCS-2 -sub "sampleTest.srt" -ass -ass-force-style Fontname="Arial",Outline=1,Shadow=1,MarginV=10,Alignment=2,Fontsize=20 -of rawvideo -o - -ovc raw -noskip -demuxer lavf -vfm ffmpeg -vf scale,format=i420,ass,scale,format=i420 -nosound -mc 0 "input.m2ts" | x264 --preset ultrafast --tune fastdecode --crf 24 --fps 25 --input-res 640x352 --output "m2tsSourceOutput.mp4" -code subtitles are not embedded. :(

I uploaded sample files and calls to: [url]http://www.embedupload.com/?d=6TIYHBQVMR[/url]

The mp4 and the m2ts file both contain the same video stream (it's just a remux).

Does any one know what's going wrong here?
Is there an additional option I should be using with m2ts input?

If I use mplayer or mplayer2 the same happens, when the input file is a m2ts file no external subtitles can be shown.

Cu Selur

Change History (5)

comment:1 by reimar, 12 years ago

Did not have time to look myself, but did you compare the time stamp values in the status line? TS files usually do not start at time 0, so if the subtitle is for a file that does start at time 0 it won't match up.

comment:2 by 4Selur@…, 12 years ago

[quote]did you compare the time stamp values in the status line?quote
seems like you are right and the timestamps in the m2ts file start a V:600 instead of 0

-> is there an option to tell mencoder to set these to 0 during reencoding?

comment:3 by 4Selur@…, 12 years ago

only option I found was fixpts, but using:
-vf fixpts=start=0,scale,format=i420,ass,fixpts,scale,format=i420
didn't fix the problem

comment:4 by reimar, 12 years ago

Even if you managed to make fixpts do what you want that won't do much good, the audio still would have the old time-stamps and you would end up with horrible desync.
In theory the -ignore-start option could be related, but I am fairly certain it actually won't work for this case.
Involves some manual work, but -subdelay should allow working around it.
Another option might be to use (or convert to) a subtitle format that uses frame numbers instead of time stamps, but I am not sure if that would work.

comment:5 by 4Selur@…, 12 years ago

"Even if you managed to make fixpts do what you want that won't do much good, the audio still would have the old time-stamps and you would end up with horrible desync."

Since I only deal with cfr sources audio should not be an issue, also if by changing the pts the audio sync would be lost during remuxing, shouldn't the mp4 file also be asynch? Which it isn't and the timestamps in the mp4 seem to start at zero since there the adding of the subtitles works fine.

"In theory the -ignore-start option could be related, but I am fairly certain it actually won't work for this case."

you are right, using -ignore-start doesn't help. (Probably since http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.txt mentions that this option was meant for .avi files. :()

Note: See TracTickets for help on using tickets.