Opened 12 years ago

Closed 12 years ago

#3686 closed defect (worksforme)

Mytharchive / Mythreplex ignores second audio track even after having been detected by mythtranscode and in streaminfo.xml

Reported by: anonymous Owned by: paulh
Priority: minor Milestone: 0.21
Component: mytharchive Version: head
Severity: medium Keywords: audio tracks, mythreplex, mytharchive
Cc: j.suarez.agapito@… Ticket locked: no

Description

I can't know if the following bug is related to mytharchive or mythreplex. I am describing what happens, so if it has to be moved to another category, please do so. Thanks for any inconvenience.

I have a 2 audio tracks recording that I want to burn to a DVD. I have tried both letting Mytharchive use the cutlist and do it all on his own, and using mythtranscode to remove the commercials and then use mytharchive to burn the resulting file (without using the cut list), but I got burnt a single audio track DVD in both cases.

This is weird since I get the following output while doing 'ffmpeg -i' to the newfile.mpeg file: jose@amd64:/home/mythtv/temp/work/1$ ffmpeg -i newfile.mpg FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.

configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr libavutil version: 1d.49.3.0 libavcodec version: 1d.51.38.0 libavformat version: 1d.51.10.0 built on Jun 3 2007 20:59:25, gcc: 4.1.3 20070528 (prerelease) (Ubuntu 4.1.2-9ubuntu2)

Input #0, mpeg, from 'newfile.mpg':

Duration: 01:27:43.9, start: 0.360000, bitrate: 4143 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r) Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s Stream #0.2[0x1c1]: Audio: mp2, 48000 Hz, stereo, 192 kb/s

Must supply at least one output file

So the newfile has 2 audio tracks (just like to original recording) But then the problem arises (I think) when mythreplex is used to demux all the streams from the newfile.mpeg file. Only a video and one audio streams are demuxed and the second audio track is ignored. (So I don't know if the problem comes from mytharchive not invoking mythreplex properly or from a bug in mythreplex).

The final.mpeg file only has one audio track: jose@amd64:/home/mythtv/temp/work/1$ ffmpeg -i final.mpg FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.

configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr libavutil version: 1d.49.3.0 libavcodec version: 1d.51.38.0 libavformat version: 1d.51.10.0 built on Jun 3 2007 20:59:25, gcc: 4.1.3 20070528 (prerelease) (Ubuntu 4.1.2-9ubuntu2)

Input #0, mpeg, from 'final.mpg':

Duration: 01:27:43.8, start: 0.184656, bitrate: 3982 kb/s Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576, 15000 kb/s, 25.00 fps(r) Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, stereo, 192 kb/s

Must supply at least one output file

I am attaching the following log files so that the problem can be tracked down: mythburn.log progress.log streaminfo_orig.xml streaminfo.xml

P.S.: The error that shows in the logs about growfs not being able to burn the project is because I removed the blank dvd from the dvd recorder because i didn't want to have another one-audio-track dvd. I already have one, and that's enough for today! ;)

Attachments (4)

mythburn.log (125.0 KB) - added by anonymous 12 years ago.
progress.log (8.0 KB) - added by anonymous 12 years ago.
streaminfo_orig.xml (647 bytes) - added by anonymous 12 years ago.
streaminfo.xml (638 bytes) - added by anonymous 12 years ago.

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by anonymous

Attachment: mythburn.log added

Changed 12 years ago by anonymous

Attachment: progress.log added

Changed 12 years ago by anonymous

Attachment: streaminfo_orig.xml added

Changed 12 years ago by anonymous

Attachment: streaminfo.xml added

comment:1 Changed 12 years ago by anonymous

Sorry, I meant sorry for any inconvenience (not thanks :S ). If anyone needs more info about the problems described or someone needs me to do any other tests or tries, feel free to ask.

comment:2 Changed 12 years ago by anonymous

Forgot to tell I'm using SVN rev 13790.

comment:3 Changed 12 years ago by paulh

MythArchive? chooses which audio track(s) to use based on what you have set your preferred languages to on Myth's localization settings page. In your case there both set to 'spa' so if you wanted to have say both a Spanish and English audio tracks you would have to change your secondary language preference to 'eng'.

Unfortunately that wouldn't have made any difference in this case because the audio tracks in the original file passed to MythArchive? (/home/mythtv/Peliculas/1531_20070629215500.mpg) is missing the language codes needed to intelligently guess which tracks to include so it just adds the track with the lowest PID which should be the primary audio track and ignores the second track.

I can see there may be a case where if there are only two audio tracks and neither has a valid language code it should just add both tracks for good measure but that would annoy some people here in the UK because the second audio track usually has the audio described track which most people don't want on there DVD's :-(.

comment:4 Changed 12 years ago by anonymous

Mmmm... That's quite an inconvenience for Spanish users (and probably other countries' users) since most TV broadcasters here set the first audio stream to 'esp' (Spanish) and the second to 'qaa' or 'dos' (which means two) or '2' (I really don't know what the hell qaa means... probably refers to unknown or indetermined, but not sure). And I think they do that because sometimes they bradcast series or movies from France, Germany, Japan,... and at that moment the second audio track is used to include the original audio track. So the 2nd audio track is not always English, and tagging it as English would not be correct... I wonder how MythArchive? could manage that...

comment:5 Changed 12 years ago by anonymous

Alright, this are my findings about the code broadcasters show for the different audio tracks:

Some use the following: "Spanish; Castilian MP2 2ch" and "Reserved for local use MP2 2ch" In the second track they broadcast the movie original audio track
Others use: "Spanish; Castilian MP2 2ch" and "English MP2 2ch", as it should be done.
Others: "Spanish; Castilian MP2 2ch" and "Unknown MP2 2ch" And finally others: "Spanish; Castilian MP2 2ch" and "Undetermined MP2 2ch" And there are also quite a few stations that just broadcast a single audio track (crapy Spanish TV broadcasters... Really!) I hope these findings help.

Maybe it would be a good improvement to add an option where you could choose to override the global MythTV language settings and tell MythArchive? to extract and burn into the DVD all the audio tracks it finds in the original recording...
Well, you could change this ticket to wishlist after what you told me about it all.
Thanks for your time, paulh.

comment:6 Changed 12 years ago by anonymous

Setting the 2nd preferred language to undetermined solves the problem for this particular recording, but given all the different codes given to the 2nd audio track by the broadcasters I don't know if it will work for any other recording or if I should have to keep changing the preferred languages all the time! (By the way, this recording was taken from a broadcaster which sends the 2nd audio track as Reserved for local use, and it works with the undetermined language set as second preferred language).

comment:7 Changed 12 years ago by paulh

Actually setting the second preferred language to something different than the first like you have done will work for all the cases you described.

The code that determines what streams to use is here:- http://svn.mythtv.org/trac/browser/trunk/mythplugins/mytharchive/mythburn/scripts/mythburn.py?rev=13701#L3219

So basically if you set your preferred languages to 'spa' for both then MythArchive? will only ever choose one audio track. If you set them to two different languages then MythArchive? will always add two audio tracks if there are two or more available. It will always try to use audio tracks that match your preferred languages if that information is available otherwise it will use the best two tracks available preferring ac3 tracks if they are available or the two tracks with the lowest PID.

comment:8 Changed 12 years ago by paulh

Resolution: worksforme
Status: newclosed

I think it already does its best to automatically choose the correct audio tracks based on the available info and what preferred languages the user has set.

I'll add some additional info on MythArchive?'s wiki page to hopefully clarify how the audio track selection works and what you can do if your broadcaster sends two tracks but the second track isn't flagged properly with the correct language code.

Note: See TracTickets for help on using tickets.