[FFmpeg-devel] Triple GET request while encoding remote JPEG image

Przemysław Sobala przemyslaw.sobala at grupawp.pl
Thu Sep 10 16:05:20 CEST 2015


Hi
One question: Why does FFmpeg need to perform 3 GET requests to encode
one remote JPEG image:

$ ./ffmpeg -y -loglevel trace -i
http://i.wp.pl/a/i/dppadmin/sport/wid_15524107.jpg -f mjpeg /dev/null
ffmpeg version N-75159-g319898b 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-2.8/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
[cut]
Parsing a group of options: input file
http://i.wp.pl/a/i/dppadmin/sport/wid_15524107.jpg.


Successfully parsed a group of options.



Opening an input file:
http://i.wp.pl/a/i/dppadmin/sport/wid_15524107.jpg.


[http @ 0x2f24c80] request: GET /a/i/dppadmin/sport/wid_15524107.jpg
HTTP/1.1
User-Agent: Lavf/57.0.100



Accept: */*



Range: bytes=0-



Connection: close



Host: i.wp.pl



Icy-MetaData: 1





[http @ 0x2f24c80] header='HTTP/1.1 206 Partial Content'



[http @ 0x2f24c80] http_code=206



[http @ 0x2f24c80] header='Server: nginx'



[http @ 0x2f24c80] header='Date: Thu, 10 Sep 2015 13:55:47 GMT'



[http @ 0x2f24c80] header='Content-Type: image/jpeg'



[http @ 0x2f24c80] header='Content-Length: 290686'



[http @ 0x2f24c80] header='Connection: close'



[http @ 0x2f24c80] header='Last-Modified: Thu, 25 Apr 2013 09:24:03 GMT'



[http @ 0x2f24c80] header='Vary: Accept-Encoding'



[http @ 0x2f24c80] header='ETag: "5178f633-46f7e"'



[http @ 0x2f24c80] header='Expires: Thu, 17 Sep 2015 13:55:16 GMT'



[http @ 0x2f24c80] header='Cache-Control: max-age=604800'



[http @ 0x2f24c80] header='Access-Control-Allow-Origin: *'



[http @ 0x2f24c80] header='Cache-Control: public'



[http @ 0x2f24c80] header='Content-Range: bytes 0-290685/290686'



[http @ 0x2f24c80] header=''



Probing image2 score:50 size:2048
Probing jpeg_pipe score:6 size:2048



[image2 @ 0x2f24380] Format image2 probed with size=2048 and score=50



[http @ 0x2f28840] request: GET /a/i/dppadmin/sport/wid_15524107.jpg
HTTP/1.1


User-Agent: Lavf/57.0.100



Accept: */*



Range: bytes=0-



Connection: close



Host: i.wp.pl



Icy-MetaData: 1





[http @ 0x2f28840] header='HTTP/1.1 206 Partial Content'



[http @ 0x2f28840] http_code=206



[http @ 0x2f28840] header='Server: nginx'



[http @ 0x2f28840] header='Date: Thu, 10 Sep 2015 13:55:47 GMT'



[http @ 0x2f28840] header='Content-Type: image/jpeg'



[http @ 0x2f28840] header='Content-Length: 290686'



[http @ 0x2f28840] header='Connection: close'



[http @ 0x2f28840] header='Last-Modified: Thu, 25 Apr 2013 09:24:03 GMT'



[http @ 0x2f28840] header='Vary: Accept-Encoding'



[http @ 0x2f28840] header='ETag: "5178f633-46f7e"'



[http @ 0x2f28840] header='Expires: Thu, 17 Sep 2015 13:55:16 GMT'



[http @ 0x2f28840] header='Cache-Control: max-age=604800'



[http @ 0x2f28840] header='Access-Control-Allow-Origin: *'



[http @ 0x2f28840] header='Cache-Control: public'



[http @ 0x2f28840] header='Content-Range: bytes 0-290685/290686'



[http @ 0x2f28840] header=''



[image2 @ 0x2f24380] Before avformat_find_stream_info() pos: 0 bytes
read:2486 seeks:0


[http @ 0x2f28860] request: GET /a/i/dppadmin/sport/wid_15524107.jpg
HTTP/1.1


User-Agent: Lavf/57.0.100



Accept: */*



Range: bytes=0-



Connection: close



Host: i.wp.pl



Icy-MetaData: 1





[http @ 0x2f28860] header='HTTP/1.1 206 Partial Content'



[http @ 0x2f28860] http_code=206



[http @ 0x2f28860] header='Server: nginx'



[http @ 0x2f28860] header='Date: Thu, 10 Sep 2015 13:55:47 GMT'



[http @ 0x2f28860] header='Content-Type: image/jpeg'



[http @ 0x2f28860] header='Content-Length: 290686'



[http @ 0x2f28860] header='Connection: close'



[http @ 0x2f28860] header='Last-Modified: Thu, 25 Apr 2013 09:24:03 GMT'



[http @ 0x2f28860] header='Vary: Accept-Encoding'



[http @ 0x2f28860] header='ETag: "5178f633-46f7e"'



[http @ 0x2f28860] header='Expires: Thu, 17 Sep 2015 13:33:14 GMT'



[http @ 0x2f28860] header='Cache-Control: max-age=604800'



[http @ 0x2f28860] header='Access-Control-Allow-Origin: *'



[http @ 0x2f28860] header='Cache-Control: public'



[http @ 0x2f28860] header='Content-Range: bytes 0-290685/290686'



[http @ 0x2f28860] header=''



[AVIOContext @ 0x2f28920] Statistics: 290686 bytes read, 0 seeks



[cut]
[image2 @ 0x2f24380] 0: start_time: 0.000 duration: 0.000



[image2 @ 0x2f24380] stream: start_time: 0.000 duration: 0.040
bitrate=58137 kb/s


[image2 @ 0x2f24380] After avformat_find_stream_info() pos: 0 bytes
read:2486 seeks:0 frames:1


Input #0, image2, from 'http://i.wp.pl/a/i/dppadmin/sport/wid_15524107.jpg':
   Duration: 00:00:00.04, start: 0.000000, bitrate: 58137 kb/s
     Stream #0:0, 1, 1/25: Video: mjpeg, 1 reference frame, yuvj420p(pc,
bt470bg/unknown/unknown, center), 1004x1500 [SAR 100:100 DAR 251:375],
1/25, 25 tbr, 25 tbn, 25 tbc
[cut]
Output #0, mjpeg, to '/dev/null':
   Metadata:
     encoder         : Lavf57.0.100
     Stream #0:0, 0, 1/25: Video: mjpeg, 1 reference frame, yuvj420p(pc,
center), 1004x1500 [SAR 100:100 DAR 251:375], 1/25, q=2-31, 200 kb/s, 25
fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc57.1.100 mjpeg
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[cut]
video:191kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.000000%
Input file #0 (http://i.wp.pl/a/i/dppadmin/sport/wid_15524107.jpg):
   Input stream #0:0 (video): 1 packets read (290686 bytes); 1 frames
decoded;
   Total: 1 packets (290686 bytes) demuxed
Output file #0 (/dev/null):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (195672
bytes);
   Total: 1 packets (195672 bytes) muxed
1 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x2f2b860] Statistics: 0 seeks, 6 writeouts
[AVIOContext @ 0x2f303e0] Statistics: 2486 bytes read, 0 seeks

--
Regards
Przemysław Sobala



Główne Spółki Grupy Wirtualna Polska:

Wirtualna Polska Holding Spółka Akcyjna z siedzibą w Warszawie, ul. Jutrzenki 137A, 02-231 Warszawa, wpisana do Krajowego Rejestru Sądowego - Rejestru Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. Warszawy w Warszawie pod nr KRS: 0000407130, kapitał zakładowy: 1 245 651,90 zł (w całości wpłacony), Numer Identyfikacji Podatkowej (NIP): 521-31-11-513

Grupa Wirtualna Polska Spółka z ograniczoną odpowiedzialnością z siedzibą w Warszawie, ul. Jutrzenki 137A, 02-231 Warszawa, wpisana do Krajowego Rejestru Sądowego - Rejestru Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. Warszawy w Warszawie pod nr KRS: 0000373814, kapitał zakładowy: 317 957 800,00 zł, Numer Identyfikacji Podatkowej (NIP): 527-26-45-593

WP Shopping Spółka z ograniczoną odpowiedzialnością z siedzibą w Gdańsku, ul. Romualda Traugutta 115 C, 80-226 Gdańsk, wpisana do Krajowego Rejestru Sądowego - Rejestru Przedsiębiorców prowadzonego przez Sąd Rejonowy Gdańsk - Północ w Gdańsku pod nr KRS: 0000546914, kapitał zakładowy: 170.000,00 złotych (w całości wpłacony), Numer Identyfikacji Podatkowej (NIP): 957-07-51-216


More information about the ffmpeg-devel mailing list