FAQ  •  Register  •  Login

rtsp stream unsupported transport

<<

kdext

Serviio newbie

Posts: 9

Joined: Wed Apr 15, 2015 7:31 pm

Post Mon May 11, 2015 9:12 am

rtsp stream unsupported transport

I have added live RTSP stream to Serviio but I can not get it to work. Problem is with RTSP transport settings.
When I run
  Code:
/opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp+udp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://141.138.16.134:21554/live/ch00_0

I get following error
  Code:
ffmpeg version 2.4.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar 25 2015 23:24:34 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/opt/ffmpeg --enable-libx264 --enable-gpl --enable-avcodec --enable-static --extra-cflags='-I=/opt/x264/lib/pkgconfig' --extra-ldflags='-I=/opt/x264/lib/pkgconfig'
  libavutil      54. 14.100 / 54. 14.100
  libavcodec     56. 12.101 / 56. 12.101
  libavformat    56. 14.100 / 56. 14.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  2.103 /  5.  2.103
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
[rtsp @ 0x1da9800] method SETUP failed: 461 Unsupported Transport
Input #0, rtsp, from 'rtsp://141.138.16.134:21554/live/ch00_0':
  Metadata:
    title           : Ubiquiti Live
    comment         : UBNT Streaming Media
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc), 1280x720, 15 fps, 30.67 tbr, 90k tbn, 30 tbc
At least one output file must be specified

but when I run
  Code:
/opt/ffmpeg/bin/ffmpeg -rtsp_transport +tcp -analyzeduration 10000000 -fflags +genpts -threads auto -i rtsp://141.138.16.134:21554/live/ch00_0

everything is fine.

How to force Serviio to run ffmpeg with changed rtsp_transport parameter?
<<

bbrifaz

Serviio newbie

Posts: 1

Joined: Fri Nov 06, 2015 10:01 pm

Post Fri Nov 06, 2015 10:10 pm

Re: rtsp stream unsupported transport

I'm having the exact same problem. I'm trying to stream my IP camera (TechSon) feed, but Serviio doesnt detect it :(
Checking with FFMpeg, the only solution is when I execute

  Code:
ffmpeg -rtsp_transport tcp -i <INPUT HERE>


I tried setting up FFMpeg with tcp+udp and udp flags, but none of them work. Only tcp flag is good (and gets the stream without problems)

If someone knows the solution please help us!
<<

dbase25

Serviio newbie

Posts: 7

Joined: Sat Jan 04, 2014 11:41 am

Post Sat Jul 30, 2016 7:33 pm

Re: rtsp stream unsupported transport

Hello everbody,

i have the same problem and the only think about this i was found is the file "serviio.jar" -> org\serviio\external\FFMPEGWrapper.class but i have no way to change the string.

I try now to wrap the ffmpeg.exe with my own "exe file" and change the command line for ffmpeg. I hope the check works and i can change the ffmpeg.exe to org.

If it any possible to make a config xml flag to change tcp/udp?

Regards
dbase

Edit:

i wrote a short freebasic program thats change only the +tcp+udp to +tcp parameter and give it to ffmpeg.

--------
dim shared cmdline as string
dim shared cmdlinenew1 as string
cmdline=command
start=instr(cmdline,"+tcp+udp")
if start>0 then
cmdlinenew1=mid$(cmdline,1,start-1)+"+tcp"+mid$(cmdline,start+8)
else
cmdlinenew1=command
end if
result=exec("c:\Program Files\Serviio\lib\ffmpeg2.exe",cmdlinenew1)
---------

1) compile with freebasic and check if the path to ffmpeg2.exe (org. ffmpeg.exe file) correct otherwise change it
2) rename the ffmpeg.exe file in the serviio folder to ffmpeg2.exe
3) compile the basic program to exe with the name ffmpeg.exe
4) copy your own ffmpeg.exe to the path with the ffmpeg2.exe

For me, it works now and the rest too.
<<

faaafasd

Serviio newbie

Posts: 1

Joined: Mon Feb 26, 2018 4:37 am

Post Mon Feb 26, 2018 4:50 am

Re: rtsp stream unsupported transport

dbase25 wrote:Hello everbody,

i have the same problem and the only think about this i was found is the file "serviio.jar" -> org\serviio\external\FFMPEGWrapper.class but i have no way to change the string.

I try now to wrap the ffmpeg.exe with my own "exe file" and change the command line for ffmpeg. I hope the check works and i can change the ffmpeg.exe to org.

If it any possible to make a config xml flag to change tcp/udp?

Regards
dbase

Edit:

i wrote a short freebasic program thats change only the +tcp+udp to +tcp parameter and give it to ffmpeg.

--------
dim shared cmdline as string
dim shared cmdlinenew1 as string
cmdline=command
start=instr(cmdline,"+tcp+udp")
if start>0 then
cmdlinenew1=mid$(cmdline,1,start-1)+"+tcp"+mid$(cmdline,start+8)
else
cmdlinenew1=command
end if
result=exec("c:\Program Files\Serviio\lib\ffmpeg2.exe",cmdlinenew1)
---------

1) compile with freebasic and check if the path to ffmpeg2.exe (org. ffmpeg.exe file) correct otherwise change it
2) rename the ffmpeg.exe file in the serviio folder to ffmpeg2.exe
3) compile the basic program to exe with the name ffmpeg.exe
4) copy your own ffmpeg.exe to the path with the ffmpeg2.exe

For me, it works now and the rest too.



I have no idea what u accomplished with this. This did not resolve my issue. In my case there is also a need for authentication before the feed opens, so i have a slightly more complicated situation.

The reason for my reply is that your code did not work for me. I tried fixing it but freebasic was a completly new thing for me and i wasn't in the mood for a new programming language for this. Instead i wrote a replacement for ffmpeg.exe, like u suggested, on c++. Here is the code:

  Code:
#include <iostream>
#include <cstring>

using namespace std; //ReplaceInPlace coded by Rorzilla @ stackoverflow
void ReplaceStringInPlace(std::string& subject, const std::string& search, const std::string& replace) {
    size_t pos = 0;
    while ((pos = subject.find(search, pos)) != std::string::npos) {
         subject.replace(pos, search.length(), replace);
         pos += replace.length();
    }
}

using namespace std;
int main(int argc, char** argv) {
   
   //assemble the arguments in one string
   std::string commandLineStr= "";
   for (int i=1;i<argc;i++) commandLineStr.append(std::string(argv[i]).append(" "));

   /replace +tcp+udp with +tcp from arguments
   ReplaceStringInPlace(commandLineStr, "+tcp+udp", "+tcp");

   //run the original ffmpeg.exe (now renamed as ffmpeg2.exe) with the modified arguments
   char temp[512];
   sprintf(temp, "ffmpeg2.exe %s", commandLineStr.c_str());
   system((char *)temp);
   
   return 0;
}


I hope someone else understood what dbase25 was doing and finds this code useful somehow. Good luck.

Return to General discussion

Who is online

Users browsing this forum: No registered users and 3 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.