Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th October 2007, 10:30   #1  |  Link
Florisel
Registered User
 
Join Date: Aug 2007
Posts: 9
Bad AC3 sound when converting from PS to TS

Hi everybody,

I am currently writing a tool, which converts program stream to transport stream. The conversion for MPEG2 video programs with MPEG1/2 sound works good, however I am experiencing problems with the streams with AC3 sound. When converted and played back, audio decoder reports missing frames and synwords, which are probably result of some missing or incorrectly packetized audio data. I have spent a lot of time already on this issue but so far I could not find what the problem is and what to ask guru's on this forum for help.
I have uploaded to RapidShare two samples, which I work with:
- one is the original program stream file, which plays correctly
http://rapidshare.com/files/50762719/ZDF_AC3.mpg.html
- one converted transport stream file (from the previously mentioned program stream file), which plays incorrectly
http://rapidshare.com/files/50762888/ZDF_AC3.ts.html

Can someone have a look at these two files and help me to understand what the problem is?

Big thanks in advance.
Florisel is offline   Reply With Quote
Old 9th October 2007, 13:45   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I'd rather inspect your source code to find the error.

Have you looked at the source code of existing tools that can extract AC3 audio, such as DGIndex?
Guest is offline   Reply With Quote
Old 9th October 2007, 14:01   #3  |  Link
Florisel
Registered User
 
Join Date: Aug 2007
Posts: 9
neuron2,

Thanks for the info. I will look at the source code of DGIndex. I have not done it yet as I am mainly using the standard(s) to write the tool. And it has worked so far, but this AC3 sound really drives me crazy.
It is some very small aspect of how AC3 PES should be packetized into transport stream packets. The packetizing routine is the same for all types of PES - video and audio, MPEG-1, 2 and it works everywhere except for AC3 sound.
Florisel is offline   Reply With Quote
Old 9th October 2007, 14:07   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
So you're saying that the demuxed AC3 data is OK but it goes bad when you mux it into transport? How do you know that?
Guest is offline   Reply With Quote
Old 9th October 2007, 14:16   #5  |  Link
Florisel
Registered User
 
Join Date: Aug 2007
Posts: 9
I have both streams - original program stream and the transport stream, which I make myself from the program stream. The program stream plays good - no interruptions, distortions, error messages in VLC. But from the transport stream only video can be played and AC3 audio produces error messages in VLC - about missing synwords and time-stamps. These errors mean that audio PES is not packetized correctly - e.g. demux takes some extra bytes or cuts the packets, but I could not find so far where the problem is.
I will look at the DGIndex to understand if there are certain details, which I do not know, on how AC3 sound is demuxed.
To add to the story - the program stream, which I use, is produced by MyTheatre program (if you know what it is). I take it from one of the filters and it comes to me in the form of program stream packs. I have also started suspecting that these packs are not good in some aspect, but could not prove it yet.

Last edited by Florisel; 9th October 2007 at 14:22.
Florisel is offline   Reply With Quote
Old 9th October 2007, 15:09   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Can you send me a captured PES stream? I can test it and let you know if it is good (I have PES players at work). You really need to localize the problem first. As you say, it may not be your code at all.
Guest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:40.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.