Axis Streaming

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
Zappa
New Cone
New Cone
Posts: 6
Joined: 30 Dec 2006 01:36

Axis Streaming

Postby Zappa » 05 Jan 2007 13:29

Hi everybody,

I am trying to use vlc as a proxy for an axis webcam stream.
I tried relaying the mjpeg but had problems (Browser did not recognise the mjpg as valid image, see posting in Stream Output board) so I'd like to try taking the mpeg4 stream, transcoding it to something "more compatible" and stream it out again in a fomat allmost any user can see.

Could anyone please give me a hint, how to do this in an easy manner ?

Thank you,

best regards

Bernd

Zingaro2002
Blank Cone
Blank Cone
Posts: 47
Joined: 30 May 2006 09:58

Postby Zingaro2002 » 02 Feb 2007 16:48

Have you solved your problem?
I have a similar one...

Zappa
New Cone
New Cone
Posts: 6
Joined: 30 Dec 2006 01:36

Postby Zappa » 04 Feb 2007 01:15

Sorry, but I got stuck.
After trying with various SW I had to stop. The only information I got was that it should be working, but no hints what could be wrong, so i cncelled the project after about one week of struggling around.
Too sad, that there seem to be quite a lot of people knowing but noone is willing to give concrete help.

best regards

bernd

minek
New Cone
New Cone
Posts: 1
Joined: 20 Feb 2007 19:36

Postby minek » 20 Feb 2007 20:12

I have similar problem, but I'll try to tell more about it.

vlc and axis 214 PTZ
machine 1: VLC version 0.8.6-test2a
(this one wasn't upgraded from few weeks ... and wont be for now, because it's working)
machine 2: VLC media player 0.8.6a
(newer installation)
both: debian and vlc installed from debian-multimedia.org
Also all libraries (ffmpeg and others are from debian-multimedia.org)

Ok, let's play:
vlc rtsp://camera/mpeg4/media.amp # - plays on both (ascii preview OK)
vlc rtsp://camera/mpeg4/media.amp --sout '#transcode{[anything]}:std{[anything]}' # - nothing, writing only fragment of file and not serving anything when std is set to http://
It's impossible to fetch and transcode axis's mpeg4 stream :(

with -vvv output, there is many:
[00000330] ffmpeg encoder warning: almost fed libavcodec with a frame in the past (current: 1171997134386453, last: 1366499658180346)
and
[00000292] stream_out_transcode private debug: drift is too high, resetting master sync
I don't understand it.

Ok, but there is also mjpeg (higher bitrate, but locally I have good ethernet), so:

machine 1:
everything's OK, reading and transcoding to any format I want.
Except MJPEG. But this must be a bug in library, I'm not sure which one.
Anything transcoded to MPJPG with mpjpeg muxer and output on http is wrong.
There are incomplete headers in stream, there is missing Content-Length: [size] and \r\n after it in first frame.
Also in next frames I think there is spare sign after header (0x00).
I wrote perl script to fix it (it listens on other port, and when called - it gets vlc mjpeg stream, fixes it and put back corrected one)

machine 2:
the same problem with vlc's generated mjpeg
an other problem with _reading_ of correct AXIS mjpeg!!!
I something like this in (-vvv) output:
[00000295] mjpeg demuxer debug: MIME boundary not found in 25600 bytes of data
(....)
[00000279] main playlist: nothing to play
And typing ,,quit'' or ,,ctr-C'' generates core dump.

I noticed the difference in vlc's output on 1 and 2 machine:
1:
[00000291] main input debug: selecting program id=0
[00000304] main demuxer debug: using demux2 module "mjpeg"
[00000347] main packetizer debug: looking for packetizer module: 17 candidates
[00000347] main packetizer debug: using packetizer module "packetizer_copy"
[00000291] main input debug: stream out mode -> no decoder thread
[00000291] main input debug: starting in async mode


2:
[00000289] main input debug: selecting program id=0
[00000295] main demuxer debug: using demux2 module "mjpeg"
[00000337] main decoder debug: looking for decoder module: 24 candidates
[00000337] ffmpeg decoder debug: libavcodec initialized (interface 3345152 )
[00000337] ffmpeg decoder debug: postprocessing disabled
[00000337] ffmpeg decoder debug: using direct rendering
[00000337] ffmpeg decoder debug: ffmpeg codec (Motion JPEG Video) started
[00000337] main decoder debug: using decoder module "ffmpeg"

In a bit older version, there is a ,,packetizer'', in newer - ffmpeg decoder.
I think, that this ffmpeg is buggy in both - reading and writing mjpeg.
but how to force vlc to using previous method of mjpeg? (packetizer?? I don't know what it is and how it works)


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests