Opened 10 years ago

Last modified 10 years ago

#3661 open defect

Blu-Ray stream changes audio from ac-3 to dts

Reported by: OrbWeaver Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: mpegts ac3
Cc: nfxjfg@googlemail.com Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
Attempting to view the Blu-Ray "Defiance" (UK release) using mplayer built against ffmpeg git commit f932e5f7169282daaa06b08500d2c632cf70e14e results in missing audio after the first few seconds, with multiple errors on the console. Extracting the audio stream to a separate file and playing with ffplay gives the same result:

ffplay version N-40092-gf932e5f Copyright (c) 2003-2014 the FFmpeg developers
  built on May 22 2014 10:10:57 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --enable-ffplay
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 40.100 / 55. 40.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
[ac3 @ 0x7fd23c0008c0] Estimating duration from bitrate, this may be inaccurate
Input #0, ac3, from '/tmp/defiance_ac3.dump':
  Duration: 00:03:07.25, start: 0.000000, bitrate: 448 kb/s
    Stream #0:0: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
[ac3 @ 0x7fd23c005be0] frame sync errorvq=    0KB sq=    0B f=0/0  
[ac3 @ 0x7fd23c005be0] new coupling strategy must be present in block 0
[ac3 @ 0x7fd23c005be0] error decoding the audio block
[ac3 @ 0x7fd23c005be0] frame sync errorvq=    0KB sq=    0B f=0/0  
[ac3 @ 0x7fd23c005be0] Additional substreams is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
[ac3 @ 0x7fd23c005be0] If you want to help, upload a sample of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ and contact the ffmpeg-devel mailing list.
[ac3 @ 0x7fd23c005be0] unsupported frame type : skipping frame

Complete ffplay command output is here: http://pastebin.com/y24PTdFD

The video looks OK and the other audio streams on the Blu-Ray play without problems, so this doesn't seem to be a problem with failed AACS decryption. I will attach the start of the AC-3 audio stream in question to illustrate the problem.

Attachments (2)

defiance_ac3.dump (2.4 MB ) - added by OrbWeaver 10 years ago.
Problematic AC3 audio stream
defiance_ts.dump (2.4 MB ) - added by OrbWeaver 10 years ago.
Start of transport stream

Change History (10)

by OrbWeaver, 10 years ago

Attachment: defiance_ac3.dump added

Problematic AC3 audio stream

comment:1 by Hendrik, 10 years ago

That stream is not entirely AC-3, after a few seconds it switches to DTS.
This is a perfectly valid thing for a Blu-ray to do, switching codecs on segment changes, and if I remember correctly, Defiance had a small logo with AC-3 audio before the main move with DTS audio.

Its up to the player to handle these transitions.

comment:2 by OrbWeaver, 10 years ago

Resolution: invalid
Status: newclosed

Confirmed that forcing the audio to DTS (although only the libdca DTS works, not ffmpeg DTS) plays the audio fine. So this does indeed seem to be a problem with mplayer's codec switching/identification, not with ffmpeg.

comment:3 by gjdfgh, 10 years ago

Cc: nfxjfg@googlemail.com added

So this does indeed seem to be a problem with mplayer's codec switching/identification, not with ffmpeg.

MPlayer has no codec switching. Did you make sure ffmpeg actually uses libavformat here? It might still detect the DTS stream.

comment:4 by Carl Eugen Hoyos, 10 years ago

Component: avcodecundetermined
Keywords: mpegts added
Resolution: invalid
Status: closedreopened

Please provide the beginning of the original transport stream.

by OrbWeaver, 10 years ago

Attachment: defiance_ts.dump added

Start of transport stream

comment:5 by OrbWeaver, 10 years ago

If the 2.5 MB attachment limit enforced by this site is too low I can upload a larger sample of the transport stream somewhere else.

comment:6 by Carl Eugen Hoyos, 10 years ago

Please upload a sample that is long enough to reproduce your original problem.

Either use http://www.datafilehost.com/ (100MB limit) or read https://ffmpeg.org/bugreports.html (there is NO filesize limit).

Last edited 10 years ago by Carl Eugen Hoyos (previous) (diff)

comment:7 by OrbWeaver, 10 years ago

Uploaded longer version to FTP/incoming as defiance_ac3_to_dts_switch.dump

comment:8 by Carl Eugen Hoyos, 10 years ago

Reproduced by developer: set
Status: reopenedopen
Summary: Unable to play AC-3 stream in Blu-RayBlu-Ray stream changes audio from ac-3 to dts
$ ffmpeg -i defiance_ac3_to_dts_switch.dump
ffmpeg version N-63366-gf932e5f Copyright (c) 2000-2014 the FFmpeg developers
  built on May 22 2014 13:27:45 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 40.100 / 55. 40.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[mpegts @ 0x1da8ae0] Failed to open codec in av_find_stream_info
[mpegts @ 0x1da8ae0] PES packet size mismatch
    Last message repeated 3 times
Input #0, mpegts, from 'defiance_ac3_to_dts_switch.dump':
  Duration: 00:00:07.88, start: 600.000000, bitrate: 42566 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: vc1 (Advanced) (VC-1 / 0x312D4356), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:2[0x1101]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:3[0x1102]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Stream #0:4[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:5[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:6[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:7[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:8[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:9[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:10[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
At least one output file must be specified
$ ffmpeg -skip_initial_bytes 29630000 -i defiance_ac3_to_dts_switch.dump
ffmpeg version N-63366-gf932e5f Copyright (c) 2000-2014 the FFmpeg developers
  built on May 22 2014 13:27:45 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 86.100 / 52. 86.100
  libavcodec     55. 63.100 / 55. 63.100
  libavformat    55. 40.100 / 55. 40.100
  libavdevice    55. 13.101 / 55. 13.101
  libavfilter     4.  5.100 /  4.  5.100
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
[mpegts @ 0x2d8c8c0] Failed to open codec in av_find_stream_info
[pgssub @ 0x2db0c80] Bitmap dimensions larger than video.
[mpegts @ 0x2d8c8c0] PES packet size mismatch
    Last message repeated 3 times
Input #0, mpegts, from 'defiance_ac3_to_dts_switch.dump':
  Duration: 00:00:07.95, start: 599.935200, bitrate: 42219 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: vc1 (VC-1 / 0x312D4356), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
    Stream #0:1[0x1100]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Stream #0:2[0x1101]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Stream #0:3[0x1102]: Audio: dts (DTS-HD MA) ([134][0][0][0] / 0x0086), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Stream #0:4[0x1103]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:5[0x1104]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
    Stream #0:6[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:7[0x1201]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:8[0x1202]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:9[0x1203]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
    Stream #0:10[0x1204]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080
At least one output file must be specified
Note: See TracTickets for help on using tickets.