Opened 10 years ago

Closed 10 years ago

#1240 closed defect (fixed)

regression: "codec frame size is not set" using -acodec copy

Reported by: ste Owned by:
Priority: important Component: avcodec
Version: git-master Keywords: regression ac3 streamcopy framesize
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


I try to transcode a MPEG2 file from a DVB-C capture with ffmpeg GIT as of today:

ffmpeg -i test.tmpeg -vcodec libx264 -acodec copy test.mp4

ffmpeg refuses to encode the file with the following error:

[mp4 @ 0x290f6600] track 1: codec frame size is not set

With previous versions, the file encodes fine.
Revision 16e54ac7255d47e70ba9ba60d5ce5d0a0e44b223 introduces the faulty behavior:

    (e)ac3 parser: set duration instead of frame_size

------------------------- libavcodec/aac_ac3_parser.c -------------------------
index 58f30a4..8132ce8 100644
@@ -93,7 +93,7 @@ get_next:
             avctx->channels = s->channels;
             avctx->channel_layout = s->channel_layout;
-        avctx->frame_size = s->samples;
+        s1->duration = s->samples;
         avctx->audio_service_type = s->service_type;

If I re-add setting of the frame size, encoding works fine. There are similar problems with other codecs.
Setting of frame size was removed for several other codecs in the same merge from qatar/master.

Initially, I discovered this problem while using mencoder where there are serious A/V async problems after the commit above.

Attachments (1)

ffmpeg-20120421-120013.log (5.0 KB ) - added by ste 10 years ago.

Download all attachments as: .zip

Change History (4)

by ste, 10 years ago

Attachment: ffmpeg-20120421-120013.log added

comment:1 by Carl Eugen Hoyos, 10 years ago

Keywords: regression added
Priority: normalimportant

Isn't this reproducible with ffmpeg -i test.tmpeg -vn -acodec copy test.mp4 ?

in reply to:  1 comment:2 by ste, 10 years ago

Replying to cehoyos:

Isn't this reproducible with ffmpeg -i test.tmpeg -vn -acodec copy test.mp4 ?

Yes, the same error also occurs with -vn. x264 has nothing to do with it.

comment:3 by Michael Niedermayer, 10 years ago

Keywords: ac3 streamcopy framesize added
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Will be fixed in git in a moment

Note: See TracTickets for help on using tickets.