vdr xine-lib eac3

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

Commit Message

Jose Alberto Reguero Sept. 20, 2010, 10:57 p.m. UTC
  El Domingo, 13 de Junio de 2010, Luca Olivetti escribió:
> 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

With this two patches vdr-xine work with eac3. I can't test if it still work 
with normal ac3. One patch is for the plugin, and the other is for xine-lib 
1.2.

Jose Alberto
  

Comments

dplu Sept. 26, 2010, 5:24 p.m. UTC | #1
Hi

I Just test your patch, thanks for it, it applied well but seems not working, 
no e-ac3 sound on sample e-ac3 record for French DVB-T but AC3 sound is still 
OK 

Which xine-lib 1.2 did you use ? this one :
http://hg.debian.org/hg/xine-lib/xine-lib-1.2/
is not allways well synchronized, for example the patch for demux_ts on 
1.1.18 changeset a1ba73e0b475 (april 9) is not on 1.2

I will check another time to see if I made no error on patching

Regards

Le Tuesday 21 September 2010 00:57:39 Jose Alberto Reguero, vous avez écrit :
> El Domingo, 13 de Junio de 2010, Luca Olivetti escribió:
> > 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
>
> With this two patches vdr-xine work with eac3. I can't test if it still
> work with normal ac3. One patch is for the plugin, and the other is for
> xine-lib 1.2.
>
> Jose Alberto
  
Jose Alberto Reguero Sept. 26, 2010, 6:47 p.m. UTC | #2
El Domingo 26 Septiembre 2010, dplu escribió:
> Hi
> 
> I Just test your patch, thanks for it, it applied well but seems not
> working, no e-ac3 sound on sample e-ac3 record for French DVB-T but AC3
> sound is still OK
> 
> Which xine-lib 1.2 did you use ? this one :
> http://hg.debian.org/hg/xine-lib/xine-lib-1.2/
> is not allways well synchronized, for example the patch for demux_ts on
> 1.1.18 changeset a1ba73e0b475 (april 9) is not on 1.2
> 
> I will check another time to see if I made no error on patching
> 
> Regards
> 

You need a recent ffmpeg. I use latest hg xine-lib-1.2, and latest ffmpeg svn.

Jose Alberto.

> Le Tuesday 21 September 2010 00:57:39 Jose Alberto Reguero, vous avez 
écrit :
> > El Domingo, 13 de Junio de 2010, Luca Olivetti escribió:
> > > 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
> > 
> > With this two patches vdr-xine work with eac3. I can't test if it still
> > work with normal ac3. One patch is for the plugin, and the other is for
> > xine-lib 1.2.
> > 
> > Jose Alberto
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
Darren Salt Sept. 26, 2010, 6:56 p.m. UTC | #3
I demand that dplu may or may not have written...

[snip]
> http://hg.debian.org/hg/xine-lib/xine-lib-1.2/
> is not allways well synchronized, for example the patch for demux_ts on 
> 1.1.18 changeset a1ba73e0b475 (april 9) is not on 1.2

It is...

[snip]
  
dplu Sept. 27, 2010, 7:33 p.m. UTC | #4
Hi

@Darren Salt 
Oupss you're right, I had another old patch for e-ac3 support auto applied 
I clean all now

@Jose Alberto
By the way, we are two person having made same test : not working with this 
sample of french DVB-T HD , here is detail given by ffplay

sample : http://dl.free.fr/cMNuFuG8X

    Stream #0.0[0xdc]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 50 
fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0xe7](qaa): Audio: eac3, 48000 Hz, 5.1, s16, 256 kb/s
    Stream #0.2[0xe6](fra): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
    Stream #0.3[0xf0](fra): Subtitle: dvbsub

Can you please test this small file (48 Mo) and tell us if OK or not, this 
should be a good direction to go. I will rebuild a full new dev env on my 
machine

Many thanks for your help

Best regards

Le Sunday 26 September 2010 20:56:32 Darren Salt, vous avez écrit :
> I demand that dplu may or may not have written...
>
> [snip]
>
> > http://hg.debian.org/hg/xine-lib/xine-lib-1.2/
> > is not allways well synchronized, for example the patch for demux_ts on
> > 1.1.18 changeset a1ba73e0b475 (april 9) is not on 1.2
>
> It is...
>
> [snip]
  
Jose Alberto Reguero Sept. 27, 2010, 8:42 p.m. UTC | #5
El Lunes 27 Septiembre 2010, dplu escribió:
> Hi
> 
> @Darren Salt
> Oupss you're right, I had another old patch for e-ac3 support auto applied
> I clean all now
> 
> @Jose Alberto
> By the way, we are two person having made same test : not working with this
> sample of french DVB-T HD , here is detail given by ffplay
> 
> sample : http://dl.free.fr/cMNuFuG8X
> 
>     Stream #0.0[0xdc]: Video: h264, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9],
> 50 fps, 50 tbr, 90k tbn, 50 tbc
>     Stream #0.1[0xe7](qaa): Audio: eac3, 48000 Hz, 5.1, s16, 256 kb/s
>     Stream #0.2[0xe6](fra): Audio: eac3, 48000 Hz, stereo, s16, 128 kb/s
>     Stream #0.3[0xf0](fra): Subtitle: dvbsub
> 
> Can you please test this small file (48 Mo) and tell us if OK or not, this
> should be a good direction to go. I will rebuild a full new dev env on my
> machine
> 
> Many thanks for your help
> 
> Best regards
> 

I try the sample and don't work. I look into it. But you must try live tv or 
samples made with the patches, to see if it work. I try here with a channel 
whith eac3 with spectral extention and it work well. 

Jose Alberto

> Le Sunday 26 September 2010 20:56:32 Darren Salt, vous avez écrit :
> > I demand that dplu may or may not have written...
> > 
> > [snip]
> > 
> > > http://hg.debian.org/hg/xine-lib/xine-lib-1.2/
> > > is not allways well synchronized, for example the patch for demux_ts on
> > > 1.1.18 changeset a1ba73e0b475 (april 9) is not on 1.2
> > 
> > It is...
> > 
> > [snip]
> 
> _______________________________________________
> vdr mailing list
> vdr@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
  
dplu Sept. 27, 2010, 9 p.m. UTC | #6
Thanks for the test, In fact I am not in covered area so I work with sample 
given by a colleague who live in good area on our forum

The sample is very fresh and works perfectly with xineliboutput + vdr-sxfe 
with patch xineliboutputeac3_4.diff plus patch ff_audio_decoder to downmix 5.1 
to 2.0

Maybe is there "something" in TS who is different from your country. It should 
be also interesting to have report from Italian users who experiment this 
audio encoding (not all are xbmc user I hope)

Have a nice evening

Best regards

Le Monday 27 September 2010 22:42:06 Jose Alberto Reguero, vous avez écrit :
> I try the sample and don't work. I look into it. But you must try live tv
> or samples made with the patches, to see if it work. I try here with a
> channel whith eac3 with spectral extention and it work well.
>
> Jose Alberto
  

Patch

diff -r 9679028a161b src/demuxers/demux_mpeg_pes.c
--- a/src/demuxers/demux_mpeg_pes.c	Wed Jul 21 15:52:00 2010 +0000
+++ b/src/demuxers/demux_mpeg_pes.c	Tue Sep 21 00:54:22 2010 +0200
@@ -103,6 +103,7 @@ 
 
   uint8_t               preview_data[ MAX_PREVIEW_SIZE ];
   off_t                 preview_size, preview_done;
+  uint8_t               preview_eac3;
 } demux_mpeg_pes_t ;
 
 typedef struct {
@@ -931,10 +932,21 @@ 
 
       buf->content   = p+4;
       buf->size      = this->packet_len-4;
-      if (track & 0x8) {
-        buf->type      = BUF_AUDIO_DTS + (track & 0x07); /* DVDs only have 8 tracks */
+      if (((p[9] >> 3) & 0x1f) <= 10) {
+        if (track & 0x8) {
+          buf->type      = BUF_AUDIO_DTS + (track & 0x07); /* DVDs only have 8 tracks */
+        } else {
+          buf->type      = BUF_AUDIO_A52 + track;
+        }
       } else {
-        buf->type      = BUF_AUDIO_A52 + track;
+        buf->type      = BUF_AUDIO_EAC3;
+        if (this->preview_eac3 < 2)
+          this->preview_eac3++;
+        if (this->preview_eac3 == 1)
+          buf->decoder_flags = BUF_FLAG_HEADER | BUF_FLAG_FRAME_END;
+        else {
+          buf->decoder_flags |= BUF_FLAG_FRAME_END;
+        }
       }
       buf->pts       = this->pts;
       if( !this->preview_mode )
@@ -1548,6 +1560,7 @@ 
    */
   this->last_cell_time = 0;
   this->send_newpts = 1;
+  this->preview_eac3 = 0;
   if( !playing ) {
 
     this->buf_flag_seek = 0;