Я пытаюсь использовать команду -headers
в ffmpeg, но с помощью следующей команды я получаю отсутствие завершающего CRLF в ошибке No trailing CRLF found in HTTP header
.
ffmpeg -headers "$(printf '\n%s\n%s\n%s\n%s\n%s\n%s\n\n' 'Cookie: GPS=1; PREF=f1=50000000&hl=en; VISITOR_INFO1_LIVE=YYVg5wZlZM4; YSC=nqFTzbjynHk; s_gl=1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==' 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0' 'Accept-Encoding: gzip, deflate' 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' 'Accept-Language: en-us,en;q=0.5')" -i http://localhost:8000 -v trace
Это вывод ffmpeg -v
(заметьте, я также пытался с \r\n
, \\r\\n
, \\n
вместо того, чтобы просто \n
прежнему получать ту же ошибку (двойной случай сброса printf)
ffmpeg -headers "$(printf '\n%s\n%s\n%s\n%s\n%s\n%s\n\n' 'Cookie: GPS=1; PREF=f1=50000000&hl=en; VISITOR_INFO1_LIVE=YYVg5wZlZM4; YSC=nqFTzbjynHk; s_gl=1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==' 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0' 'Accept-Encoding: gzip, deflate' 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' 'Accept-Language: en-us,en;q=0.5')" -i http://localhost:8000 -v trace
ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Splitting the commandline.
Reading option '-headers' ... matched as AVOption 'headers' with argument '
Cookie: GPS=1; PREF=f1=50000000&hl=en; VISITOR_INFO1_LIVE=YYVg5wZlZM4; YSC=nqFTzbjynHk; s_gl=1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5'.
Reading option '-i' ... matched as input url with argument 'http://localhost:8000'.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'trace'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input url http://localhost:8000.
Successfully parsed a group of options.
Opening an input file: http://localhost:8000.
[NULL @ 0x556cf5231a60] Opening 'http://localhost:8000' for reading
[http @ 0x556cf5232780] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[http @ 0x556cf5232780] No trailing CRLF found in HTTP header.
[http @ 0x556cf5232780] request: GET / HTTP/1.1
User-Agent: Lavf/57.83.100
Accept: */*
Range: bytes=0-
Connection: close
Host: localhost:8000
Icy-MetaData: 1
Cookie: GPS=1; PREF=f1=50000000&hl=en; VISITOR_INFO1_LIVE=YYVg5wZlZM4; YSC=nqFTzbjynHk; s_gl=1d69aac621b2f9c0a25dade722d6e24bcwIAAABVUw==
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
[http @ 0x556cf5232780] header='HTTP/1.0 200 OK'
[http @ 0x556cf5232780] http_code=200