Opened 12 years ago

Closed 10 years ago

#1373 closed defect (fixed)

MPEG encoding hangs (audio problem)

Reported by: stefan.sassenberg@… Owned by: reimar
Priority: normal Component: demuxer
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


When trying
mencoder 06-publikum2.mp4 -ovc copy -oac copy -of mpeg -mpegopts format=dvd -o ~/movies/new/06-publikum2_dvd.mp4

mencoder hangs after printing

MEncoder dev-SVN-r28147-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ (Family: 15, Model:
107, Stepping: 1)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

success: format: 0 data: 0x0 - 0x11c5ff6
libavformat file format detected.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x109d710]edit list not starting at 0, a/v
desync might occur, patch welcome
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [avc1] 1280x720 24bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x31637661 size:1280x720 fps:29.970 ftime:=0.0334
PACKET SIZE: 2048 bytes, deltascr: 43885
videocodec: framecopy (1280x720 24bpp fourcc=31637661)
audiocodec: framecopy (format=ff chans=1 rate=48000 bits=16 B/s=0 sample-0)
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...

It can only be killed with kill -9. The CPU load is at ~100%.
I located the problem at line ~2067 of file libmpdemux/muxer_mpeg.c. I looked into the file, there is an endless loop (while(1) ) that never ends for the expression s->wf->wFormatTag of value 255.

The problem should be present on any platform/OS. An ugly workaround is to reencode audio instead of copying it.

Change History (2)

comment:1 Changed 10 years ago by compn

  • Owner changed from r_togni@… to reimar

comment:2 Changed 10 years ago by reimar

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

Fixed in SVN r32705.
Not that using -fafmttag to specify a more "usual" tag should be a work-around without re-encoding.

Note: See TracTickets for help on using tickets.