http cookie example does not work
hi i have a problem with cookies, they are not sent as specified in parameter. according to example syntax mentioned in documentation http://ffmpeg.org/ffmpeg-protocols.html#HTTP-Cookies : ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8 my values: ./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;" http://192.168.93.224/snap.jpg wireshark shows following headers: GET /snap.jpg HTTP/1.1 User-Agent: Lavf54.61.104 Accept: */* Range: bytes=0- Connection: close i have also tried entering newlines after each cookie could you please help me find the cause ? thank you. Mike ./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;"http://192.168.93.224/snap.jpg ffplay version N-49452-g91f3592 Copyright (c) 2003-2013 the FFmpeg developers built on Jan 30 2013 18:19:57 with gcc 4.7 (Debian 4.7.2-5) configuration: --enable-gpl --enable-nonfree --enable-version3 --enable-avfilter --enable-pthreads --enable-postproc --enable-filter=drawtext --enable-static --disable-shared libavutil 52. 17.100 / 52. 17.100 libavcodec 54. 91.100 / 54. 91.100 libavformat 54. 61.104 / 54. 61.104 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 34.101 / 3. 34.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default [image2 @ 0x1a8ffe0] Could find no file with with path 'http://192.168.93.224/snap.jpg' and index in the range 0-4 http://192.168.93.224/snap.jpg: No such file or directory
adding to my previous post,the user-agent flag is too ignored. Dňa 30.01.2013 19:02, video-server wrote / napísal(a):
hi
i have a problem with cookies, they are not sent as specified in parameter. according to example syntax mentioned in documentation http://ffmpeg.org/ffmpeg-protocols.html#HTTP-Cookies :
ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
my values:
./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;" http://192.168.93.224/snap.jpg
wireshark shows following headers:
GET /snap.jpg HTTP/1.1 User-Agent: Lavf54.61.104 Accept: */* Range: bytes=0- Connection: close
i have also tried entering newlines after each cookie
could you please help me find the cause ? thank you.
Mike
./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;"http://192.168.93.224/snap.jpg ffplay version N-49452-g91f3592 Copyright (c) 2003-2013 the FFmpeg developers built on Jan 30 2013 18:19:57 with gcc 4.7 (Debian 4.7.2-5) configuration: --enable-gpl --enable-nonfree --enable-version3 --enable-avfilter --enable-pthreads --enable-postproc --enable-filter=drawtext --enable-static --disable-shared libavutil 52. 17.100 / 52. 17.100 libavcodec 54. 91.100 / 54. 91.100 libavformat 54. 61.104 / 54. 61.104 libavdevice 54. 3.102 / 54. 3.102 libavfilter 3. 34.101 / 3. 34.101 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100 ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default [image2 @ 0x1a8ffe0] Could find no file with with path 'http://192.168.93.224/snap.jpg' and index in the range 0-4 http://192.168.93.224/snap.jpg: No such file or directory
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
On date Thursday 2013-01-31 21:23:23 +0100, video-server wrote:
adding to my previous post,the user-agent flag is too ignored.
Dňa 30.01.2013 19:02, video-server wrote / napísal(a):
hi
i have a problem with cookies, they are not sent as specified in parameter. according to example syntax mentioned in documentation http://ffmpeg.org/ffmpeg-protocols.html#HTTP-Cookies :
ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8
my values:
./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;" http://192.168.93.224/snap.jpg
wireshark shows following headers:
GET /snap.jpg HTTP/1.1 User-Agent: Lavf54.61.104 Accept: */* Range: bytes=0- Connection: close
This is because unfortunately there is a misbehavior occurring when http is used in conjunction with the image2 demuxer, for which options are not propagated (and the command will fail later). -- FFmpeg = Fascinating and Fabulous Mastering Ponderous Enhancing God
Stefano Sabatini <stefasab <at> gmail.com> writes:
./ffplay -cookies "usrid=admin; pwdid=admin; path=/; domain=192.168.93.224;" http://192.168.93.224/snap.jpg
wireshark shows following headers:
GET /snap.jpg HTTP/1.1 User-Agent: Lavf54.61.104 Accept: */* Range: bytes=0- Connection: close
This is because unfortunately there is a misbehavior occurring when http is used in conjunction with the image2 demuxer, for which options are not propagated (and the command will fail later).
If this is the problem, it may be possible to work-around with the -f mjpeg demuxer. Carl Eugen
If this is the problem, it may be possible to work-around with the -f mjpeg demuxer. with -f mjpeg the headers work as expected,but unusable (not a mjpeg stream,only single-jpg image) the only way to get image is via this jpg url. it ignores the multiple-requests (connection : keep -alive) too. mjpeg demuxer does not have "loop" parameter,which image2 has.
i debugged the source ,the parameter is not found by av_opt_find2. but i am not yes sure how this could be fixed, or where the problem lies. M.
it ignores the multiple-requests (connection : keep -alive) too. i meant the ip camera
video-server <video-server <at> aab.sk> writes:
If this is the problem, it may be possible to work-around with the -f mjpeg demuxer.
with -f mjpeg the headers work as expected,but unusable (not a mjpeg stream,only single-jpg image)
mjpeg demuxer does not have "loop" parameter,which image2 has.
Do I understand you correctly that "-f mjpeg" allows you to receive one frame and that you can correctly (re-)encode that frame but that your use-case requires "loop" which does not work with "-f mjpeg"? Carl Eugen
Do I understand you correctly that "-f mjpeg" allows you to receive one frame and that you can correctly (re-)encode that frame but that your use-case requires "loop" which does not work with "-f mjpeg"? yes. the first frame is probably lost (not displayed by ffplay) but that doesn't matter.
participants (4)
-
Carl Eugen Hoyos -
MiHe -
Stefano Sabatini -
video-server