vdr xine-lib eac3

Message ID 201003251608.20823.jareguero@telefonica.net
State New
Headers

Commit Message

Jose Alberto Reguero March 25, 2010, 3:08 p.m. UTC
  Patch for xine-lib that don't need to patch remux.c to work.

Jose Alberto

El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now must
> work if you patch remux.c.
> You must have the latest xine-lib and xineliboutput. Yesterday both have
> changes about eac3.
> 
> Jose Alberto
> 
> El Jueves, 25 de Marzo de 2010, zaverel escribió:
> > The typo was on remux.c  => lost  : and ;
> > 
> > Anyway xine-lib has been updated and your patch don't apply.
> > 
> > Update is for eac3 with mkv
> > 
> > i don't test it yet
> > 
> > 
> > 
> > corrected remux.c
> > 
> > line 533
> > case SI::AC3DescriptorTag:
> > +case SI::EnhancedAC3DescriptorTag:
> > 
> > 
> > and in line 191:
> > 
> > -Target[i++] = SI::AC3DescriptorTag;
> > +Target[i++] = SI::EnhancedAC3DescriptorTag;
> > 
> > Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
> > > I attached a second version of the first patch.
> > > I make the same changes that in the second patch, but maintaining the
> > > logic of the first patch. Also I commented the line:
> > > +//        this->context->request_channels = 2;
> > > because your example has 5 channels. If you have trouble with that you
> > > can comment the line again.
> > > Which  typo error has the second patch?
> > > 
> > > Jose Alberto
> > > 
> > > El Miércoles, 24 de Marzo de 2010, zaverel escribió:
> > >> i 've patched pat.c and now remux.c
> > >> and with use xine-lib-1.2 with your second patch (who has typo error)
> > >> and that doesn't work.
> > >> 
> > >> corrected remux.c
> > >> 
> > >> line 533
> > >> case SI::AC3DescriptorTag:
> > >> +case SI::EnhancedAC3DescriptorTag:
> > >> 
> > >> 
> > >> and in line 191:
> > >> 
> > >> -Target[i++] = SI::AC3DescriptorTag;
> > >> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> > >> 
> > >> 
> > >> 
> > >> with your previously patch and just pat.c patched with
> > >> line 402
> > >> 
> > >> case SI::AC3DescriptorTag:
> > >> +case SI:EnhancedAC3DescriptorTag:
> > >> 
> > >> that worked but not stable.
> > >> 
> > >> Is your sample eac3 has |"Spectral extension" ?
> > >> because in france dvb-t with eac3 has it
> > >> and need a ffmpeg patched for that.
> > >> And i test with that sound.
> > >> 
> > >> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
> > >>> It works here with a old sample of tdt with eac3. Have you patch also
> > >>> remux.c? You need to change in line 533:
> > >>> 
> > >>> case SI::AC3DescriptorTag:
> > >>> +case SI:EnhancedAC3DescriptorTag:
> > >>> 
> > >>> and in line 191:
> > >>> 
> > >>> -Target[i++] = SI::AC3DescriptorTag;
> > >>> +Target[i++] = SI::EnhancedAC3DescriptorTag
> > >>> 
> > >>> Jose Alberto
> > >>> 
> > >>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
> > >>>> Hi
> > >>>> 
> > >>>> I have made previous test with the version release by Petri
> > >>>> Hintukainen
> > >>>> 
> > >>>> And I notice this part is not working like it should
> > >>>> 
> > >>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw
> > >>>> */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
> > >>>> +      m->content   = p;
> > >>>> +      m->size = packet_len;
> > >>>> +      m->type |= BUF_AUDIO_EAC3;
> > >>>> +      return 1;
> > >>>> +
> > >>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3
> > >>>> - raw */
> > >>>> 
> > >>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
> > >>>> STREAM_AUDIO_AC3, so the program never run the first if (installed a
> > >>>> debug printf here)
> > >>>> 
> > >>>> It seems that your first approach (at least what I understood) by
> > >>>> forcing the decoding of all AC-3 stream by ffmepg instead of
> > >>>> internal lib was nice but generate violent segfault on libavcodec
> > >>>> 
> > >>>> Hope this help you
> > >>>> 
> > >>>> Best regards
> > >>>> 
> > >>>> PS : Sorry to pollute the vdr mailing list (not subscribed to ffmpeg
> > >>>> or xine-lib....)
> > >>>> 
> > >>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
> > >>>>> hello
> > >>>>> 
> > >>>>>  your second patch doesn't work  : no sound on eac3 channel
> > >>>>> 
> > >>>>> if you want there is a sample of vdr hd-eac3 recording here:
> > >>>>> 
> > >>>>> http://dl.free.fr/ew4rJddM8
> > >>>>> 
> > >>>>>  103mo
> > >>>>> 
> > >>>>> else , i don't know what mailing-list is the more indicate for
> > >>>>> debuging
> > >>>>> 
> > >>>>> the vdr or xine-dev mailing-list ?
> > >>>>> 
> > >>>>> _______________________________________________
> > >>>>> vdr mailing list
> > >>>>> vdr@linuxtv.org
> > >>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>>> 
> > >>>> _______________________________________________
> > >>>> vdr mailing list
> > >>>> vdr@linuxtv.org
> > >>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>> 
> > >>> _______________________________________________
> > >>> vdr mailing list
> > >>> vdr@linuxtv.org
> > >>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > > 
> > > _______________________________________________
> > > vdr mailing list
> > > vdr@linuxtv.org
> > > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  

Comments

zaverel March 25, 2010, 4:54 p.m. UTC | #1
Yes ! that work just with your last patch xine-eac3_5.diff
and without had to patch xineliboutput.

i do my last test with vdr-1.7.14 and patch pat.c

line 402

case SI::AC3DescriptorTag:
+case SI:EnhancedAC3DescriptorTag:


just don't forget to activate "dolby digital" in vdr settings

Thank you for your work.

now remains to see if it's stable

Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
> Patch for xine-lib that don't need to patch remux.c to work.
>
> Jose Alberto
>
> El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
>   
>> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now must
>> work if you patch remux.c.
>> You must have the latest xine-lib and xineliboutput. Yesterday both have
>> changes about eac3.
>>
>> Jose Alberto
>>
>> El Jueves, 25 de Marzo de 2010, zaverel escribió:
>>     
>>> The typo was on remux.c  => lost  : and ;
>>>
>>> Anyway xine-lib has been updated and your patch don't apply.
>>>
>>> Update is for eac3 with mkv
>>>
>>> i don't test it yet
>>>
>>>
>>>
>>> corrected remux.c
>>>
>>> line 533
>>> case SI::AC3DescriptorTag:
>>> +case SI::EnhancedAC3DescriptorTag:
>>>
>>>
>>> and in line 191:
>>>
>>> -Target[i++] = SI::AC3DescriptorTag;
>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>
>>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
>>>       
>>>> I attached a second version of the first patch.
>>>> I make the same changes that in the second patch, but maintaining the
>>>> logic of the first patch. Also I commented the line:
>>>> +//        this->context->request_channels = 2;
>>>> because your example has 5 channels. If you have trouble with that you
>>>> can comment the line again.
>>>> Which  typo error has the second patch?
>>>>
>>>> Jose Alberto
>>>>
>>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
>>>>         
>>>>> i 've patched pat.c and now remux.c
>>>>> and with use xine-lib-1.2 with your second patch (who has typo error)
>>>>> and that doesn't work.
>>>>>
>>>>> corrected remux.c
>>>>>
>>>>> line 533
>>>>> case SI::AC3DescriptorTag:
>>>>> +case SI::EnhancedAC3DescriptorTag:
>>>>>
>>>>>
>>>>> and in line 191:
>>>>>
>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>>>
>>>>>
>>>>>
>>>>> with your previously patch and just pat.c patched with
>>>>> line 402
>>>>>
>>>>> case SI::AC3DescriptorTag:
>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>
>>>>> that worked but not stable.
>>>>>
>>>>> Is your sample eac3 has |"Spectral extension" ?
>>>>> because in france dvb-t with eac3 has it
>>>>> and need a ffmpeg patched for that.
>>>>> And i test with that sound.
>>>>>
>>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
>>>>>           
>>>>>> It works here with a old sample of tdt with eac3. Have you patch also
>>>>>> remux.c? You need to change in line 533:
>>>>>>
>>>>>> case SI::AC3DescriptorTag:
>>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>>
>>>>>> and in line 191:
>>>>>>
>>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
>>>>>>
>>>>>> Jose Alberto
>>>>>>
>>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
>>>>>>             
>>>>>>> Hi
>>>>>>>
>>>>>>> I have made previous test with the version release by Petri
>>>>>>> Hintukainen
>>>>>>>
>>>>>>> And I notice this part is not working like it should
>>>>>>>
>>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw
>>>>>>> */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
>>>>>>> +      m->content   = p;
>>>>>>> +      m->size = packet_len;
>>>>>>> +      m->type |= BUF_AUDIO_EAC3;
>>>>>>> +      return 1;
>>>>>>> +
>>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3
>>>>>>> - raw */
>>>>>>>
>>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
>>>>>>> STREAM_AUDIO_AC3, so the program never run the first if (installed a
>>>>>>> debug printf here)
>>>>>>>
>>>>>>> It seems that your first approach (at least what I understood) by
>>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
>>>>>>> internal lib was nice but generate violent segfault on libavcodec
>>>>>>>
>>>>>>> Hope this help you
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to ffmpeg
>>>>>>> or xine-lib....)
>>>>>>>
>>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
>>>>>>>               
>>>>>>>> hello
>>>>>>>>
>>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
>>>>>>>>
>>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
>>>>>>>>
>>>>>>>> http://dl.free.fr/ew4rJddM8
>>>>>>>>
>>>>>>>>  103mo
>>>>>>>>
>>>>>>>> else , i don't know what mailing-list is the more indicate for
>>>>>>>> debuging
>>>>>>>>
>>>>>>>> the vdr or xine-dev mailing-list ?
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> vdr mailing list
>>>>>>>> vdr@linuxtv.org
>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>>                 
>>>>>>> _______________________________________________
>>>>>>> vdr mailing list
>>>>>>> vdr@linuxtv.org
>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>               
>>>>>> _______________________________________________
>>>>>> vdr mailing list
>>>>>> vdr@linuxtv.org
>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>             
>>>> _______________________________________________
>>>> vdr mailing list
>>>> vdr@linuxtv.org
>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>         
>   
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
  
zaverel March 26, 2010, 11:07 a.m. UTC | #2
After some test there are some issue:
ramdom crash at start up or without sound.
But the real probleme i think is with 5.0 sound.

In the sample the 2.0 audio out is good
but the 5.0 has low volume and metallic sound

just try xine
fra piste 5.0
ffmpeg_audio_dec: unknown header with buf type 0x3000000

qaa 2.0
is good

ffmpeg -i 00001.ts
...
Input #0, mpegts, from '00001.ts':
  Duration: 00:02:10.51, start: 10461.634989, bitrate: 6905 kb/s
  Program 132
    Stream #0.0[0x78]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR
16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x82](fra): Audio: eac3, 48000 Hz, 5.0, s16, 256 kb/s
    Stream #0.2[0x83](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.3[0x8c](fra): Subtitle: dvbsub
    Stream #0.4[0x8d](fra): Subtitle: dvbsub




Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
> Patch for xine-lib that don't need to patch remux.c to work.
>
> Jose Alberto
>
> El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
>   
>> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now must
>> work if you patch remux.c.
>> You must have the latest xine-lib and xineliboutput. Yesterday both have
>> changes about eac3.
>>
>> Jose Alberto
>>
>> El Jueves, 25 de Marzo de 2010, zaverel escribió:
>>     
>>> The typo was on remux.c  => lost  : and ;
>>>
>>> Anyway xine-lib has been updated and your patch don't apply.
>>>
>>> Update is for eac3 with mkv
>>>
>>> i don't test it yet
>>>
>>>
>>>
>>> corrected remux.c
>>>
>>> line 533
>>> case SI::AC3DescriptorTag:
>>> +case SI::EnhancedAC3DescriptorTag:
>>>
>>>
>>> and in line 191:
>>>
>>> -Target[i++] = SI::AC3DescriptorTag;
>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>
>>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
>>>       
>>>> I attached a second version of the first patch.
>>>> I make the same changes that in the second patch, but maintaining the
>>>> logic of the first patch. Also I commented the line:
>>>> +//        this->context->request_channels = 2;
>>>> because your example has 5 channels. If you have trouble with that you
>>>> can comment the line again.
>>>> Which  typo error has the second patch?
>>>>
>>>> Jose Alberto
>>>>
>>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
>>>>         
>>>>> i 've patched pat.c and now remux.c
>>>>> and with use xine-lib-1.2 with your second patch (who has typo error)
>>>>> and that doesn't work.
>>>>>
>>>>> corrected remux.c
>>>>>
>>>>> line 533
>>>>> case SI::AC3DescriptorTag:
>>>>> +case SI::EnhancedAC3DescriptorTag:
>>>>>
>>>>>
>>>>> and in line 191:
>>>>>
>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>>>
>>>>>
>>>>>
>>>>> with your previously patch and just pat.c patched with
>>>>> line 402
>>>>>
>>>>> case SI::AC3DescriptorTag:
>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>
>>>>> that worked but not stable.
>>>>>
>>>>> Is your sample eac3 has |"Spectral extension" ?
>>>>> because in france dvb-t with eac3 has it
>>>>> and need a ffmpeg patched for that.
>>>>> And i test with that sound.
>>>>>
>>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
>>>>>           
>>>>>> It works here with a old sample of tdt with eac3. Have you patch also
>>>>>> remux.c? You need to change in line 533:
>>>>>>
>>>>>> case SI::AC3DescriptorTag:
>>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>>
>>>>>> and in line 191:
>>>>>>
>>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
>>>>>>
>>>>>> Jose Alberto
>>>>>>
>>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
>>>>>>             
>>>>>>> Hi
>>>>>>>
>>>>>>> I have made previous test with the version release by Petri
>>>>>>> Hintukainen
>>>>>>>
>>>>>>> And I notice this part is not working like it should
>>>>>>>
>>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw
>>>>>>> */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
>>>>>>> +      m->content   = p;
>>>>>>> +      m->size = packet_len;
>>>>>>> +      m->type |= BUF_AUDIO_EAC3;
>>>>>>> +      return 1;
>>>>>>> +
>>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3
>>>>>>> - raw */
>>>>>>>
>>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
>>>>>>> STREAM_AUDIO_AC3, so the program never run the first if (installed a
>>>>>>> debug printf here)
>>>>>>>
>>>>>>> It seems that your first approach (at least what I understood) by
>>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
>>>>>>> internal lib was nice but generate violent segfault on libavcodec
>>>>>>>
>>>>>>> Hope this help you
>>>>>>>
>>>>>>> Best regards
>>>>>>>
>>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to ffmpeg
>>>>>>> or xine-lib....)
>>>>>>>
>>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
>>>>>>>               
>>>>>>>> hello
>>>>>>>>
>>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
>>>>>>>>
>>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
>>>>>>>>
>>>>>>>> http://dl.free.fr/ew4rJddM8
>>>>>>>>
>>>>>>>>  103mo
>>>>>>>>
>>>>>>>> else , i don't know what mailing-list is the more indicate for
>>>>>>>> debuging
>>>>>>>>
>>>>>>>> the vdr or xine-dev mailing-list ?
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> vdr mailing list
>>>>>>>> vdr@linuxtv.org
>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>>                 
>>>>>>> _______________________________________________
>>>>>>> vdr mailing list
>>>>>>> vdr@linuxtv.org
>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>               
>>>>>> _______________________________________________
>>>>>> vdr mailing list
>>>>>> vdr@linuxtv.org
>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>             
>>>> _______________________________________________
>>>> vdr mailing list
>>>> vdr@linuxtv.org
>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>         
>   
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
  
Jose Alberto Reguero March 26, 2010, 12:12 p.m. UTC | #3
You can add the line:

this->context->request_channels = 2;

in line 247 and 295.

Then you have stereo sound.

Joae Alberto

El Viernes, 26 de Marzo de 2010, zaverel escribió:
> After some test there are some issue:
> ramdom crash at start up or without sound.
> But the real probleme i think is with 5.0 sound.
> 
> In the sample the 2.0 audio out is good
> but the 5.0 has low volume and metallic sound
> 
> just try xine
> fra piste 5.0
> ffmpeg_audio_dec: unknown header with buf type 0x3000000
> 
> qaa 2.0
> is good
> 
> ffmpeg -i 00001.ts
> ...
> Input #0, mpegts, from '00001.ts':
>   Duration: 00:02:10.51, start: 10461.634989, bitrate: 6905 kb/s
>   Program 132
>     Stream #0.0[0x78]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR
> 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
>     Stream #0.1[0x82](fra): Audio: eac3, 48000 Hz, 5.0, s16, 256 kb/s
>     Stream #0.2[0x83](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
>     Stream #0.3[0x8c](fra): Subtitle: dvbsub
>     Stream #0.4[0x8d](fra): Subtitle: dvbsub
> 
> Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
> > Patch for xine-lib that don't need to patch remux.c to work.
> > 
> > Jose Alberto
> > 
> > El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
> >> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now must
> >> work if you patch remux.c.
> >> You must have the latest xine-lib and xineliboutput. Yesterday both have
> >> changes about eac3.
> >> 
> >> Jose Alberto
> >> 
> >> El Jueves, 25 de Marzo de 2010, zaverel escribió:
> >>> The typo was on remux.c  => lost  : and ;
> >>> 
> >>> Anyway xine-lib has been updated and your patch don't apply.
> >>> 
> >>> Update is for eac3 with mkv
> >>> 
> >>> i don't test it yet
> >>> 
> >>> 
> >>> 
> >>> corrected remux.c
> >>> 
> >>> line 533
> >>> case SI::AC3DescriptorTag:
> >>> +case SI::EnhancedAC3DescriptorTag:
> >>> 
> >>> 
> >>> and in line 191:
> >>> 
> >>> -Target[i++] = SI::AC3DescriptorTag;
> >>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> >>> 
> >>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
> >>>> I attached a second version of the first patch.
> >>>> I make the same changes that in the second patch, but maintaining the
> >>>> logic of the first patch. Also I commented the line:
> >>>> +//        this->context->request_channels = 2;
> >>>> because your example has 5 channels. If you have trouble with that you
> >>>> can comment the line again.
> >>>> Which  typo error has the second patch?
> >>>> 
> >>>> Jose Alberto
> >>>> 
> >>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
> >>>>> i 've patched pat.c and now remux.c
> >>>>> and with use xine-lib-1.2 with your second patch (who has typo error)
> >>>>> and that doesn't work.
> >>>>> 
> >>>>> corrected remux.c
> >>>>> 
> >>>>> line 533
> >>>>> case SI::AC3DescriptorTag:
> >>>>> +case SI::EnhancedAC3DescriptorTag:
> >>>>> 
> >>>>> 
> >>>>> and in line 191:
> >>>>> 
> >>>>> -Target[i++] = SI::AC3DescriptorTag;
> >>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> with your previously patch and just pat.c patched with
> >>>>> line 402
> >>>>> 
> >>>>> case SI::AC3DescriptorTag:
> >>>>> +case SI:EnhancedAC3DescriptorTag:
> >>>>> 
> >>>>> that worked but not stable.
> >>>>> 
> >>>>> Is your sample eac3 has |"Spectral extension" ?
> >>>>> because in france dvb-t with eac3 has it
> >>>>> and need a ffmpeg patched for that.
> >>>>> And i test with that sound.
> >>>>> 
> >>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
> >>>>>> It works here with a old sample of tdt with eac3. Have you patch
> >>>>>> also remux.c? You need to change in line 533:
> >>>>>> 
> >>>>>> case SI::AC3DescriptorTag:
> >>>>>> +case SI:EnhancedAC3DescriptorTag:
> >>>>>> 
> >>>>>> and in line 191:
> >>>>>> 
> >>>>>> -Target[i++] = SI::AC3DescriptorTag;
> >>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
> >>>>>> 
> >>>>>> Jose Alberto
> >>>>>> 
> >>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
> >>>>>>> Hi
> >>>>>>> 
> >>>>>>> I have made previous test with the version release by Petri
> >>>>>>> Hintukainen
> >>>>>>> 
> >>>>>>> And I notice this part is not working like it should
> >>>>>>> 
> >>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw
> >>>>>>> */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
> >>>>>>> +      m->content   = p;
> >>>>>>> +      m->size = packet_len;
> >>>>>>> +      m->type |= BUF_AUDIO_EAC3;
> >>>>>>> +      return 1;
> >>>>>>> +
> >>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3
> >>>>>>> - raw */
> >>>>>>> 
> >>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
> >>>>>>> STREAM_AUDIO_AC3, so the program never run the first if (installed
> >>>>>>> a debug printf here)
> >>>>>>> 
> >>>>>>> It seems that your first approach (at least what I understood) by
> >>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
> >>>>>>> internal lib was nice but generate violent segfault on libavcodec
> >>>>>>> 
> >>>>>>> Hope this help you
> >>>>>>> 
> >>>>>>> Best regards
> >>>>>>> 
> >>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to
> >>>>>>> ffmpeg or xine-lib....)
> >>>>>>> 
> >>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
> >>>>>>>> hello
> >>>>>>>> 
> >>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
> >>>>>>>> 
> >>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
> >>>>>>>> 
> >>>>>>>> http://dl.free.fr/ew4rJddM8
> >>>>>>>> 
> >>>>>>>>  103mo
> >>>>>>>> 
> >>>>>>>> else , i don't know what mailing-list is the more indicate for
> >>>>>>>> debuging
> >>>>>>>> 
> >>>>>>>> the vdr or xine-dev mailing-list ?
> >>>>>>>> 
> >>>>>>>> _______________________________________________
> >>>>>>>> vdr mailing list
> >>>>>>>> vdr@linuxtv.org
> >>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>>>>> 
> >>>>>>> _______________________________________________
> >>>>>>> vdr mailing list
> >>>>>>> vdr@linuxtv.org
> >>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>>>> 
> >>>>>> _______________________________________________
> >>>>>> vdr mailing list
> >>>>>> vdr@linuxtv.org
> >>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>> 
> >>>> _______________________________________________
> >>>> vdr mailing list
> >>>> vdr@linuxtv.org
> >>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > 
> > _______________________________________________
> > vdr mailing list
> > vdr@linuxtv.org
> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
zaverel March 27, 2010, 2:18 p.m. UTC | #4
Is  ff_audio_decoder.c to patch ?
I try but that change nothing.


Le 26/03/2010 13:12, Jose Alberto Reguero a écrit :
> You can add the line:
>
> this->context->request_channels = 2;
>
> in line 247 and 295.
>
> Then you have stereo sound.
>
> Joae Alberto
>
> El Viernes, 26 de Marzo de 2010, zaverel escribió:
>   
>> After some test there are some issue:
>> ramdom crash at start up or without sound.
>> But the real probleme i think is with 5.0 sound.
>>
>> In the sample the 2.0 audio out is good
>> but the 5.0 has low volume and metallic sound
>>
>> just try xine
>> fra piste 5.0
>> ffmpeg_audio_dec: unknown header with buf type 0x3000000
>>
>> qaa 2.0
>> is good
>>
>> ffmpeg -i 00001.ts
>> ...
>> Input #0, mpegts, from '00001.ts':
>>   Duration: 00:02:10.51, start: 10461.634989, bitrate: 6905 kb/s
>>   Program 132
>>     Stream #0.0[0x78]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR
>> 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
>>     Stream #0.1[0x82](fra): Audio: eac3, 48000 Hz, 5.0, s16, 256 kb/s
>>     Stream #0.2[0x83](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
>>     Stream #0.3[0x8c](fra): Subtitle: dvbsub
>>     Stream #0.4[0x8d](fra): Subtitle: dvbsub
>>
>> Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
>>     
>>> Patch for xine-lib that don't need to patch remux.c to work.
>>>
>>> Jose Alberto
>>>
>>> El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
>>>       
>>>> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now must
>>>> work if you patch remux.c.
>>>> You must have the latest xine-lib and xineliboutput. Yesterday both have
>>>> changes about eac3.
>>>>
>>>> Jose Alberto
>>>>
>>>> El Jueves, 25 de Marzo de 2010, zaverel escribió:
>>>>         
>>>>> The typo was on remux.c  => lost  : and ;
>>>>>
>>>>> Anyway xine-lib has been updated and your patch don't apply.
>>>>>
>>>>> Update is for eac3 with mkv
>>>>>
>>>>> i don't test it yet
>>>>>
>>>>>
>>>>>
>>>>> corrected remux.c
>>>>>
>>>>> line 533
>>>>> case SI::AC3DescriptorTag:
>>>>> +case SI::EnhancedAC3DescriptorTag:
>>>>>
>>>>>
>>>>> and in line 191:
>>>>>
>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>>>
>>>>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
>>>>>           
>>>>>> I attached a second version of the first patch.
>>>>>> I make the same changes that in the second patch, but maintaining the
>>>>>> logic of the first patch. Also I commented the line:
>>>>>> +//        this->context->request_channels = 2;
>>>>>> because your example has 5 channels. If you have trouble with that you
>>>>>> can comment the line again.
>>>>>> Which  typo error has the second patch?
>>>>>>
>>>>>> Jose Alberto
>>>>>>
>>>>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
>>>>>>             
>>>>>>> i 've patched pat.c and now remux.c
>>>>>>> and with use xine-lib-1.2 with your second patch (who has typo error)
>>>>>>> and that doesn't work.
>>>>>>>
>>>>>>> corrected remux.c
>>>>>>>
>>>>>>> line 533
>>>>>>> case SI::AC3DescriptorTag:
>>>>>>> +case SI::EnhancedAC3DescriptorTag:
>>>>>>>
>>>>>>>
>>>>>>> and in line 191:
>>>>>>>
>>>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> with your previously patch and just pat.c patched with
>>>>>>> line 402
>>>>>>>
>>>>>>> case SI::AC3DescriptorTag:
>>>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>>>
>>>>>>> that worked but not stable.
>>>>>>>
>>>>>>> Is your sample eac3 has |"Spectral extension" ?
>>>>>>> because in france dvb-t with eac3 has it
>>>>>>> and need a ffmpeg patched for that.
>>>>>>> And i test with that sound.
>>>>>>>
>>>>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
>>>>>>>               
>>>>>>>> It works here with a old sample of tdt with eac3. Have you patch
>>>>>>>> also remux.c? You need to change in line 533:
>>>>>>>>
>>>>>>>> case SI::AC3DescriptorTag:
>>>>>>>> +case SI:EnhancedAC3DescriptorTag:
>>>>>>>>
>>>>>>>> and in line 191:
>>>>>>>>
>>>>>>>> -Target[i++] = SI::AC3DescriptorTag;
>>>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
>>>>>>>>
>>>>>>>> Jose Alberto
>>>>>>>>
>>>>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
>>>>>>>>                 
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> I have made previous test with the version release by Petri
>>>>>>>>> Hintukainen
>>>>>>>>>
>>>>>>>>> And I notice this part is not working like it should
>>>>>>>>>
>>>>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw
>>>>>>>>> */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
>>>>>>>>> +      m->content   = p;
>>>>>>>>> +      m->size = packet_len;
>>>>>>>>> +      m->type |= BUF_AUDIO_EAC3;
>>>>>>>>> +      return 1;
>>>>>>>>> +
>>>>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3
>>>>>>>>> - raw */
>>>>>>>>>
>>>>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
>>>>>>>>> STREAM_AUDIO_AC3, so the program never run the first if (installed
>>>>>>>>> a debug printf here)
>>>>>>>>>
>>>>>>>>> It seems that your first approach (at least what I understood) by
>>>>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
>>>>>>>>> internal lib was nice but generate violent segfault on libavcodec
>>>>>>>>>
>>>>>>>>> Hope this help you
>>>>>>>>>
>>>>>>>>> Best regards
>>>>>>>>>
>>>>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to
>>>>>>>>> ffmpeg or xine-lib....)
>>>>>>>>>
>>>>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
>>>>>>>>>                   
>>>>>>>>>> hello
>>>>>>>>>>
>>>>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
>>>>>>>>>>
>>>>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
>>>>>>>>>>
>>>>>>>>>> http://dl.free.fr/ew4rJddM8
>>>>>>>>>>
>>>>>>>>>>  103mo
>>>>>>>>>>
>>>>>>>>>> else , i don't know what mailing-list is the more indicate for
>>>>>>>>>> debuging
>>>>>>>>>>
>>>>>>>>>> the vdr or xine-dev mailing-list ?
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> vdr mailing list
>>>>>>>>>> vdr@linuxtv.org
>>>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>>>>                     
>>>>>>>>> _______________________________________________
>>>>>>>>> vdr mailing list
>>>>>>>>> vdr@linuxtv.org
>>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>>>                   
>>>>>>>> _______________________________________________
>>>>>>>> vdr mailing list
>>>>>>>> vdr@linuxtv.org
>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>>>                 
>>>>>> _______________________________________________
>>>>>> vdr mailing list
>>>>>> vdr@linuxtv.org
>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>>>>             
>>> _______________________________________________
>>> vdr mailing list
>>> vdr@linuxtv.org
>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>>>       
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
  
Jose Alberto Reguero April 4, 2010, 8:33 p.m. UTC | #5
Yes, the file is ff_audio_decoder.c 
You must put the line
this->context->request_channels = 2;
after
this->context->codec_tag   = _x_stream_info_get(this->stream, 
XINE_STREAM_INFO_AUDIO_FOURCC);

Jose Alberto

El Sábado, 27 de Marzo de 2010, zaverel escribió:
> Is  ff_audio_decoder.c to patch ?
> I try but that change nothing.
> 
> Le 26/03/2010 13:12, Jose Alberto Reguero a écrit :
> > You can add the line:
> > 
> > this->context->request_channels = 2;
> > 
> > in line 247 and 295.
> > 
> > Then you have stereo sound.
> > 
> > Joae Alberto
> > 
> > El Viernes, 26 de Marzo de 2010, zaverel escribió:
> >> After some test there are some issue:
> >> ramdom crash at start up or without sound.
> >> But the real probleme i think is with 5.0 sound.
> >> 
> >> In the sample the 2.0 audio out is good
> >> but the 5.0 has low volume and metallic sound
> >> 
> >> just try xine
> >> fra piste 5.0
> >> ffmpeg_audio_dec: unknown header with buf type 0x3000000
> >> 
> >> qaa 2.0
> >> is good
> >> 
> >> ffmpeg -i 00001.ts
> >> ...
> >> 
> >> Input #0, mpegts, from '00001.ts':
> >>   Duration: 00:02:10.51, start: 10461.634989, bitrate: 6905 kb/s
> >>   Program 132
> >>   
> >>     Stream #0.0[0x78]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR
> >> 
> >> 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
> >> 
> >>     Stream #0.1[0x82](fra): Audio: eac3, 48000 Hz, 5.0, s16, 256 kb/s
> >>     Stream #0.2[0x83](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
> >>     Stream #0.3[0x8c](fra): Subtitle: dvbsub
> >>     Stream #0.4[0x8d](fra): Subtitle: dvbsub
> >> 
> >> Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
> >>> Patch for xine-lib that don't need to patch remux.c to work.
> >>> 
> >>> Jose Alberto
> >>> 
> >>> El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
> >>>> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now
> >>>> must work if you patch remux.c.
> >>>> You must have the latest xine-lib and xineliboutput. Yesterday both
> >>>> have changes about eac3.
> >>>> 
> >>>> Jose Alberto
> >>>> 
> >>>> El Jueves, 25 de Marzo de 2010, zaverel escribió:
> >>>>> The typo was on remux.c  => lost  : and ;
> >>>>> 
> >>>>> Anyway xine-lib has been updated and your patch don't apply.
> >>>>> 
> >>>>> Update is for eac3 with mkv
> >>>>> 
> >>>>> i don't test it yet
> >>>>> 
> >>>>> 
> >>>>> 
> >>>>> corrected remux.c
> >>>>> 
> >>>>> line 533
> >>>>> case SI::AC3DescriptorTag:
> >>>>> +case SI::EnhancedAC3DescriptorTag:
> >>>>> 
> >>>>> 
> >>>>> and in line 191:
> >>>>> 
> >>>>> -Target[i++] = SI::AC3DescriptorTag;
> >>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> >>>>> 
> >>>>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
> >>>>>> I attached a second version of the first patch.
> >>>>>> I make the same changes that in the second patch, but maintaining
> >>>>>> the logic of the first patch. Also I commented the line:
> >>>>>> +//        this->context->request_channels = 2;
> >>>>>> because your example has 5 channels. If you have trouble with that
> >>>>>> you can comment the line again.
> >>>>>> Which  typo error has the second patch?
> >>>>>> 
> >>>>>> Jose Alberto
> >>>>>> 
> >>>>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
> >>>>>>> i 've patched pat.c and now remux.c
> >>>>>>> and with use xine-lib-1.2 with your second patch (who has typo
> >>>>>>> error) and that doesn't work.
> >>>>>>> 
> >>>>>>> corrected remux.c
> >>>>>>> 
> >>>>>>> line 533
> >>>>>>> case SI::AC3DescriptorTag:
> >>>>>>> +case SI::EnhancedAC3DescriptorTag:
> >>>>>>> 
> >>>>>>> 
> >>>>>>> and in line 191:
> >>>>>>> 
> >>>>>>> -Target[i++] = SI::AC3DescriptorTag;
> >>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> >>>>>>> 
> >>>>>>> 
> >>>>>>> 
> >>>>>>> with your previously patch and just pat.c patched with
> >>>>>>> line 402
> >>>>>>> 
> >>>>>>> case SI::AC3DescriptorTag:
> >>>>>>> +case SI:EnhancedAC3DescriptorTag:
> >>>>>>> 
> >>>>>>> that worked but not stable.
> >>>>>>> 
> >>>>>>> Is your sample eac3 has |"Spectral extension" ?
> >>>>>>> because in france dvb-t with eac3 has it
> >>>>>>> and need a ffmpeg patched for that.
> >>>>>>> And i test with that sound.
> >>>>>>> 
> >>>>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
> >>>>>>>> It works here with a old sample of tdt with eac3. Have you patch
> >>>>>>>> also remux.c? You need to change in line 533:
> >>>>>>>> 
> >>>>>>>> case SI::AC3DescriptorTag:
> >>>>>>>> +case SI:EnhancedAC3DescriptorTag:
> >>>>>>>> 
> >>>>>>>> and in line 191:
> >>>>>>>> 
> >>>>>>>> -Target[i++] = SI::AC3DescriptorTag;
> >>>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
> >>>>>>>> 
> >>>>>>>> Jose Alberto
> >>>>>>>> 
> >>>>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
> >>>>>>>>> Hi
> >>>>>>>>> 
> >>>>>>>>> I have made previous test with the version release by Petri
> >>>>>>>>> Hintukainen
> >>>>>>>>> 
> >>>>>>>>> And I notice this part is not working like it should
> >>>>>>>>> 
> >>>>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 -
> >>>>>>>>> raw */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
> >>>>>>>>> +      m->content   = p;
> >>>>>>>>> +      m->size = packet_len;
> >>>>>>>>> +      m->type |= BUF_AUDIO_EAC3;
> >>>>>>>>> +      return 1;
> >>>>>>>>> +
> >>>>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /*
> >>>>>>>>> ac3 - raw */
> >>>>>>>>> 
> >>>>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
> >>>>>>>>> STREAM_AUDIO_AC3, so the program never run the first if
> >>>>>>>>> (installed a debug printf here)
> >>>>>>>>> 
> >>>>>>>>> It seems that your first approach (at least what I understood) by
> >>>>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
> >>>>>>>>> internal lib was nice but generate violent segfault on libavcodec
> >>>>>>>>> 
> >>>>>>>>> Hope this help you
> >>>>>>>>> 
> >>>>>>>>> Best regards
> >>>>>>>>> 
> >>>>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to
> >>>>>>>>> ffmpeg or xine-lib....)
> >>>>>>>>> 
> >>>>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
> >>>>>>>>>> hello
> >>>>>>>>>> 
> >>>>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
> >>>>>>>>>> 
> >>>>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
> >>>>>>>>>> 
> >>>>>>>>>> http://dl.free.fr/ew4rJddM8
> >>>>>>>>>> 
> >>>>>>>>>>  103mo
> >>>>>>>>>> 
> >>>>>>>>>> else , i don't know what mailing-list is the more indicate for
> >>>>>>>>>> debuging
> >>>>>>>>>> 
> >>>>>>>>>> the vdr or xine-dev mailing-list ?
> >>>>>>>>>> 
> >>>>>>>>>> _______________________________________________
> >>>>>>>>>> vdr mailing list
> >>>>>>>>>> vdr@linuxtv.org
> >>>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>>>>>>> 
> >>>>>>>>> _______________________________________________
> >>>>>>>>> vdr mailing list
> >>>>>>>>> vdr@linuxtv.org
> >>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>>>>>> 
> >>>>>>>> _______________________________________________
> >>>>>>>> vdr mailing list
> >>>>>>>> vdr@linuxtv.org
> >>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>>>>> 
> >>>>>> _______________________________________________
> >>>>>> vdr mailing list
> >>>>>> vdr@linuxtv.org
> >>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >>> 
> >>> _______________________________________________
> >>> vdr mailing list
> >>> vdr@linuxtv.org
> >>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > 
> > _______________________________________________
> > vdr mailing list
> > vdr@linuxtv.org
> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
zaverel April 6, 2010, 1:13 p.m. UTC | #6
hello,
i do that but no change.
I try another thing:
i convert the sample ts of vdr recording to mkv
and rebuild xine-lib without your patch to test
and it's the same:  stereo is good but 5.0 is bad.

I think xine-lib eac3 only support stereo at this time.

see you.



Selon Jose Alberto Reguero <jareguero@telefonica.net>:

> Yes, the file is ff_audio_decoder.c
> You must put the line
> this->context->request_channels = 2;
> after
> this->context->codec_tag   = _x_stream_info_get(this->stream,
> XINE_STREAM_INFO_AUDIO_FOURCC);
>
> Jose Alberto
>
> El Sábado, 27 de Marzo de 2010, zaverel escribió:
> > Is  ff_audio_decoder.c to patch ?
> > I try but that change nothing.
> >
> > Le 26/03/2010 13:12, Jose Alberto Reguero a écrit :
> > > You can add the line:
> > >
> > > this->context->request_channels = 2;
> > >
> > > in line 247 and 295.
> > >
> > > Then you have stereo sound.
> > >
> > > Joae Alberto
> > >
> > > El Viernes, 26 de Marzo de 2010, zaverel escribió:
> > >> After some test there are some issue:
> > >> ramdom crash at start up or without sound.
> > >> But the real probleme i think is with 5.0 sound.
> > >>
> > >> In the sample the 2.0 audio out is good
> > >> but the 5.0 has low volume and metallic sound
> > >>
> > >> just try xine
> > >> fra piste 5.0
> > >> ffmpeg_audio_dec: unknown header with buf type 0x3000000
> > >>
> > >> qaa 2.0
> > >> is good
> > >>
> > >> ffmpeg -i 00001.ts
> > >> ...
> > >>
> > >> Input #0, mpegts, from '00001.ts':
> > >>   Duration: 00:02:10.51, start: 10461.634989, bitrate: 6905 kb/s
> > >>   Program 132
> > >>
> > >>     Stream #0.0[0x78]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR
> > >>
> > >> 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
> > >>
> > >>     Stream #0.1[0x82](fra): Audio: eac3, 48000 Hz, 5.0, s16, 256 kb/s
> > >>     Stream #0.2[0x83](qaa): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
> > >>     Stream #0.3[0x8c](fra): Subtitle: dvbsub
> > >>     Stream #0.4[0x8d](fra): Subtitle: dvbsub
> > >>
> > >> Le 25/03/2010 16:08, Jose Alberto Reguero a écrit :
> > >>> Patch for xine-lib that don't need to patch remux.c to work.
> > >>>
> > >>> Jose Alberto
> > >>>
> > >>> El Jueves, 25 de Marzo de 2010, Jose Alberto Reguero escribió:
> > >>>> Patch against latest xine-lib-1.2. New patch for xineliboutput. Now
> > >>>> must work if you patch remux.c.
> > >>>> You must have the latest xine-lib and xineliboutput. Yesterday both
> > >>>> have changes about eac3.
> > >>>>
> > >>>> Jose Alberto
> > >>>>
> > >>>> El Jueves, 25 de Marzo de 2010, zaverel escribió:
> > >>>>> The typo was on remux.c  => lost  : and ;
> > >>>>>
> > >>>>> Anyway xine-lib has been updated and your patch don't apply.
> > >>>>>
> > >>>>> Update is for eac3 with mkv
> > >>>>>
> > >>>>> i don't test it yet
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>>> corrected remux.c
> > >>>>>
> > >>>>> line 533
> > >>>>> case SI::AC3DescriptorTag:
> > >>>>> +case SI::EnhancedAC3DescriptorTag:
> > >>>>>
> > >>>>>
> > >>>>> and in line 191:
> > >>>>>
> > >>>>> -Target[i++] = SI::AC3DescriptorTag;
> > >>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> > >>>>>
> > >>>>> Le 24/03/2010 22:58, Jose Alberto Reguero a écrit :
> > >>>>>> I attached a second version of the first patch.
> > >>>>>> I make the same changes that in the second patch, but maintaining
> > >>>>>> the logic of the first patch. Also I commented the line:
> > >>>>>> +//        this->context->request_channels = 2;
> > >>>>>> because your example has 5 channels. If you have trouble with that
> > >>>>>> you can comment the line again.
> > >>>>>> Which  typo error has the second patch?
> > >>>>>>
> > >>>>>> Jose Alberto
> > >>>>>>
> > >>>>>> El Miércoles, 24 de Marzo de 2010, zaverel escribió:
> > >>>>>>> i 've patched pat.c and now remux.c
> > >>>>>>> and with use xine-lib-1.2 with your second patch (who has typo
> > >>>>>>> error) and that doesn't work.
> > >>>>>>>
> > >>>>>>> corrected remux.c
> > >>>>>>>
> > >>>>>>> line 533
> > >>>>>>> case SI::AC3DescriptorTag:
> > >>>>>>> +case SI::EnhancedAC3DescriptorTag:
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> and in line 191:
> > >>>>>>>
> > >>>>>>> -Target[i++] = SI::AC3DescriptorTag;
> > >>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag;
> > >>>>>>>
> > >>>>>>>
> > >>>>>>>
> > >>>>>>> with your previously patch and just pat.c patched with
> > >>>>>>> line 402
> > >>>>>>>
> > >>>>>>> case SI::AC3DescriptorTag:
> > >>>>>>> +case SI:EnhancedAC3DescriptorTag:
> > >>>>>>>
> > >>>>>>> that worked but not stable.
> > >>>>>>>
> > >>>>>>> Is your sample eac3 has |"Spectral extension" ?
> > >>>>>>> because in france dvb-t with eac3 has it
> > >>>>>>> and need a ffmpeg patched for that.
> > >>>>>>> And i test with that sound.
> > >>>>>>>
> > >>>>>>> Le 24/03/2010 19:41, Jose Alberto Reguero a écrit :
> > >>>>>>>> It works here with a old sample of tdt with eac3. Have you patch
> > >>>>>>>> also remux.c? You need to change in line 533:
> > >>>>>>>>
> > >>>>>>>> case SI::AC3DescriptorTag:
> > >>>>>>>> +case SI:EnhancedAC3DescriptorTag:
> > >>>>>>>>
> > >>>>>>>> and in line 191:
> > >>>>>>>>
> > >>>>>>>> -Target[i++] = SI::AC3DescriptorTag;
> > >>>>>>>> +Target[i++] = SI::EnhancedAC3DescriptorTag
> > >>>>>>>>
> > >>>>>>>> Jose Alberto
> > >>>>>>>>
> > >>>>>>>> El Miércoles, 24 de Marzo de 2010, dplu escribió:
> > >>>>>>>>> Hi
> > >>>>>>>>>
> > >>>>>>>>> I have made previous test with the version release by Petri
> > >>>>>>>>> Hintukainen
> > >>>>>>>>>
> > >>>>>>>>> And I notice this part is not working like it should
> > >>>>>>>>>
> > >>>>>>>>> -    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 -
> > >>>>>>>>> raw */ +    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
> > >>>>>>>>> +      m->content   = p;
> > >>>>>>>>> +      m->size = packet_len;
> > >>>>>>>>> +      m->type |= BUF_AUDIO_EAC3;
> > >>>>>>>>> +      return 1;
> > >>>>>>>>> +
> > >>>>>>>>> +    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /*
> > >>>>>>>>> ac3 - raw */
> > >>>>>>>>>
> > >>>>>>>>> unfortunaletly, in AC3 or E-AC3 , the descriptor tag is
> > >>>>>>>>> STREAM_AUDIO_AC3, so the program never run the first if
> > >>>>>>>>> (installed a debug printf here)
> > >>>>>>>>>
> > >>>>>>>>> It seems that your first approach (at least what I understood) by
> > >>>>>>>>> forcing the decoding of all AC-3 stream by ffmepg instead of
> > >>>>>>>>> internal lib was nice but generate violent segfault on libavcodec
> > >>>>>>>>>
> > >>>>>>>>> Hope this help you
> > >>>>>>>>>
> > >>>>>>>>> Best regards
> > >>>>>>>>>
> > >>>>>>>>> PS : Sorry to pollute the vdr mailing list (not subscribed to
> > >>>>>>>>> ffmpeg or xine-lib....)
> > >>>>>>>>>
> > >>>>>>>>> Le Wednesday 24 March 2010 18:41:14 zaverel, vous avez écrit :
> > >>>>>>>>>> hello
> > >>>>>>>>>>
> > >>>>>>>>>>  your second patch doesn't work  : no sound on eac3 channel
> > >>>>>>>>>>
> > >>>>>>>>>> if you want there is a sample of vdr hd-eac3 recording here:
> > >>>>>>>>>>
> > >>>>>>>>>> http://dl.free.fr/ew4rJddM8
> > >>>>>>>>>>
> > >>>>>>>>>>  103mo
> > >>>>>>>>>>
> > >>>>>>>>>> else , i don't know what mailing-list is the more indicate for
> > >>>>>>>>>> debuging
> > >>>>>>>>>>
> > >>>>>>>>>> the vdr or xine-dev mailing-list ?
> > >>>>>>>>>>
> > >>>>>>>>>> _______________________________________________
> > >>>>>>>>>> vdr mailing list
> > >>>>>>>>>> vdr@linuxtv.org
> > >>>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>>>>>>>>
> > >>>>>>>>> _______________________________________________
> > >>>>>>>>> vdr mailing list
> > >>>>>>>>> vdr@linuxtv.org
> > >>>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>>>>>>>
> > >>>>>>>> _______________________________________________
> > >>>>>>>> vdr mailing list
> > >>>>>>>> vdr@linuxtv.org
> > >>>>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>>>>>
> > >>>>>> _______________________________________________
> > >>>>>> vdr mailing list
> > >>>>>> vdr@linuxtv.org
> > >>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >>>
> > >>> _______________________________________________
> > >>> vdr mailing list
> > >>> vdr@linuxtv.org
> > >>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> > >
> > > _______________________________________________
> > > vdr mailing list
> > > vdr@linuxtv.org
> > > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
> >
> > _______________________________________________
> > vdr mailing list
> > vdr@linuxtv.org
> > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
>
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
>
  
Luca Olivetti June 13, 2010, 3:47 p.m. UTC | #7
Al 25/03/10 16:08, En/na Jose Alberto Reguero ha escrit:
> Patch for xine-lib that don't need to patch remux.c to work.

Today I applied this patch (strange it isn't in xine-lib-1.2 yet) but 
there's still no sound on tvehd (vdr 1.7.15, vdr-xine and playing the ts 
directly through xine).
Do I need some special options to configure xine-lib for this patch to 
take effect?

Bye
  

Patch

diff -r fe946ff51bcb src/combined/ffmpeg/ff_audio_decoder.c
--- a/src/combined/ffmpeg/ff_audio_decoder.c	Wed Mar 24 21:02:08 2010 +0000
+++ b/src/combined/ffmpeg/ff_audio_decoder.c	Thu Mar 25 16:05:18 2010 +0100
@@ -257,10 +257,44 @@ 
 
     if( !this->decoder_ok ) {
       if ( ! this->context || ! this->codec ) {
-        xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
-		_("ffmpeg_audio_dec: trying to open null codec\n"));
-	_x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
-	return;
+	if (((buf->type & 0xFFFF0000) == BUF_AUDIO_EAC3) || ((buf->type & 0xFFFF0000) == BUF_AUDIO_A52)){ 
+	pthread_mutex_lock (&ffmpeg_lock);
+        this->codec = avcodec_find_decoder(CODEC_ID_EAC3);
+	pthread_mutex_unlock (&ffmpeg_lock);
+        _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
+                           "AC3 coque (ffmpeg)");
+
+        if (!this->codec) {
+          xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+                   _("ffmpeg_audio_dec: couldn't find ffmpeg decoder for buf type 0x%X\n"),
+                   buf->type);
+          _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+          return;
+        }
+
+        this->context = avcodec_alloc_context();
+
+        this->audio_bits = 16;
+//	this->audio_sample_rate = 48000;
+//	this->audio_channels = 6;	
+//        this->context->request_channels = 2;
+
+        this->context->bits_per_sample = this->audio_bits;
+        this->context->sample_rate = this->audio_sample_rate;
+        this->context->channels    = this->audio_channels;
+        this->context->codec_id    = this->codec->id;
+        this->context->codec_type  = this->codec->type;
+        this->context->codec_tag   = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC);
+
+        this->size = 0;
+
+        this->decode_buffer = calloc(1, AVCODEC_MAX_AUDIO_FRAME_SIZE);
+	} else {
+       	  xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+		  _("ffmpeg_audio_dec: trying to open null codec\n"));
+	  _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+	  return;
+	}
       }
 
       pthread_mutex_lock (&ffmpeg_lock);
@@ -290,6 +324,8 @@ 
                               &decode_buffer_size,
                               &this->buf[0],
                               this->size);
+	this->size -= bytes_consumed;
+	memmove(this->buf, &this->buf[bytes_consumed], this->size);
 	this->audio_bits = this->context->bits_per_sample;
 	this->audio_sample_rate = this->context->sample_rate;
 	this->audio_channels = this->context->channels;
diff -r fe946ff51bcb src/combined/ffmpeg/xine_audio.list
--- a/src/combined/ffmpeg/xine_audio.list	Wed Mar 24 21:02:08 2010 +0000
+++ b/src/combined/ffmpeg/xine_audio.list	Thu Mar 25 16:05:18 2010 +0100
@@ -41,10 +41,10 @@ 
 AMR_NB			AMR_NB			AMR narrow band
 AMR_WB			AMR_WB			AMR wide band
 EAC3			EAC3			E-AC-3
+A52			AC3			AC3
 
 # disabled codecs (ref. configure.ac)
 !			AAC
-!			AC3
 !			ADPCM_ADX
 !			ADPCM_G726
 !			DSICINAUDIO
diff -r fe946ff51bcb src/demuxers/demux_ts.c
--- a/src/demuxers/demux_ts.c	Wed Mar 24 21:02:08 2010 +0000
+++ b/src/demuxers/demux_ts.c	Thu Mar 25 16:05:18 2010 +0100
@@ -790,7 +790,13 @@ 
      * these "raw" streams may begin with a byte that looks like a stream type.
      * For audio streams, m->type already contains the stream no.
      */
-    if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw */
+    if(m->descriptor_tag == HDMV_AUDIO_84_EAC3) {
+      m->content   = p;
+      m->size = packet_len;
+      m->type |= BUF_AUDIO_EAC3;
+      return 1;
+
+    } else if((m->descriptor_tag == STREAM_AUDIO_AC3) ||    /* ac3 - raw */
        (p[0] == 0x0B && p[1] == 0x77)) { /* ac3 - syncword */
       m->content   = p;
       m->size = packet_len;
@@ -1415,9 +1421,9 @@ 
       break;
     case ISO_13818_PES_PRIVATE:
       for (i = 5; i < coded_length; i += stream[i+1] + 2) {
-          if ((stream[i] == 0x6a) && (this->audio_tracks_count < MAX_AUDIO_TRACKS)) {
-          int i, found = 0;
-          for(i = 0; i < this->audio_tracks_count; i++) {
+          if (((stream[i] == 0x6a) || (stream[i] == 0x7a)) && (this->audio_tracks_count < MAX_AUDIO_TRACKS)) {
+          int j, found = 0;
+          for(j = 0; j < this->audio_tracks_count; j++) {
             if(this->audio_tracks[i].pid == pid) {
               found = 1;
               break;
@@ -1427,8 +1433,12 @@ 
 #ifdef TS_PMT_LOG
             printf ("demux_ts: PMT AC3 audio pid 0x%.4x type %2.2x\n", pid, stream[0]);
 #endif
-          demux_ts_pes_new(this, this->media_num, pid,
-                           this->audio_fifo, STREAM_AUDIO_AC3);
+          if (stream[i] == 0x6a)
+            demux_ts_pes_new(this, this->media_num, pid,
+                             this->audio_fifo, STREAM_AUDIO_AC3);
+          else
+            demux_ts_pes_new(this, this->media_num, pid,
+                             this->audio_fifo, HDMV_AUDIO_84_EAC3);
 
           this->audio_tracks[this->audio_tracks_count].pid = pid;
           this->audio_tracks[this->audio_tracks_count].media_index = this->media_num;