Multiple audio tracks in MPEG file

  • Stefan Rehm
    Stefan Rehm


    I`m using a recent cvs version of xineliboutput (checked out two days ago) in combination with the xine-lib 1.2 branch and vdr 1.7.14. When using the media player to play a mpeg file that contains an mpeg2 video and multiple audio tracks (mp2 or ac3, does not make any difference) I`m unable to switch between the audio tracks via the audio menu (main menu -> press green key), since there is only one track displayed in the track menu ("001").
    However, switching audio tracks works like a charme e.g. for Ogg Media containers with a Divx video and multiple Vorbis audio streams, so I guess the issue is container related.
    Is this a bug/missing feature or is switching audio tracks in mpeg file supposed to work and I`m doing something wrong here ;)?

  • Can you switch audio tracks if you play the file using xine-ui or gxine ?

  • Stefan Rehm
    Stefan Rehm

    Yes, xine-ui can switch those audio tracks.

  • mase76

    Yes, that would be a nice feature. I also have many videos with 2 audio tracks.
    I cannot switch within xineliboutput.

  • Stefan Rehm
    Stefan Rehm

    Seems like the reason why one can switch the audio tracks in xine-ui is, that xine-ui presents a default list of audio track  ids (something in the range of 1-15 if I remeber correctly) when there is no further information in the container. Is it possible for xineliboutput to do the same?

  • The reason seems to be missing audio language codes. Please try this patch:

    --- xine_input_vdr.c    2011-06-17 17:26:17.000000000 +0300
    +++ xine_input_vdr.c    2011-06-19 00:13:27.000000000 +0300
    @@ -3622,6 +3798,10 @@
           cnt += snprintf(tracks+cnt, sizeof(tracks)-cnt-32,
                          "%s%d:%s ", i==current?"*":"", i, trim_str(lang));
    +    } else if (i < this->>audio_track_map_entries) {
    +      cnt += snprintf(tracks+cnt, sizeof(tracks)-cnt-32,
    +                     "%s%d:%d ", i==current?"*":"", i, i);
    +      n++;
       tracks[sizeof(tracks)-1] = 0;
  • Stefan Rehm
    Stefan Rehm

    Works like a charm. Thanks a lot!

  • Applied to CVS. Thanks for testing !