Opened 12 years ago

Closed 12 years ago

#4535 closed patch (fixed)

mytharchive encodes multiple audio streams to mpeg2 incorrectly

Reported by: thrantastic@… Owned by: paulh
Priority: minor Milestone: 0.21
Component: mytharchive Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

I recently exported a recording with 2 audio streams and they ended up getting switched around (as it seems mythtranscode is wont to do from time to time). Upon further investigation, however, it seemed that mytharchive was selecting the correct streams in the right order when encoding, but they were still coming out wrong when the file was demuxed and then remuxed.

Finally I discovered that ffmpeg was not mapping the streams as requested by mythburn.py because it was being called with slightly incorrect arguments. Multiple audio streams being added with ffmpeg requires multiple -acodec, -ab, etc. switches, one for each stream. Mythburn.py was not doing this, so ffmpeg did not re-order the streams as requested, and in fact was transcoding the wrong one to ac3 which is why it got chosen during the demuxing/remuxing process.

I have attached a patch that correctly adds the audio switches for a second audio stream. It duplicates the parameters being used for the first stream, so no changes are needed to the encoding profiles. This patch was successful in exporting the troublesome file I mentioned earlier and doesn't seem to have broken anything, but it has not received much testing beyond that.

Attachments (1)

mythburn-fixmpegaudiostreams.diff (916 bytes) - added by thrantastic@… 12 years ago.
Fix adding a second audio stream to ffmpeg encoding with mythburn.py

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by thrantastic@…

Fix adding a second audio stream to ffmpeg encoding with mythburn.py

comment:1 Changed 12 years ago by thrantastic@…

The patch is not quite up to date with svn head, but I imagine it should still apply cleanly with some offset.

comment:2 Changed 12 years ago by paulh

Milestone: unknown0.21
Status: newaccepted

comment:3 Changed 12 years ago by paulh

Resolution: fixed
Status: acceptedclosed

(In [15611]) When re-encoding a file in MythArchive? add the encoding parameters to the second audio track. This should ensure it gets re-encoded to AC3 if required.

Patch by thrantastic (at) gmail.com. Closes #4535.

Note: See TracTickets for help on using tickets.