Opened 13 years ago

Closed 11 years ago

#236 closed defect (fixed)

Floating point exception error with -dcodec copy on QuickTime timecode track

Reported by: dave rice Owned by:
Priority: important Component: avformat
Version: git-master Keywords: dcodec crash fpe
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

When using -dcodec copy to copy a timecode track from an input Quicktime to an output Quicktime, I get a "Floating point exception" error and the unresulting file is unplayable.

ffmpeg -i fcp_export8.mov -vcodec copy -acodec copy -dcodec copy fcp_export9.mov
ffmpeg version git-N-30166-g1bc81bf, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 23 2011 22:42:17 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --enable-gpl --enable-libfreetype --enable-frei0r --enable-libx264 --enable-shared
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2. 10. 0 /  2. 10. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x101012400] Could not find codec parameters (Data: tmcd / 0x64636D74, 0 kb/s)
    Last message repeated 2 times
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 29.97 (2997/100)
    Last message repeated 2 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fcp_export8.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2010-03-03 06:08:19
  Duration: 00:00:10.01, start: 0.000000, bitrate: 505 kb/s
    Stream #0.0(eng): Video: dvvideo, yuv411p, 720x480 [PAR 8:9 DAR 4:3], 28771 kb/s, PAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 2997 tbn, 29.97 tbc
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.3(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.4(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
Ignoring attempt to set invalid timebase for st:2
Output #0, mov, to 'fcp_export9.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2010-03-03 06:08:19
    encoder         : Lavf53.2.0
    Stream #0.0(eng): Video: dvvideo, yuv411p, 720x480 [PAR 10:11 DAR 15:11], q=2-31, 28771 kb/s, 30k tbn, 29.97 tbc
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, 1536 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
  Stream #0.2 -> #0.2
Press [q] to stop, [?] for help
Floating point exception

Attachments (3)

fcp_export8.mov (618.0 KB ) - added by dave rice 13 years ago.
input
fcp_export9.mov (612.9 KB ) - added by dave rice 13 years ago.
output, unplayable
fcp_export9.2.mov (612.9 KB ) - added by dave rice 13 years ago.
output, unplayable

Download all attachments as: .zip

Change History (9)

by dave rice, 13 years ago

Attachment: fcp_export8.mov added

input

by dave rice, 13 years ago

Attachment: fcp_export9.mov added

output, unplayable

by dave rice, 13 years ago

Attachment: fcp_export9.2.mov added

output, unplayable

comment:1 by Carl Eugen Hoyos, 13 years ago

Component: undeterminedavformat
Priority: normalimportant
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master
(gdb) r -i fcp_export8.mov -dcodec copy -an -vn out.mov
ffmpeg version git-N-30180-g384d103, Copyright (c) 2000-2011 the FFmpeg developers
  built on May 24 2011 22:39:02 with gcc 4.5.3
  configuration: --cc='/usr/local/gcc-4.5.3/bin/gcc -m32' --enable-gpl
  libavutil    51.  2. 1 / 51.  2. 1
  libavcodec   53.  6. 0 / 53.  6. 0
  libavformat  53.  2. 0 / 53.  2. 0
  libavdevice  53.  0. 0 / 53.  0. 0
  libavfilter   2. 10. 0 /  2. 10. 0
  libswscale    0. 14. 0 /  0. 14. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8cabb20] Could not find codec parameters (Data: tmcd / 0x64636D74, 0 kb/s)
    Last message repeated 2 times
Seems stream 0 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 29.97 (2997/100)
    Last message repeated 2 times
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'fcp_export8.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2010-03-03 06:08:19
  Duration: 00:00:10.01, start: 0.000000, bitrate: 505 kb/s
    Stream #0.0(eng): Video: dvvideo, yuv411p, 720x480 [PAR 8:9 DAR 4:3], 28771 kb/s, PAR 10:11 DAR 15:11, 29.97 fps, 29.97 tbr, 2997 tbn, 29.97 tbc
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.2(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.3(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
    Stream #0.4(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
Ignoring attempt to set invalid timebase for st:0
Output #0, mov, to 'out.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2010-03-03 06:08:19
    encoder         : Lavf53.2.0
    Stream #0.0(eng): Data: tmcd / 0x64636D74, 0 kb/s
    Metadata:
      creation_time   : 2010-03-03 06:08:19
Stream mapping:
  Stream #0.2 -> #0.0
Press [q] to stop, [?] for help

Program received signal SIGFPE, Arithmetic exception.
0x085efbd3 in __udivmoddi4 (rp=0x0, d=0, n=900900999) at ../../.././libgcc/../gcc/libgcc2.c:895
895                 d0 = 1 / d0;        /* Divide intentionally by zero.  */
(gdb) bt
#0  0x085efbd3 in __udivmoddi4 (rp=0x0, d=0, n=900900999) at ../../.././libgcc/../gcc/libgcc2.c:895
#1  __divdi3 (rp=0x0, d=0, n=900900999) at ../../.././libgcc/../gcc/libgcc2.c:1093
#2  0x085e58a0 in av_rescale_rnd (a=900901, b=1000, c=0, rnd=AV_ROUND_UP) at libavutil/mathematics.c:91
#3  0x080fc6e4 in mov_write_mvhd_tag (mov=<value optimized out>, pb=<value optimized out>) at libavformat/movenc.c:1388
#4  mov_write_moov_tag (mov=<value optimized out>, pb=<value optimized out>) at libavformat/movenc.c:1785
#5  mov_write_trailer (mov=<value optimized out>, pb=<value optimized out>) at libavformat/movenc.c:2266
#6  0x08157007 in av_write_trailer (s=0x8cab240) at libavformat/utils.c:3194
#7  0x08052bc4 in transcode (nb_output_files=1, nb_input_files=1, stream_maps=0x0, nb_stream_maps=0, input_files=0x873db20, output_files=0x873d980) at ffmpeg.c:2785
#8  0x08058b9d in main (argc=<value optimized out>, argv=<value optimized out>) at ffmpeg.c:4561

comment:2 by Carl Eugen Hoyos, 12 years ago

Still reproducible with

ffmpeg -i fcp_export8.mov -dcodec copy -map 0:2 -an -vn out.mov

comment:3 by Carl Eugen Hoyos, 12 years ago

Keywords: crash fpe added

comment:4 by reimar, 12 years ago

No longer crashes, but I don't think it will work as expected.

comment:5 by dave rice, 12 years ago

True, no crash, but the resulting quicktime is invalid.

ffmpeg started on 2012-03-31 at 12:57:06
Report written to "ffmpeg-20120331-125706.log"
Command line:
ffmpeg -report -i "1second DVpal.mov" -map 0 -c copy out.mov
ffmpeg version N-35765-gf9143d2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 31 2012 12:44:33 with llvm_gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/llvm-gcc --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass --disable-ffplay
  libavutil      51. 44.100 / 51. 44.100
  libavcodec     54. 12.100 / 54. 12.100
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 66.101 /  2. 66.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb64404b400] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb64404b400] ISO: File Type Major Brand: qt  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb64404b400] All info found
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1second DVpal.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2008-10-01 12:43:43
  Duration: 00:00:01.00, start: 0.000000, bitrate: 30354 kb/s
    Stream #0:0(eng), 1, 1/25: Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng), 46, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng), 0, 1/25: Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
      timecode        : 01:00:00:00
Output #0, mov, to 'out.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2008-10-01 12:43:43
    encoder         : Lavf54.3.100
    Stream #0:0(eng), 0, 1/25: Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 59:54 DAR 295:216], q=2-31, 28800 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng), 0, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, 1536 kb/s
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng), 0, 1/1000: Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : Apple Alias Data Handler
      timecode        : 01:00:00:00
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #0:2 -> #0:2 (copy)
Press [q] to stop, [?] for help
frame=   25 fps=0.0 q=-1.0 Lsize=    3705kB time=00:00:00.00 bitrate=   0.0kbits/s    
video:3516kB audio:188kB global headers:0kB muxing overhead 0.052690%
 

This output looks like:

  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    creation_time   : 2008-10-01 12:43:43
    encoder         : Lavf
  Duration: 00:00:01.00, start: 0.000000, bitrate: 30351 kb/s
    Stream #0:0(eng): Video: dvvideo (dvcp / 0x70637664), yuv420p, 720x576 [SAR 16:15 DAR 4:3], 28800 kb/s, SAR 59:54 DAR 295:216, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : 
                        DataHandler
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 2 channels, s16, 1536 kb/s
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : 
                        DataHandler
    Stream #0:2(eng): Data: none (stts / 0x73747473)
    Metadata:
      creation_time   : 2008-10-01 12:43:43
      handler_name    : 
                        DataHandler
At least one output file must be specified

comment:6 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

This used to be fixed (in 0.11 and 1.0), now reproducible again, I opened ticket #2045 for the regression.

Note: See TracTickets for help on using tickets.