Page 1 of 1

MPEG-2 subtitles not rendering

Posted: 29 Jan 2009 12:50
by zeropatatero
Hello all,

I have a doubt about subtitles and timing in mpeg2 videos:

I am doing video capture and encoding to MPEG-2 format. VLC player is the only player I tested able to render the video while being captured.
As far as I know this format comes with no timing info, so it seems normal to me that the player presents 00:00:00/00:00:00 as current/total time info, but I don't know if this is completely normal or I am doing something wrong with the video format.

The problem appears when I load a subtitles file in the player. Although the menu presents a subtitle track 'Track 1', the subtitles do not render anyway. I have tried to do this once the video was closed, without results.
I wonder if the reason of that behaviour could be the player only show texts when current time points to the expected time in the subtitles file.

When I try same video and same subtitles file with another player and it works OK.

Any explanation? what can I do?

Thanks in advance.

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 00:13
by Jean-Baptiste Kempf
First, if VLC shows 00:00:00 that means that VLC can't compute the time based on the MPEG-2 stream.

Do you see some subtitles messages in the log?

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 10:09
by zeropatatero
Hello Jean-Baptiste,

The log doesn't mention anything about subtitles but it has been clarifier:

The first message:
'main error: option sub-original-fps does not exist'

Second message, which repeats till the infinite:
'main error: demux doesn't like DEMUX_GET_TIME'

So, is VLC expecting a metadata FPS in the format? Could it be a feature to configure in the encoder?
I'm working with PAL, so FPS should be constant: 25.

Thanks in advance, Jose.

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 10:23
by Jean-Baptiste Kempf
Give more messages.

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 11:24
by zeropatatero
Wow! Thanks for your immediate response!

That's the part of the log that culd be interesting:

I think the key messages are:

main error: option sub-original-fps does not exist
subtitle debug: Movie fps: -1.000000


Loading subtitles:

main debug: pre-buffering...
main debug: received first data for our buffer
main debug: creating demux: access='' demux='subtitle' path='C:\Documents and Settings\nagaadmin\Mis documentos\prueba.srt'
main debug: looking for demux module: 3 candidates
main debug: UTF-16LE BOM detected
vobsub debug: this doesn't seem to be a vobsub file
main error: option sub-original-fps does not exist
subtitle debug: Movie fps: -1.000000
subtitle debug: autodetecting subtitle format
main debug: UTF-16LE BOM detected
subtitle debug: detected SubRIP format
subtitle debug: loading all subtitles...
main debug: UTF-16LE BOM detected
subtitle debug: loaded 1 subtitles
main debug: using demux module "subtitle"
main debug: TIMER module_Need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: looking for decoder module: 34 candidates
main debug: using decoder module "libmpeg2"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: thread 5780 (decoder) created at priority 0 (input/decoder.c:217)
main debug: thread started
main debug: looking for decoder module: 34 candidates
kate debug: kate: OpenDecoder
subsdec debug: trying configured character encoding: UTF-8
main debug: using decoder module "subsdec"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: thread 5664 (decoder) created at priority 0 (input/decoder.c:217)
main debug: thread started
main debug: `C:\Documents and Settings\nagaadmin\Mis documentos\prueba.mpeg' successfully opened
packetizer_mpegvideo debug: size 720x576 fps=25.000


Playing media:

qt4 debug: New Event: type 1103
qt4 debug: Updating the stream status: 3
main error: demux doesn't like DEMUX_GET_TIME
main debug: control type=1
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
libmpeg2 debug: 720x576 (display 720,576), aspect 540000, sar 1:1, 25.000 fps
main debug: no usable vout present, spawning one
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main debug: window size: 720x576
main debug: looking for video output module: 6 candidates
vout_directx debug: creating DirectXEventThread
main debug: waiting for thread initialization
main debug: thread started
vout_directx debug: DirectXCreateWindow
main debug: looking for vout window module: 2 candidates
qt4 debug: waiting for interface...
qt4 debug: requesting window...
qt4 debug: Video was requested -1, -1
qt4 debug: Video is resizing to: 720 576
qt4 debug: Qt FS: Attaching Vout
qt4 debug: Qt: Changing Fullscreen Mode
main debug: using vout window module "qt4"
qt4 debug: Updating the geometry
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
vout_directx debug: created video sub-window
main debug: thread 5720 (Vout Events Thread) created at priority 0 (directx.c:281)
vout_directx debug: Vout EventThread running
vout_directx debug: DirectXInitDDraw
vout_directx debug: directx-device:
vout_directx debug: DirectXEnumCallback: Controlador de pantalla primaria, display
vout_directx debug: screen dimensions (0x0,1680x1050)
vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1
vout_directx debug: align_boundary_src=0,0 align_boundary_dest=1,1 align_size_src=0,0 align_size_dest=0,0
vout_directx debug: End DirectXInitDDraw
vout_directx debug: DirectXCreateDisplay
vout_directx debug: DirectXCreateClipper
vout_directx debug: disabling screen saver
main debug: using video output module "vout_directx"
main debug: TIMER module_Need() : 23.000 ms - Total 23.000 ms / 1 intvls (Avg 23.000 ms)
main debug: waiting for thread initialization
main debug: thread started
vout_directx debug: NewPictureVec overlay:yes chroma:YV12
vout_directx debug: YUV overlay created successfully
vout_directx debug: End NewPictureVec (succeeded)
main debug: got 1 direct buffer(s)
main debug: picture in 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1
main debug: picture user 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1
main debug: picture out 720x576 (0,0,720x576), chroma I420, ar 5:4, sar 1:1
main debug: direct render, mapping render pictures 0-6 to system pictures 1-7
main debug: thread 5476 (video output) created at priority 1 (video_output/video_output.c:502)
main warning: dts != current_pts (53000)
qt4 debug: New Event: type 1109
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main warning: backward_pts != current_pts (120000)
main debug: looking for text renderer module: 2 candidates
main debug: thread 5792 (fontlist builder) created at priority 0 (freetype.c:477)
freetype debug: using fontsize: 36
main debug: using text renderer module "freetype"
main debug: TIMER module_Need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
freetype debug: using fontsize: 36
main debug: looking for video blending module: 1 candidate
blend debug: chroma: YUVA -> I420
main debug: using video blending module "blend"
main debug: TIMER module_Need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: thread started
freetype debug: Building font database...
freetype debug: Finished building font database.
freetype debug: Took 0 seconds
main debug: thread ended
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
main error: demux doesn't like DEMUX_GET_TIME
...... This message repeats until I pause/stop the payback

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 13:19
by Jean-Baptiste Kempf
subtitle debug: loaded 1 subtitles,

This seems very wrong, can you share the subtitle file?

Re: MPEG-2 subtitles not rendering

Posted: 30 Jan 2009 14:15
by zeropatatero
Sure, it is just a test. I write the content here:

1
00:00:01,847 --> 00:00:10,361
HACE MIL AÑOS...

Re: MPEG-2 subtitles not rendering

Posted: 02 Feb 2009 09:30
by zeropatatero
There is a code fragment with the error I get:

if( demux2_Control( p_input->input.p_demux, DEMUX_GET_TIME, &i_time ) )
{
msg_Err( p_input, "demux doesn't like DEMUX_GET_TIME" );
....

May it give any clue of what's happening?