[FFmpeg-trac] #4841(undetermined:new): Cannot detect format after http redirection

FFmpeg trac at avcodec.org
Thu Sep 10 12:03:21 CEST 2015


#4841: Cannot detect format after http redirection
-------------------------------------+-------------------------------------
             Reporter:  pszemus      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 FFmpeg is unable to detect input format when input is a remote http
 resource, without file extension, accessed via redirection, e.g.
 http://film.wp.pl/i,251347,e,jpg,galleryphoto

 I think FFmpeg should follow the HTTP response's Location header or use
 Content-Type header to probe correct input format.

 {{{
 $ ./ffmpeg -loglevel trace -i
 http://film.wp.pl/i,251347,e,jpg,galleryphoto
 ffmpeg version N-75149-gbbc8fca Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-9)
   configuration: --prefix=/home/pszemus/ffmpeg/build --enable-pic
 --enable-pthreads --enable-libmp3lame --enable-version3 --enable-
 libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-gpl
 --enable-nonfree --enable-libvpx --enable-libvorbis --enable-libx264
 --pkg-config-flags=--static --enable-protocol=https --enable-openssl
 --extra-cflags=-I/opt/WP/common.libs/inc --extra-
 ldflags='-L/opt/WP/common.libs/lib -ldl'
   libavutil      55.  1.100 / 55.  1.100
   libavcodec     57.  1.100 / 57.  1.100
   libavformat    57.  0.100 / 57.  0.100
   libavdevice    57.  0.100 / 57.  0.100
   libavfilter     6.  1.100 /  6.  1.100
   libswscale      4.  0.100 /  4.  0.100
   libswresample   2.  0.100 /  2.  0.100
   libpostproc    54.  0.100 / 54.  0.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument 'trace'.
 Reading option '-i' ... matched as input file with argument
 'http://film.wp.pl/i,251347,e,jpg,galleryphoto'.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument trace.
 Successfully parsed a group of options.
 Parsing a group of options: input file
 http://film.wp.pl/i,251347,e,jpg,galleryphoto.
 Successfully parsed a group of options.
 Opening an input file: http://film.wp.pl/i,251347,e,jpg,galleryphoto.
 [http @ 0x217ab40] request: GET /i,251347,e,jpg,galleryphoto HTTP/1.1
 User-Agent: Lavf/57.0.100
 Accept: */*
 Range: bytes=0-
 Connection: close
 Host: film.wp.pl
 Icy-MetaData: 1


 [http @ 0x217ab40] header='HTTP/1.1 301 Moved Permanently'
 [http @ 0x217ab40] http_code=301
 [http @ 0x217ab40] header='Server: aris'
 [http @ 0x217ab40] header='Set-Cookie:
 _lastUsedServices=globals%2Cphp2javaTiming%2CdatasourceFactory%2Cphpinfo;
 expires=Sat, 10-Oct-2015 10:01:59 GMT'
 [http @ 0x217ab40] header='Location:
 http://i.wp.pl/a/f/film/033/47/13/0251347.jpg'
 [http @ 0x217ab40] header='Content-type: text/html'
 [http @ 0x217ab40] header='Set-Cookie:
 statid=212.77.105.136.10226:1441879319:540538055:v1; path=/; expires=Sun,
 09-Sep-18 10:01:59 GMT'
 [http @ 0x217ab40] header='Set-Cookie:
 statid=212.77.105.136.10226:1441879319:540538055:v1; domain=.wp.pl;
 path=/; expires=Sun, 09-Sep-18 10:01:59 GMT'
 [http @ 0x217ab40] header='Content-Length: 12281'
 [http @ 0x217ab40] header='Connection: close'
 [http @ 0x217ab40] header=''
 [http @ 0x217abe0] Invalid cookie found, no value, path or domain
 specified
 [http @ 0x217ab40] request: GET /a/f/film/033/47/13/0251347.jpg HTTP/1.1
 User-Agent: Lavf/57.0.100
 Accept: */*
 Range: bytes=0-
 Connection: close
 Host: i.wp.pl
 Cookie: statid=212.77.105.136.10226:1441879319:540538055:v1
 Icy-MetaData: 1


 [http @ 0x217ab40] header='HTTP/1.1 206 Partial Content'
 [http @ 0x217ab40] http_code=206
 [http @ 0x217ab40] header='Server: nginx'
 [http @ 0x217ab40] header='Date: Thu, 10 Sep 2015 10:01:59 GMT'
 [http @ 0x217ab40] header='Content-Type: image/jpeg'
 [http @ 0x217ab40] header='Content-Length: 46347'
 [http @ 0x217ab40] header='Connection: close'
 [http @ 0x217ab40] header='Last-Modified: Tue, 26 Oct 2010 09:39:27 GMT'
 [http @ 0x217ab40] header='Vary: Accept-Encoding'
 [http @ 0x217ab40] header='ETag: "4cc6a1cf-b50b"'
 [http @ 0x217ab40] header='Expires: Thu, 17 Sep 2015 10:01:59 GMT'
 [http @ 0x217ab40] header='Cache-Control: max-age=604800'
 [http @ 0x217ab40] header='Access-Control-Allow-Origin: *'
 [http @ 0x217ab40] header='Cache-Control: public'
 [http @ 0x217ab40] header='Content-Range: bytes 0-46346/46347'
 [http @ 0x217ab40] header=''
 Probing mp3 score:1 size:2048
 Probing mp3 score:1 size:4096
 Probing mp3 score:1 size:8192
 Probing mp3 score:1 size:16384
 [AVIOContext @ 0x217e480] Statistics: 46347 bytes read, 0 seeks
 http://film.wp.pl/i,251347,e,jpg,galleryphoto: Invalid data found when
 processing input
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4841>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list