Opened 7 years ago

Last modified 7 years ago

#6547 new defect

FFmpeg auth fail with long rtsp urls

Reported by: Ruslan Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: rtsp auth ffmpeg
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Trying to get long url rtsp stream with Authorization cause Authorization problem (method SETUP failed: 401 Unauthorized)

How to reproduce:

This works (Length of uri is 116)

% ffmpeg -i "rtsp://user:password@192.168.0.8:554/Streaming/tracks/401?starttime=20170720T221248Z&endtime=20170720T221330Z&names=00000000033222"  -vcodec copy -an video.mp4

This don't works

% ffmpeg -i "rtsp://user:password@192.168.0.8:554/Streaming/tracks/401?starttime=20170720T221248Z&endtime=20170720T221330Z&names=000000000332221"  -vcodec copy -an video.mp4

Length of uri is 117

RTSP DESCRIBE succeed, but SETUP command add /trackID=video that cause url size to be 131 in second case.

It looks like authenticated urls has limit for 130 chars.
Setting or not setting port in url doesn't affect as in RTSP requests ffmpeg always add port, but IP address affects. So having 192.168.0.245 instead of 192.168.0.8 reduce working path by 2 chars.
For not protected urls there are no such problem.

Tested on:

ffmpeg version 3.2.2 
built with Apple LLVM version 8.0.0

ffmpeg version N-85275-gac24a82 
built with gcc 4.9.2 (Debian 4.9.2-10)

(master)
ffmpeg version N-86825-g99c5ac2 
built with gcc 4.9.2 (Debian 4.9.2-10)

Attachments (2)

ffmpeg.log (2.7 KB ) - added by Ruslan 7 years ago.
ffmpeg RTSP Log
vlc.log (3.7 KB ) - added by Ruslan 7 years ago.
VLC RTSP Log

Download all attachments as: .zip

Change History (3)

by Ruslan, 7 years ago

Attachment: ffmpeg.log added

ffmpeg RTSP Log

by Ruslan, 7 years ago

Attachment: vlc.log added

VLC RTSP Log

comment:1 by Ruslan, 7 years ago

Added logged RTSP commands for ffmpeg and VLC

Note: See TracTickets for help on using tickets.