[FFmpeg-trac] #5763(avformat:new): copy via HTTP with no transcode very slow for MOV vs. MP4

FFmpeg trac at avcodec.org
Thu Aug 18 12:18:26 EEST 2016


#5763: copy via HTTP with no transcode very slow for MOV vs. MP4
--------------------------------------+------------------------------------
             Reporter:  dheidebrecht  |                    Owner:
                 Type:  defect        |                   Status:  new
             Priority:  normal        |                Component:  avformat
              Version:  git-master    |               Resolution:
             Keywords:  mov           |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+------------------------------------
Changes (by cehoyos):

 * keywords:   => mov
 * component:  ffmpeg => avformat


Comment:

 The fact that FFmpeg seeks wildly in the original mov file (but not in a
 file remuxed with FFmpeg) leading to many slow reconnections is
 reproducible with the following command line:
 {{{
 $ ffmpeg -loglevel debug -i test.mov -c copy -f null -
 ffmpeg version N-81379-gf866f22 Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 4.7 (SUSE Linux)
   configuration: --enable-gpl --enable-gnutls
   libavutil      55. 28.100 / 55. 28.100
   libavcodec     57. 53.100 / 57. 53.100
   libavformat    57. 47.101 / 57. 47.101
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 52.100 /  6. 52.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
   libpostproc    54.  0.100 / 54.  0.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'debug'.
 Reading option '-i' ... matched as input file with argument 'test.mov'.
 Reading option '-c' ... matched as option 'c' (codec name) with argument
 'copy'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'null'.
 Reading option '-' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument debug.
 Successfully parsed a group of options.
 Parsing a group of options: input file test.mov.
 Successfully parsed a group of options.
 Opening an input file: test.mov.
 [file @ 0x28a4e80] Setting default whitelist 'file,crypto'
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] Format mov,mp4,m4a,3gp,3g2,mj2
 probed with size=2048 and score=100
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] ISO: File Type Major Brand: qt
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] Unknown dref type 0x0873696c61 size
 12
     Last message repeated 3 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 29.833333 0.019205
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 29.916667 0.003699
     Last message repeated 1 times
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 30.000000 0.000558
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 60.000000 0.002233
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 120.000000 0.008934
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 29.970030 0.000264
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] rfps: 59.940060 0.001055
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] Before avformat_find_stream_info()
 pos: 87380080 bytes read:53138 seeks:1 nb_streams:4
 [h264 @ 0x28a66a0] nal_unit_type: 7, nal_ref_idc: 1
 [h264 @ 0x28a66a0] nal_unit_type: 8, nal_ref_idc: 1
 [h264 @ 0x28a66a0] nal_unit_type: 6, nal_ref_idc: 0
 [h264 @ 0x28a66a0] nal_unit_type: 5, nal_ref_idc: 1
 [h264 @ 0x28a66a0] Reinit context to 1920x1088, pix_fmt: yuv420p
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] All info found
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x28a4640] After avformat_find_stream_info()
 pos: 206381 bytes read:259483 seeks:2 frames:45
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     creation_time   : 2016-07-31 22:04:54
     com.apple.quicktime.location.ISO6709: +41.3207-071.9074-000.385/
     com.apple.quicktime.make: Apple
     com.apple.quicktime.model: iPhone 6s
     com.apple.quicktime.software: 9.3.3
     com.apple.quicktime.creationdate: 2016-07-31T18:04:54-0400
   Duration: 00:00:40.80, start: 0.000000, bitrate: 17134 kb/s
     Stream #0:0(und), 1, 1/600: Video: h264 (High), 1 reference frame
 (avc1 / 0x31637661), yuv420p(tv, bt709, left), 1920x1080 (1920x1088), 0/1,
 17042 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
       encoder         : H.264
     Stream #0:1(und), 44, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D),
 44100 Hz, mono, fltp, 82 kb/s (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
     Stream #0:2(und), 0, 1/600: Data: none (mebx / 0x7862656D), 0/1, 0
 kb/s (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
     Stream #0:3(und), 0, 1/600: Data: none (mebx / 0x7862656D), 0/1, 0
 kb/s (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
 Successfully opened the file.
 Parsing a group of options: output file -.
 Applying option c (codec name) with argument copy.
 Applying option f (force format) with argument null.
 Successfully parsed a group of options.
 Opening an output file: -.
 Successfully opened the file.
 [null @ 0x28f2a60] Using AVStream.codec to pass codec parameters to muxers
 is deprecated, use AVStream.codecpar instead.
     Last message repeated 1 times
 Output #0, null, to 'pipe:':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     com.apple.quicktime.creationdate: 2016-07-31T18:04:54-0400
     com.apple.quicktime.location.ISO6709: +41.3207-071.9074-000.385/
     com.apple.quicktime.make: Apple
     com.apple.quicktime.model: iPhone 6s
     com.apple.quicktime.software: 9.3.3
     encoder         : Lavf57.47.101
     Stream #0:0(und), 0, 1/600: Video: h264 (High), 1 reference frame
 (avc1 / 0x31637661), yuv420p(tv, bt709, left), 1920x1080 (0x0), 0/1,
 q=2-31, 17042 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 600 tbc (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
       encoder         : H.264
     Stream #0:1(und), 0, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D),
 44100 Hz, mono, 82 kb/s (default)
     Metadata:
       creation_time   : 2016-07-31 22:04:54
       handler_name    : Core Media Data Handler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
     Last message repeated 45 times
 No more output streams to write to, finishing.
 frame= 1223 fps=0.0 q=-1.0 Lsize=N/A time=00:00:40.86 bitrate=N/A
 speed=1.43e+03x
 video:84872kB audio:413kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: unknown
 Input file #0 (test.mov):
   Input stream #0:0 (video): 1223 packets read (86909375 bytes);
   Input stream #0:1 (audio): 1760 packets read (423378 bytes);
   Input stream #0:2 (data): 0 packets read (0 bytes);
   Input stream #0:3 (data): 0 packets read (0 bytes);
   Total: 2983 packets (87332753 bytes) demuxed
 Output file #0 (pipe:):
   Output stream #0:0 (video): 1223 packets muxed (86909375 bytes);
   Output stream #0:1 (audio): 1760 packets muxed (423378 bytes);
   Total: 2983 packets (87332753 bytes) muxed
 0 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 0x28a5160] Statistics: 127025736 bytes read, 2419 seeks
 }}}
 I don't know if there is a bug that can be fixed in FFmpeg.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5763#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list