Opened 4 months ago

Last modified 4 months ago

#7311 reopened defect

mp4 regression when remuxing ac-3

Reported by: Mista_D Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mov regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

When extracting AC3 track and saving it to mp4, the wrong type of ac-3 packet is included in MOOV.

packet header in stsd in MOOV set to 'AC-3' instead of 'ac-3'

Section 5.6.1.1.2 of http://uvcentral.com/sites/default/files/files/PublicSpecs/CFFMediaFormat-2_1.pdf

ffmpeg -i test.mpg -map a -c copy ac3.mp4
ac4.mp4 HEX offset 1227D-12280: "AC-3"

ffmpeg -i test.mpg -map a -c copy ac3.ac3
ffmpeg -i ac3.ac3 -c copy 2step.mp4
2step.mp4 HEX offset 1227D-12280: "ac-3"

How can ac-3 be set properly in MP4's MOOV packets when extracting AC3 track from MPG to MP4 please?

Attachments (4)

2step.mp4 (73.0 KB) - added by Mista_D 4 months ago.
2 step result
test1.mpg (1.0 MB) - added by Mista_D 4 months ago.
source file (smaller version due to size restriction)
ac3.mp4 (73.0 KB) - added by Mista_D 4 months ago.
staight extraction to AC3 with wrong MOOV stsd
ac3.ac3 (72.2 KB) - added by Mista_D 4 months ago.
temp ac3 file for 2 step process.

Download all attachments as: .zip

Change History (9)

Changed 4 months ago by Mista_D

2 step result

Changed 4 months ago by Mista_D

source file (smaller version due to size restriction)

Changed 4 months ago by Mista_D

staight extraction to AC3 with wrong MOOV stsd

Changed 4 months ago by Mista_D

temp ac3 file for 2 step process.

comment:1 Changed 4 months ago by Mista_D

Same problem detected with version 4.0.1

FFmpeg401 -y -i test1.mpg -c copy -map a ac3.mp4

ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers

built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)


libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100

Input #0, mpegts, from '2.ts':

Duration: 00:01:40.02, start: 1.400000, bitrate: 54349 kb/s
Program 1

Metadata:

service_name : Service01
service_provider: FFmpeg

Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 48700 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
Stream #0:1[0x101](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s

[mp4 @ 0x2f5b040] track 0: codec frame size is not set
Output #0, mp4, to 'ac3.mp4':

Metadata:

encoder : Lavf58.12.100
Stream #0:0(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s

Stream mapping:

Stream #0:1 -> #0:0 (copy)

Press [q] to stop, ? for help
size= 4688kB time=00:01:39.96 bitrate= 384.2kbits/s speed= 222x
video:0kB audio:4688kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.015208%

comment:2 Changed 4 months ago by cehoyos

The issue you see is not reproducible with current FFmpeg git head?

comment:3 Changed 4 months ago by Mista_D

This seems to work (ts->ts->mp4) with a temp file:
FFmpeg401 -y -drc_scale 0 -i source.ts -c copy -map a -map_metadata -1 temp01.ts
FFmpeg401 -y -drc_scale 0 -i temp01.ts -c copy -map a -map_metadata -1 ac3.mp4

Last edited 4 months ago by Mista_D (previous) (diff)

comment:4 Changed 4 months ago by Mista_D

  • Resolution set to worksforme
  • Status changed from new to closed

comment:5 Changed 4 months ago by cehoyos

  • Keywords mov regression added; moov removed
  • Priority changed from normal to important
  • Reproduced by developer set
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Summary changed from wrong MOOV stsd to mp4 regression when remuxing ac-3
  • Version changed from unspecified to git-master

Regression since e199d90da6473abc0d010797b14f2ae2c9811d34, see also tickets #6897 and #7079.

Note: See TracTickets for help on using tickets.