Opened 3 months ago

Last modified 3 months ago

#7755 open defect

Fail if an output-only option is used as an input option

Reported by: forthrin Owned by:
Priority: minor Component: ffmpeg
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

HTTP header fields specified with the -header option is not included in the request sent to the server. What is wrong?

$ ffplay -v debug -header $'X: 1\r\n' -i http://test:8080/
ffplay version N-45416-g7e4d3dbe1 Copyright (c) 2003-2019 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-gpl --enable-libx264 --enable-libass
  libavutil      56. 26.100 / 56. 26.100
  libavcodec     58. 47.102 / 58. 47.102
  libavformat    58. 26.101 / 58. 26.101
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 48.100 /  7. 48.100
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
Initialized opengl renderer.
[NULL @ 0x7fbbbe06dc00] Opening 'http://test:8080/' for reading
[http @ 0x7fbbbd550dc0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x7fbbbd414980] Original list of addresses:
[tcp @ 0x7fbbbd414980] Address 127.0.0.1 port 8080
[tcp @ 0x7fbbbd414980] Interleaved list of addresses:
[tcp @ 0x7fbbbd414980] Address 127.0.0.1 port 8080
[tcp @ 0x7fbbbd414980] Starting connection attempt to 127.0.0.1 port 8080
[tcp @ 0x7fbbbd414980] Successfully connected to 127.0.0.1 port 8080
[http @ 0x7fbbbd550dc0] request: GET / HTTP/1.1
User-Agent: Lavf/58.26.101
Accept: */*
Range: bytes=0-
Connection: close
Host: test:8080
Icy-MetaData: 1

[http @ 0x7fbbbd550dc0] Last chunk received, closing conn
[AVIOContext @ 0x7fbbbd70fa40] Statistics: 0 bytes read, 0 seeks
http://test:8080/: Invalid data found when processing input

Change History (3)

comment:1 Changed 3 months ago by mypopy

I think you use a wrong command, is "headers", not "header" for custom HTTP headers.

./ffmpeg -h full | grep "headers" will get

-headers <string> ED....... set custom HTTP headers, can override built in default headers

comment:2 Changed 3 months ago by forthrin

*facepalm* You're right! But what does -header do, then? It's not listed in --help and it obviously does something since FFmpeg doesn't complain about it being an invalid option.

comment:3 Changed 3 months ago by cehoyos

  • Component changed from undetermined to ffmpeg
  • Priority changed from normal to minor
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from HTTP header missing value specified with -header to Fail if an output-only option is used as an input option
  • Version changed from unspecified to git-master
Note: See TracTickets for help on using tickets.