Opened 18 years ago

Closed 16 years ago

#2468 closed defect (fixed)

Mythtranscode removing audio and subtitles and audio tracks swapping places.

Reported by: lofty69@… Owned by: Geoffrey Hausheer
Priority: minor Milestone: 0.21.1
Component: mythtranscode Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

DVB-T recordings in the UK (freeview) have no audio and subtitles when being transcoded using MPEG2 > MPEG2.

Here is a list of streams before and after transcoding:

Original File:
Stream #0.1[0x306](eng): Audio: mp2, 48000 Hz, stereo, 192 kb/s
Stream #0.2[0x307](eng): Audio: mp2, 48000 Hz, mono, 64 kb/s
Stream #0.3[0x308](eng): Subtitle: dvbsub

Transcode (no cuts):
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 544x576, 10000 kb/s, 25.00 fps(r)
Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, mono, 64 kb/s

Transode (cuts):
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 544x576, 10000 kb/s, 25.00 fps(r)
Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, mono, 64 kb/s
Stream #0.2[0x1c0]: Audio: mp2

Streams 0.1 and 0.2 appear to be switching places... I can select the audio by using the "Select Audio Track" option from the menu, but subtitles are lost completely and the resulting file causes problems with mytharchive due to the streams being swapped.

The extra audio track seems to be a track for the visually impaired.

Change History (19)

comment:1 Changed 18 years ago by lofty69@…

Using the latest ATRPMs on FC4.

comment:2 Changed 18 years ago by Stuart Auchterlonie

Could you be a bit more specific? Show x on channel y. All the recordings I have here that i've transcoded recently using mpeg2 -> mpeg2 transcode have correctly picked up the main audio track and not the audio described track.

The subtitles are however dropped, but that's a different outstanding issue.

comment:3 Changed 18 years ago by lofty69@…

Sorry, for me it's happening on every episode of Lost on E4 everday @ 18:00...

comment:4 Changed 18 years ago by stuartm

The original reporter beat me to opening this ticket by a few hours. I've actually been meaning to do it for a few weeks.

The subtitles being stripped is annoying but I'll conceed that it's more of an feature request. The audio problem on the other hand is a real problem - I've mostly seen the case where tracks 0/1 are swapped, so the audio descriptive track becomes the main track.

comment:5 Changed 18 years ago by cpinkham

Summary: Mythtranscode removing audio and subtitlesMythtranscode removing audio and subtitles and audio tracks swapping places.

comment:6 Changed 18 years ago by Geoffrey Hausheer

Owner: changed from Isaac Richards to Geoffrey Hausheer
Status: newassigned

It is expected that you'll loose your subtitles. There is no way to convert subtitles from a TS to a PS stream (without a huge amount of work). Swapping or dropping audio channels is not good though. I would need a test stream. Probably the 1st 10-15MB of the original stream would be sufficient, though you should probably ensure that the problem remains after chopping out the beginning by doing something like: mythtranscode --mpeg2 -i chooped.mpg -o out.mpg If out.mpg shows the same problem, then send me the chopped.mpg file.

comment:7 Changed 18 years ago by lofty69@…

Ive tried to chop up some of the mpg's that have the issue bit after re-transcoding the audio is then ok, so I'm not sure at what point the error is occuring. I have also done some more transcoding and it would seem most channels are ok (not tried them all), but E4 seems to be the one that is causing the issue. I will have another go at trying to find the section that will reproduce the error. Thanks

comment:8 Changed 18 years ago by lofty69@…

Make that Channel 4 as well.

comment:9 Changed 18 years ago by Geoffrey Hausheer

I don't need any test-cases, I have several that demonstrate the issue. The problem is not directly with the transcoder at all, but is with libavformat which affects myth's playback. The streams are all there, in order in the output, but myth doesn't correctly detect them during playback (and the transcoder will incorrectly detect them if you were to re-transcode them). One way I can see this is that your stream shows:
Stream #0.1[0x1c1]: Audio: mp2, 48000 Hz, mono, 64 kb/s

the transcoder would always create 0x1c0 before 0x1c1 and that stream is still there in your file. It just isn't being detected correctly.

comment:10 Changed 18 years ago by lofty69@…

If it's a problem with myth's playback then surely the original recording would suffer the same symptons. The fact that this only happens after running it through myth's transcode points to something mythtranscode is doing?

comment:11 in reply to:  6 Changed 18 years ago by anonymous

Replying to ghaushe:

It is expected that you'll loose your subtitles. There is no way to convert subtitles from a TS to a PS stream (without a huge amount of work).

Please elaborate. I think this is a needed feature, if lack of it isn't a bug. Is this TS/PS issue, mythtranscode design issue, mythtranscode implementation issue?

Should the lack of subtitles be a separate ticket.

comment:12 Changed 18 years ago by anonymous

Could this be linked to ticket 2797?

comment:13 Changed 18 years ago by adrian.wilkins@…

This is not purely limited to mythtranscode - if you use mplayer to play back streams over http via mythweb, the same fault can occur. mplayer is capable of listing all the audio streams, but for some reason it picks the wrong one on some streams. I thought it was a codec problem until a female voice started announcing incidental events :-) . You can instruct it which stream to play with the -aid option, which doesn't exactly help us.

Might be able to enlist an mplayer developer to help out though, since the problem seems to be in the code that we filch from them :-)

comment:14 in reply to:  9 Changed 18 years ago by anonymous

Just a quick note that this affects more than myth playback. When mytharchive transcodes, the second audio track (the one I want) gets dropped. This is because when mytharchivehelper analyses the mpg, it only detects the first track, so that is all that gets built into the DVD.

Temporary work-around is to deselect the "always transcode" option.

comment:15 Changed 18 years ago by J.Pilk@…

I no longer see this problem since I installed the 0.21 'bleeding' build from ATrpms. Now with programmes like the BBC 'Planet Earth' the two audio streams are present and correctly identified after one transcode. A second pass removes the low-data-rate stream. Previously the first pass swapped the two streams and the second pass removed the wanted one.

I wondered what had changed: it looks as if #2797 did it. It might perhaps be relevant that my hardware is affected by #1970 (limited PID filters); I don't think my installation has the 'fix' for that installed at present.

comment:16 Changed 18 years ago by josesuarez1983 <j.suarez.agapito@…>

I would really love to get the subtitles transcoded into the mpeg file which mythtranscode generates, since I like recording shows and then watch them in English. Subtitles are sometimes a great help. I wouldn't also mind if this meant a great processing task for the PC. I think that the ability to do that would be well worth. And I think that some of the tasks would be made by transcode. Am I wrong? I have muxed subtitles into mpeg files before by using submux.

comment:17 Changed 17 years ago by paulh

Component: mythtvmythtranscode

comment:18 Changed 16 years ago by FuzzyWuzzy

Sorry for the "me too" but I wanted to reiterate that mythtranscode needs to have some mechanism for handling subtitles, even if it's only an optional command line switch. Call me crazy, but shouldn't most modern hardware be capable of handling the extra overhead? Do any alternatives exist if this is a TS/PS issue?

I have some minor hearing loss, so I leave the subtitles on most of the time in case I miss a line of dialog in whatever I'm watching.

comment:19 Changed 16 years ago by stuartm

Milestone: unknown0.21.1
Resolution: fixed
Status: acceptedclosed
Ticket locked: set

The original issue of audio swapping has been dealt with according to J.Pilk. Ghause has stated that keeping subtitles when transcoding is a difficult feature request and as such, the ticket is no longer valid.

Note: See TracTickets for help on using tickets.