Re: eac3 support
Jose Alberto Reguero <[email protected]> Mon, 12 Apr 2010 17:42:00 +0200
| Newsgroups | gmane.comp.video.xine.user |
|---|---|
| Message-ID | <[email protected]> |
El Sábado, 10 de Abril de 2010, Jose Alberto Reguero escribió: > El Sábado, 10 de Abril de 2010, zaverel escribió: > > hello > > > > this is a link to the vdr record in TS format (h264 +eac3) > > 2 mn ~ 103 Mo > > > > http://dl.free.fr/ew4rJddM8 > > > > and this is for the same record just converted in MKV (h264 +eac3) > > 2 mn ~ 103 Mo > > > > http://dl.free.fr/tWkHPPCc1 > > > > With TS or MKV only 2.0 audio is good , > > 5.0 audio is very bad > > > > > > see you > > To play the vdr sample you also need xine_audio.patch attached. To downmix > eac3 to stereo you need ff_audio_decoder.patch > > Jose Alberto > There are one more patch ff_audio_decoder_2.patch attached needed to play the sample with the plugin xineliboutput. Jose Alberto > > Le 09/04/2010 19:37, Darren Salt a écrit : > > > I demand that zaverel may or may not have written... > > > > > >> Is xine-lib support all eac3 features or not ? > > > > > > Don't know. I have nothing with which to test this. > > > > > >> I'm using vdr and doing record in ts format. > > >> > > >> > > >> 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 > > > > > > [snip] > > > > > >> Since only mkv eac3 is supported , i convert the ts in mkv. > > > > > > Patches which add support to the MPEG TS demuxer are welcome... > > > > > > [snip] > > > > ------------------------------------------------------------------------- > > -- --- Download Intel® Parallel Studio Eval > > Try the new software tools for yourself. Speed compiling, find bugs > > proactively, and fine-tune applications for parallel performance. > > See why Intel Parallel Studio got high marks during beta. > > http://p.sf.net/sfu/intel-sw-dev > > _______________________________________________ > > xine-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/xine-user ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ xine-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xine-user
ff_audio_decoder_2.patch
(text/x-patch, 2.1 KB)
diff -r cb99a1abe986 src/combined/ffmpeg/ff_audio_decoder.c
--- a/src/combined/ffmpeg/ff_audio_decoder.c Fri Apr 09 18:55:47 2010 +0200
+++ b/src/combined/ffmpeg/ff_audio_decoder.c Sat Apr 10 16:07:13 2010 +0200
@@ -257,10 +263,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);