Jump to content

[DEV]New Argus Provider


pünktchen

Recommended Posts

From what I understand the rtsp stream from argus is a raw DVb-c stream. So if certain frames haven't passed yet this gives an error with ffmpeg. We should be able to come up with a config of ffmpeg that ignores this and starts decoding when it receives readable data.

 

How do other systems handle this? Does anyone know?

Link to comment
Share on other sites

pünktchen

that doesn't really mean much because Vlc is built with ffmpeg.

Yes, but VLC seems to use another mechanism to read the stream source.

There's also a thread in the Argus forum where a guy tried to create streaming for the webinterface and had the same problems with rtsp and ffmeg:

http://www.argus-tv.com/forum/viewtopic.php?f=51&t=4330&start=20#p30588

 

From what I understand the rtsp stream from argus is a raw DVb-c stream. So if certain frames haven't passed yet this gives an error with ffmpeg. We should be able to come up with a config of ffmpeg that ignores this and starts decoding when it receives readable data.

 

How do other systems handle this? Does anyone know?

MPExtended for MediaPortal reads the tsbuffer i think:

https://github.com/MPExtended/MPExtended/blob/master/Services/MPExtended.Services.StreamingService/Code/TsBuffer.cs

 

As far as I know, RED_F is the developer of the XBMC PlugIn for Argus.

Maybe he can help us a bit with this issues?

As far as i know Kodi also reads the timeshift file:

https://github.com/opdenkamp/xbmc-pvr-addons/tree/master/addons/pvr.argustv/src/lib/tsreader

Link to comment
Share on other sites

I did some research...

But i don't know how to solve the issue...

 

The following is the bad video, like we know. I am watching the webm file with VLC

ffmpeg.exe -i "rtsp://192.168.1.101:554/stream3.0" -y "D:\Temp\Test.webm"

The following gives me a good video. I am watching the mpg file with VLC

ffmpeg.exe -i "rtsp://192.168.1.101:554/stream3.0" -y "D:\Temp\Test.mpg"
Link to comment
Share on other sites

can't do mpg. chrome doesn't support that. the output depends on what the client player asks for. 

 

server wmc has a middle-man approach where it modifies the stream on the fly, writes that output to a file and then gives that file to MBS. maybe you can use some of that.

Link to comment
Share on other sites

can't do mpg. chrome doesn't support that. the output depends on what the client player asks for. 

 

server wmc has a middle-man approach where it modifies the stream on the fly, writes that output to a file and then gives that file to MBS. maybe you can use some of that.

 

It's in the plugin itself? I need to ask for the source code then. Or he can upload it to github. :)

@@krustyreturns

Edited by Sven
Link to comment
Share on other sites

krustyreturns

hi @@Sven,

 

This code is not in the plugin, its in serverwmc.  What we do is specific to the tv format wmc uses (wtv).  The wmc dlls capture tuner output directly to wtv.  Unfortunately for us, ffmpeg cannot deal with a wtv file that is growing, so we have to remux it to ts format on the fly and feed ffmpeg the ts data.  I would be happy to give you the code if you think it would help.

Link to comment
Share on other sites

Isn't this what XMBC and MP do with the TS stream? I'm pretty sure they both use MP's TSReader to demux the transport stream. The code is open source. 

Link to comment
Share on other sites

I've asked x-cimo from argus forum for help in a message on the forum and with a pm

 

When you check his profile. :(

Last visit --> Sun Sep 07, 2014 1:53 pm

Link to comment
Share on other sites

Well x-cimo replied to my pm asking who is looking for transcoding help so I pointed him towards this thread here on MB forum.

Fingers crossed

Link to comment
Share on other sites

Hello here,

 

Hopefully you have more time than I had to work on this:)

 

I worked quite a bit to look at various streaming format, the best (most supported I found across device) is Apple HLS (HTTP Live streaming).

HLS also support "adaptative streaming" which encode a stream with mutiple bitrate, if a client has low bandwidth the video become more compressed instead of choppy.

 

The following VLC arguments create a HLS stream and playlist with 3 different bitrates.

 

I had this working fine to other formats, if what's below dosn't work for you I will look if I saved any other transcoding profile.

 

Here we go (directly from my C project, you need to remove the escape characters and replace the %s with the values below)

_snwprintf_s( args, sizeof( args ), L"--sout-ffmpeg-strict=-2 --sout-avcodec-strict=-2 -I dummy --mms-caching 0 %s vlc://quit --sout=\"#transcode{ \
				dst=\"transcode{width=1280,height=720,fps=30,deinterlace,audio-sync,vcodec=h264,vb=6000,venc=x264{aud,profile=baseline,preset=superfast,threads=2,level=30,keyint=10,ref=1},acodec=aac,ab=256,channels=2,samplerate=48000}:std{access=livehttp{seglen=5,delsegs=true,numsegs=10,index=%s\\hls-hi.m3u8,index-url=hls-########.ts},mux=ts{use-key-frames},dst=%s\\hls-hi-########.ts}\" \
				dst=\"transcode{width=1280,height=720,fps=30,deinterlace,audio-sync,vcodec=h264,vb=3000,venc=x264{aud,profile=baseline,preset=superfast,threads=2,level=30,keyint=10,ref=1},acodec=aac,ab=128,channels=2,samplerate=48000}:std{access=livehttp{seglen=5,delsegs=true,numsegs=10,index=%s\\hls-med.m3u8,index-url=hls-########.ts},mux=ts{use-key-frames},dst=%s\\hls-med-########.ts}\" \
				dst=\"transcode{width=1280,height=720,fps=30,deinterlace,audio-sync,vcodec=h264,vb=1000,venc=x264{aud,profile=baseline,preset=superfast,threads=2,level=30,keyint=10,ref=1},acodec=aac,ab=64,channels=2,samplerate=48000}:std{access=livehttp{seglen=5,delsegs=true,numsegs=10,index=%s\\hls-low.m3u8,index-url=hls-########.ts},mux=ts{use-key-frames},dst=%s\\hls-low-########.ts}\" \
				\"}",
				this->_rtspUrl, this->_workingFolder.c_str(), this->_workingFolder.c_str(), this->_workingFolder.c_str(), this->_workingFolder.c_str(), this->_workingFolder.c_str(), this->_workingFolder.c_str() )
Edited by x-cimo
Link to comment
Share on other sites

 

I did some research...

But i don't know how to solve the issue...

 

The following is the bad video, like we know. I am watching the webm file with VLC

ffmpeg.exe -i "rtsp://192.168.1.101:554/stream3.0" -y "D:\Temp\Test.webm"

The following gives me a good video. I am watching the mpg file with VLC

ffmpeg.exe -i "rtsp://192.168.1.101:554/stream3.0" -y "D:\Temp\Test.mpg"

 

Ok i did some more research.

ffmpeg.exe -i "rtsp://192.168.1.101:554/stream3.0" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 -y "D:\Temp\Test.webm"

This gives me already something that can be watched. :)

The first 2 seconds is with some blocks and sometimes some blocks but you can already watch something.

  • Like 1
Link to comment
Share on other sites

krustyreturns

@@Sven,

 

I gave you access to the serverwmc code on bitbucket.  The VS project in the solution file that you might want to look at is called 'remuxer'.  Happy to help if/when you have questions.

Link to comment
Share on other sites

  • 2 weeks later...

Too bad to hear that :(

Cause Argus-TV is for me one of the best TV backends available for Windows and I don't want to change it.

But it really would been a nice addition for MediaBrowser.

 

I still hope a solution can be found.

If we can assist you anyway, just type it.

Link to comment
Share on other sites

I talked also with Luke. For the moment we don't have an easy way to solve the problem with the rstp or with the tsbuffer..... :(

I will also ask the argus developer if it's possible to expose an http endpoint...

Link to comment
Share on other sites

Too bad to hear that :(

Cause Argus-TV is for me one of the best TV backends available for Windows and I don't want to change it.

But it really would been a nice addition for MediaBrowser.

 

I still hope a solution can be found.

If we can assist you anyway, just type it.

 

Totally agree!

 

/tompa

Link to comment
Share on other sites

Yeah it's indeed not the answer/solution we expected... :(

I asked him if it was possible... He told me that it's possible, but it wil not ready in 2seconds.... :(

Link to comment
Share on other sites

  • 3 weeks later...

Is development still going on with this plugin?  I noticed that there has not been any posts since November 26th.  I use ArgusTV as it is the best solution for my situation.  I use it in combination with mediaportal TV server as recorder.  I noticed there is now a mediaportal plugin for Mediabrowser server and wondering if you can get with that Dev to see if there is a solution for the liveTV issue.  I love this plugin and works great for the recordings, and would love to see it also work for live TV.

 

Thank you Sven for all your hard work. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...