bug-vcdimager
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VCDImager Bugs/Devel] SVCD sub header causing sound sync with Toshiba


From: William Hardy
Subject: [VCDImager Bugs/Devel] SVCD sub header causing sound sync with Toshiba
Date: Sun, 23 Mar 2003 11:08:41 +0000
User-agent: Turnpike/6.00-S (<LDgEzd5byj+fc5B9EKN0ao1Aon>)

Firstly let me present my compliments on making such a fine piece of
software available in the public domain.

I have been using VCDImager to create SVCDs using the VCDEasy front end,
and have been plagued with sound synchronisation problems when playing
the discs on my Toshiba SD 220E DVD player.  The discs play fine on the
PC.

I get the same problem using Nero, and also with the Ulead DVD plug in.

After much research, I have pinned down the problem to the subcode
header for the first sector in my test MPEG file, which was generated
using TMPGEnc.  This sector contains a pack header, a system header and
some padding to fill the sector.

The subcode header generated by VCDImager is the following:
fn = 01   (file 01)
cn = 01  (video)
sm = 62 (Realtime + Form2 + Video)
ci = 80   (MPEG2)

I downloaded a trial copy of VOB Instant CD 6.4, and generated a disc
with that.  It played fine on both computer and DVD player.  It uses a
subcode header as follows:
fn = 01    (file 01)
cn = 00   (empty)
sm = 60  (Realtime + Form2)
ci = 00    (empty)

All other subcode headers were identical.

On patching the subcode headers to the same value on the VCDImager disc,
the disc played fine.

I then examined the vcdimager source code, and this is my understanding
of how the headers are generated.

Function _write_sequence() in vcd.c calls vcd_mpeg_source_get_packet()
in vcd_mpeg_stream.c.  This calls vcd_mpeg_parse_packet() in vcd_mpeg.c,
which in turn calls _analyze_system_header() to process the system
header in the packet.

_analyze_system_header finds the video and audio stream identifiers
along with their P-STD_buffer_size_bounds.  It calls function
_register_streamid() for each of these.  Therefore this packet ends up
with both audio and video bits set in the state.

Back in vcd.c, vcd_mpeg_packet_get_type() is called.  This finds the
video bit set and returns PKT_TYPE_VIDEO, rather than PKT_TYPE_EMPTY
which might have been expected by the last statement
        if (_info->system_header || _info->padding)
in the function.

vcd.c therefore generates coding applicable to a video sector, as
observed.

To test out my theory, I have commented out the line

      _register_streamid (stream_id, state);

in function _analyze_system_header() in vcd_mpeg.c

This indeed fixed the sound synchronisation problem, as expected from my
previous tests.  (I do get a warning about variable stream_id not being
used - I have ignored this for now).

The question is, is this a bug? I do not have access to the SVCD
specifications, so I am not aware of what a compliant SVCD should be
using.  I am therefore asking you, the experts as to the way forward.

If it is a bug, is this the correct way of fixing it?

If it is not a bug, then it would be nice to have some option of
switching the subcode headers generated for system headers.  There are a
lot of people using this player who have reported the same problem, and
would be grateful for a fix (see the comments on Toshiba 220E in the DVD
players list on http://www.dvdrhelp.com).

I have not tried yet the effect of the fix on MPEG1 VCDs.

In the interim, I shall keep on trying my modified vcdxbuild.exe and
would like to offer it to other users of this DVD player via the
DVDRHelp.com forums.

NB. for reference, the system header contained the following bytes:
00 00 01 bb 00 0c 80 32
ab 04 e1 7f e0 e0 e6 c0
c0 20

-- 
Bill.
address@hidden       http://www.billh.demon.co.uk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]