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. |
1st January 2024, 22:19 | #1 | Link |
Registered User
Join Date: Dec 2001
Posts: 5
|
Switching audio codec in the middle of a broadcast
I'm trying to find the correct place to ask this question. Hopefully someone here can answer it.
I'm trying to understand the best way to capture and process audio from an HDMI input, especially when the audio can switch between stereo and AC3 encoded audio. As I capture, I will produce an mpeg-ts stream to be written to disk and/or streamed to a playback device. I'm stuck with trying to figure out the best way to handle audio that can potentially change formats in the middle of a broadcast. As an example, let's say I'm scheduled to capture a broadcast, I tune the set top box to a channel a minute early, and it's playing some advertising content in stereo LPCM. My capture starts up and detects stereo LPCM and creates an output of h.264 video and AAC encoded audio. Now, a minute later, the real show begins and the STB starts producing an AC3 encoded bitstream, that I then detect. At this point, I need to start writing this to the mpeg-ts stream. Is there a standard that I should be using to inform any downstream players that the audio format has changed? Something like adding a stream and bumping the version in the PMT/PAT or something? I'll be using ffmpeg for compression and encapsulation and output of the stream. But I'm just not sure how to handle this scenario. And I have myself convinced that this does indeed occur. Things like AT&T U-verse, DirecTV streaming, I'm assuming they all send something like an mpeg-ts stream to their STBs, and the STBs handle it in some way. I just want to make sure I'm adhering to the standard (if there is one). Thank you for any insight anyone can offer. |
Tags |
ac-3, audio encoding, capture, mpeg-ts, stereo |
Thread Tools | Search this Thread |
Display Modes | |
|
|