#7133: [FFProbe] invalid byte range requests
-------------------------------------+-------------------------------------
             Reporter:  tjenkinson   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:  ffprobe,     |               Blocked By:
  HTTP error 416                     |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 '''Summary of the bug:'''
 When seeking isn't disabled (`-seekable 0`), with some input files ffprobe
 attempts to make byte range requests past the end of the file.

 The response for the file (from s3) that is being requested has a
 {{{
 Content-Length: 393740
 }}}
 header.

 You can see from the output below that ffprobe is requesting from byte
 393740 and then from byte 8590008746, both of which are invalid.

 ffprobe works correctly with the `-seekable 0` flag on the same file.

 I am not sure what the correct behaviour should be here.

 Maybe:
 - Exit with an error immediately before attempting a request with an
 invalid byte range
 - If the `seekable` option is `-1`, automatically retry with seeking
 disabled
 - ??


 '''How to reproduce:'''
 Unfortunately I am unable to provide a file with this problem here. But
 this shows the output.
 {{{
 % ffprobe "https://example.com/somefile.caf"; -loglevel debug
 ffprobe version N-90650-g3e9d676192 Copyright (c) 2007-2018 the FFmpeg
 developers
   built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
   configuration: --disable-x86asm
   libavutil      56. 13.100 / 56. 13.100
   libavcodec     58. 17.100 / 58. 17.100
   libavformat    58. 11.101 / 58. 11.101
   libavdevice    58.  2.100 / 58.  2.100
   libavfilter     7. 14.100 /  7. 14.100
   libswscale      5.  0.102 /  5.  0.102
   libswresample   3.  0.101 /  3.  0.101
 [NULL @ 0x7f7f2f002e00] Opening 'https://<<redacted>>' for reading
 [https @ 0x7f7f2ef00140] Setting default whitelist
 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
 [https @ 0x7f7f2ef00140] request: GET /<<redacted>> HTTP/1.1
 User-Agent: Lavf/58.11.101
 Accept: */*
 Range: bytes=0-
 Connection: close
 Host: <<redacted>>.s3.amazonaws.com
 Icy-MetaData: 1


 [caf @ 0x7f7f2f002e00] Format caf probed with size=2048 and score=100
 [https @ 0x7f7f2ef00140] request: GET /<<redacted>> HTTP/1.1
 User-Agent: Lavf/58.11.101
 Accept: */*
 Range: bytes=393740-
 Connection: close
 Host: <<redacted>>.s3.amazonaws.com
 Icy-MetaData: 1


 [https @ 0x7f7f2ef00140] HTTP error 416 Requested Range Not Satisfiable
 [https @ 0x7f7f2ef00140] request: GET /<<redacted>> HTTP/1.1
 User-Agent: Lavf/58.11.101
 Accept: */*
 Range: bytes=393740-
 Connection: close
 Host: <<redacted>>.s3.amazonaws.com
 Icy-MetaData: 1


 [https @ 0x7f7f2ef00140] HTTP error 416 Requested Range Not Satisfiable
 [caf @ 0x7f7f2f002e00] skipping CAF chunk: 00000000 ([0][0][0][0]), size 0
     Last message repeated 375 times
 [caf @ 0x7f7f2f002e00] skipping CAF chunk: 00000000 ([0][0][0][0]), size
 8590000126
 [https @ 0x7f7f2ef00140] request: GET /<<redacted>> HTTP/1.1
 User-Agent: Lavf/58.11.101
 Accept: */*
 Range: bytes=8590008746-
 Connection: close
 Host: <<redacted>.s3.amazonaws.com
 Icy-MetaData: 1


 [https @ 0x7f7f2ef00140] HTTP error 416 Requested Range Not Satisfiable
 [caf @ 0x7f7f2f002e00] skipping CAF chunk: 00000000 ([0][0][0][0]), size
 281457796579324
 [https @ 0x7f7f2ef00140] request: GET /<<redacted>> HTTP/1.1
 User-Agent: Lavf/58.11.101
 Accept: */*
 Range: bytes=281457796587956-
 Connection: close
 Host: <<redacted>.s3.amazonaws.com
 Icy-MetaData: 1


 [https @ 0x7f7f2ef00140] HTTP error 416 Requested Range Not Satisfiable
 [caf @ 0x7f7f2f002e00] skipping CAF chunk: FFFBFFF9
 ([255][251][255][249]), size -562971428651010
 [AVIOContext @ 0x7f7f2ec12140] Statistics: 16347 bytes read, 0 seeks
 https://<<redacted>>: Invalid data found when processing input
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7133>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac

Reply via email to