Replies: 2 comments
-
Hello, yes, it's quite possible that the JWT is so long that FFmpeg truncates it before sending it to the server. We cannot do much about it since it's not a server issue. You can either hack FFmpeg in order to increase the maximum URL size, send a patch to the FFmpeg mailing list or alternatively switch authentication method. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Have you implemented this method? Can you share some details? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hello everyone,
I'm trying to capture a frame from a video. I was able to do this by creating a new path in the API /v3/config/paths/add/EXAMPLE, specifying that it is a sourceOnDemand, and setting the command to take a picture in runOnInit. It works! However, I'm using JWT authentication with a very long hash, and this seems to somehow break ffmpeg (ERROR1). Maybe @aler9?
{
"name": "EXAMPLE",
"source": "rtsp://XXX/EXAMPLE",
"sourceOnDemand": true,
"runOnInit": "ffmpeg -i rtsp://XXX/EXAMPLE -vframes 1 ./recordings/MYPICTURE.jpg",
"sourceOnDemand": "true"
}
error1:
ffplay "rtsp://XXX/EXAMPLE?jwt=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJVUm9DMkY2MGszcmZFMUE2S3ptQ1N1RTI1RS0zQ3RCX0tCcjRjVjBJY2NnIn0.eyJleHAiOjE3MTQ1MDA5MzIsImlhdCI6MTcxNDUwMDYzMiwianRpIjoiYTVmZmZiMDYtOWNkZC00NjAxLWIxYWYtOTBiYTc5NDIyYjA3IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy9tZWRpYW10eCIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIyZTcwZDFhZS0zNzE1LTQ4YTctODQ5MS01NjQ0ZDI2NzAxYzUiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJtZWRpYW10eCIsInNlc3Npb25fc3RhdGUiOiJkZDEyMGU1MC0yOWY1LTQ0YzgtYjJmMi0yMGE5ZDg4YjE3MzgiLCJhY3IiOiIxIiwiYWxsb3dlZC1vc......
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
libpostproc 58. 1.100 / 58. 1.100
^[[O[rtsp @ 0x147716520] method DESCRIBE failed: 401 Unauthorized
rtsp://XXX/EXAMPLE?jwt=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJVUm9DMkY2MGszcmZFMUE2S3ptQ1N1RTI1RS0zQ3RCX0tCcjRjVjBJY2NnIn0.eyJleHAiOjE3MTQ1MDA5MzIsImlhdCI6MTcxNDUwMDYzMiwianRpIjoiYTVmZmZiMDYtOWNkZC00NjAxLWIxYWYtOTBiYTc5NDIyYjA3IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy9tZWRpYW10eCIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIyZTcwZDFhZS0zNzE1LTQ4YTctODQ5MS01NjQ0ZDI2NzAxYzUiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJtZWRpYW10eCIsInNlc3Npb25fc3RhdGUiOiJkZDEyMGU1MC0.....: Server returned 401 Unauthorized (authorization failed)
Beta Was this translation helpful? Give feedback.
All reactions