Win Audio stream selection
#1
Hello,

I am using the wmc plugin to watch freeview (UK OTA DVB-T) however I often have to manually change the audio stream to hear sound.

There always seems to be 2 audio streams but it varies as to which one is the normal audio and which is e.g. for the visually impaired etc.

WMC itself must always pick the correct stream as we never have to alter anything - is this a known issue with server-wmc or the pvr plugin?


xbmc log:
http://pastebin.com/pHkKR0hH

server wmc log:
http://pastebin.com/G32pK1cM

Thanks for any help!
Reply
#2
Well its a known issue now. We have had trouble with in the past having xbmc grab the wrong stream from serverwmc, thats why we put in the option to only remux one language stream. Your problem is different, in that you have two 'eng' (English) streams. So we need to figure out how to differentiate them so only the correct stream is output - just looking at the log, it looks like the 'impaired' stream is mono - but hopefully there is something better to use then that.

When you can, please record a two minute or so clip from one of these channels and upload the clip to here:
https://drive.google.com/?authuser=0#fol...zFhZmNPWUE

Please post here when it is there. Thanks for bringing this up.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#3
Hello Krusty, I have uploaded some video of a channel with this problem, not 2 mins long but hopefully enough to see what is going on with the audio!

The filename is

LiveTV_htpc-PC_DVB-T_4_2014_01_10_17_44_39

and there is the wtv file and ts file in there
Reply
#4
Thanks for uploading the files, I will check it out.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#5
Recording BBC World News from PBS here in the States experiences the same audio selection issue for me. Not sure if that will allow you to test/reproduce the issue Krusty.
Reply
#6
clientxero, are you also getting two 'eng' audio streams, one stereo and one mono?

I will probably just take the easy way out and put in an option to filter out 'mono' audio streams if more than one audio stream is present. I should be able to get it in the next release.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#7
In my googling I have seen some examples where the visual impaired track is in stereo rather than mono. it would be interesting if there is something else in there that helps identify it. It seems like perhaps in this case, where the impaired stream was stereo, ffmpeg did have "visually impaired" annotated on it. perhaps that string is available somewhere and we could also look for "impaired"

https://trac.ffmpeg.org/ticket/2025

Also here is same problem happening for microsoft tool, havent found info on how to tell correct stream as yet though
http://answers.microsoft.com/en-us/windo...e8548c6d30
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#8
(2014-01-14, 02:42)scarecrow420 Wrote: In my googling I have seen some examples where the visual impaired track is in stereo rather than mono. it would be interesting if there is something else in there that helps identify it. It seems like perhaps in this case, where the impaired stream was stereo, ffmpeg did have "visually impaired" annotated on it. perhaps that string is available somewhere and we could also look for "impaired"

https://trac.ffmpeg.org/ticket/2025

Also here is same problem happening for microsoft tool, havent found info on how to tell correct stream as yet though
http://answers.microsoft.com/en-us/windo...e8548c6d30

I'll look again, but I didn't see anything like that. Not even sure where that info would go, unless there is a guid header for it.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#9
I found another reference to one way of doing it which is to pick the "best" audio track which means the highest number of channels with the highest bit rate so that could be an option. Obviously stereo beats mono there anyway so it would win out, but also if there were 2 stereo tracks but the normal one was higher b/r we would pick that. Also if there was AC3 5 channel sound for the normal stream, and stereo for the SAP (impaired) stream, we would pick the correct one there as well. So yeah maybe go by number of cannels, then bit rate

Eg look up "MCEBuddy sometimes creates video with no audio" on here: https://mcebuddy2x.codeplex.com/wikipage...n%20Issues



It also sounds like possibly setting inside WMC the language to "English" rather than "Content Default" might affect what/how the streams are output in the WTV files, that would be interesting to check as well

http://experts.windows.com/frms/windows_...ageIndex=2
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#10
Here's another example where the normal and impaired audio tracks appear to be the same channels and bit rate! Sad Although in this case, the SAP stream is listed as "nar" language (narrative i guess) rather than "eng". So in this case our existing setting to specify "only encode language code XXX" would work

Stream #0:1[0x68](nar): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16, 256 kb/s (visual impaired)
Stream #0:2[0x69](eng): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16, 256 kb/s
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#11
Yeah, so 'nar' I am used to, that's what our users in the UK normally report. What is weird about Kite's case is they are both marked 'eng'. What is the link for this listing? We need to find out where the '(visual impaired)' string came from.
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#12
The link was in my post above, here: https://trac.ffmpeg.org/ticket/2025

Looking at it again it may not be what we need, as they are converting a TS file to a WTV file. I guess I hoped perhaps that there is more metadata on the audio stream than we choose to output to the log file. If not, then just go with number of tracks and bandwidth
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#13
@Scarecrow, check this scary looking code, it looks like if we can find the 'EVENTID_AudioTypeSpanningEvent' guid, we can determine if its an 'impaired' stream.

link:
http://ffmpeg.org/pipermail/ffmpeg-cvslo...34321.html
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply
#14
clearly your google-fu is superior to mine Smile Nice find

Yes we do see those GUIDs - here is some debug logged WTV headers. This particular WTV file had eng and spa audio tracks and we can see 2 headers (28 and 41) are AudioTypeSpanningEvent type and for streams 77 and 78.

Pretty clean really.

Code:
2014/01/12 09:08:38.163    Remux::FindDescriptors> Scanning wtv for streams...
2014/01/12 09:08:39.600    Parse> Header 1:    STREAM1_GUID                                   (len: 166    stream: 70)
2014/01/12 09:08:39.601    Parse> Guid: 0 took 1.39 sec, it was attempted 685 times
2014/01/12 09:08:39.616    Parse> Header 2:    SYNC_GUID                                      (len: 056    stream: 0)
2014/01/12 09:08:39.616    Parse> Header 3:    STREAM1_GUID                                   (len: 166    stream: 72)
2014/01/12 09:08:39.616    Parse> Header 4:    STREAM1_GUID                                   (len: 188    stream: 3)
2014/01/12 09:08:39.616    Parse> Header 5:    STREAM1_GUID                                   (len: 188    stream: 4)
2014/01/12 09:08:39.616    Parse> Header 6:    STREAM1_GUID                                   (len: 364    stream: 73)
2014/01/12 09:08:39.616    Parse> Header 7:    STREAM1_GUID                                   (len: 116    stream: 6)
2014/01/12 09:08:39.617    Parse> Header 8:    STREAM1_GUID                                   (len: 148    stream: 67)
2014/01/12 09:08:39.617    Parse> Header 9:    STREAM1_GUID                                   (len: 148    stream: 8)
2014/01/12 09:08:39.617    Parse> Header 10:    RunTime - 8                                    (len: 064    stream: 0)
2014/01/12 09:08:39.617    Parse> Header 11:    STREAM_INFO_ALL_GUID                           (len: 158    stream: 74)
2014/01/12 09:08:39.617    Parse> Header 12:    INDEX_GUID                                     (len: 448    stream: 0)
2014/01/12 09:08:39.617    Parse> Header 13:    STREAM_INFO_ALL_GUID                           (len: 356    stream: 75)
2014/01/12 09:08:39.617    Parse> Header 14:    EVENTID_ChannelInfoSpanningEvent               (len: 056    stream: 0)
2014/01/12 09:08:39.617    Parse> Header 15:    STREAM_INFO_GUID                               (len: 156    stream: 76)
2014/01/12 09:08:39.617    Parse> Header 16:    STREAM_INFO_ALL_GUID                           (len: 140    stream: 76)
2014/01/12 09:08:39.618    Parse> Header 17:    EVENTID_ChannelChangeSpanningEvent             (len: 056    stream: 0)
2014/01/12 09:08:39.618    Parse> Header 18:    Unknown 0                                      (len: 040    stream: 0)
2014/01/12 09:08:39.618    Parse> Header 19:    EVENTID_CtxADescriptorSpanningEvent            (len: 049    stream: 0)
2014/01/12 09:08:39.618    Parse> Header 20:    STREAM_INFO_GUID                               (len: 174    stream: 77)
2014/01/12 09:08:39.618    Parse> Header 21:    STREAM_INFO_ALL_GUID                           (len: 158    stream: 77)
2014/01/12 09:08:39.618    Parse> Header 22:    TIMING_GUID                                    (len: 088    stream: 77)
2014/01/12 09:08:39.618    Parse> Header 23:    DATA_GUID                                      (len: 032    stream: 77)
2014/01/12 09:08:39.618    Parse> Header 24:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 77)
2014/01/12 09:08:39.618    Parse> Header 25:    EVENTID_StreamTypeSpanningEvent                (len: 044    stream: 77)
2014/01/12 09:08:39.619    Parse> Header 26:    INDEX_GUID                                     (len: 496    stream: 0)
2014/01/12 09:08:39.619    Parse> Header 27:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 77)
2014/01/12 09:08:39.619    Parse> Header 28:    EVENTID_AudioTypeSpanningEvent                 (len: 041    stream: 77)
2014/01/12 09:08:39.619    Parse> Header 29:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 77)
2014/01/12 09:08:39.619    Parse> Header 30:    LANGUAGE_GUID                                  (len: 048    stream: 77)
2014/01/12 09:08:39.620    Parse> Header 31:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 77)
2014/01/12 09:08:39.620    Parse> Header 32:    EVENTID_PIDListSpanningEvent                   (len: 048    stream: 77)
2014/01/12 09:08:39.620    Parse> Header 33:    STREAM_INFO_GUID                               (len: 174    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 34:    STREAM_INFO_ALL_GUID                           (len: 158    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 35:    TIMING_GUID                                    (len: 088    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 36:    DATA_GUID                                      (len: 032    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 37:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 38:    EVENTID_StreamTypeSpanningEvent                (len: 044    stream: 78)
2014/01/12 09:08:39.620    Parse> Header 39:    INDEX_GUID                                     (len: 384    stream: 0)
2014/01/12 09:08:39.621    Parse> Header 40:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 78)
2014/01/12 09:08:39.621    Parse> Header 41:    EVENTID_AudioTypeSpanningEvent                 (len: 041    stream: 78)
2014/01/12 09:08:39.621    Parse> Header 42:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 78)
2014/01/12 09:08:39.621    Parse> Header 43:    LANGUAGE_GUID                                  (len: 048    stream: 78)
2014/01/12 09:08:39.621    Parse> Header 44:    DSATTRIB_TRANSPORT_PROPERTIES                  (len: 064    stream: 78)
2014/01/12 09:08:39.621    Parse> Header 45:    EVENTID_PIDListSpanningEvent                   (len: 048    stream: 78)

Code:
2014/01/12 09:08:40.223    Remux::FindDescriptors> wtv scanned (2.07 sec), Streams found:
2014/01/12 09:08:40.224     >  Other: ID:76 MS TV Caption
2014/01/12 09:08:40.225     >  Audio: ID:77 (eng) AC3 5.1 48000 Hz 384 kb/s
2014/01/12 09:08:40.225     >  Audio: ID:78 (spa) AC3 2.0 48000 Hz 192 kb/s
2014/01/12 09:08:40.226     >  Video: ID:79 MPEG-2 MP-HL 1280x720p fps: 60000/1001 AR: 16:9

Looks like that FFMPEG code also has another guid header (EVENTID_DVBScramblingControlSpanningEvent) then checks if language is NAR and sets the disposition to impaired there as well. Not sure if we need to do that since we are already happy enough to say that NAR wouldnt be remuxed
pvr.wmc TV addon and ServerWMC Backend Development Team
http://bit.ly/ServerWMC
Reply
#15
lol, that because you are a real programmer, I am a 'google' programmer.

Great info. So one of us should do this...
Windows Media Center PVR addon (pvr.wmc) and server backend (ServerWMC)
http://bit.ly/serverwmc
Reply

Logout Mark Read Team Forum Stats Members Help
Audio stream selection0