Description of Patch
Having a low upstreambandwidth i needed a solution to stream in also other video formats (mpeg4, h264, flv, ...).
Insted of "vlc http://server:1234"
; (mjpeg) i can do now also "mplayer http://server:1234/mpeg4"
For a different streaming rate you can add parameters to the url(vbr overrides bps)
or vlc http://server:1234/mpeg4?vbr=10
To see the stream on my TV (VDR with iptv plugin) i need mpegts: http://server:1234/mpegts?fps=25&bps=2000000
fps is only a fake in the stream header - needed for VDR
Installation of Patch
Download the patch file and copy it to the motion source directory and issue the command
gunzip -cd motion_stream_ffmpeg3.diff.gz | patch -p1
Then re-build Motion and test the patch.
Change History of Patch
- 1 Initial revision
- 2 mjpg fixes
- 3 read/write (now blocking) - timeout 1 second (got loop in write)
what Version? patch not working due to missing stream.c|h in 188.8.131.52
- 06 Sep 2009
It's against svn trunk but didn't specify svn revision though.
- 06 Sep 2009
this is exactly what i missed for a long time on motion.
As I'm not very experienced on linux, is it possible to get a 1.2.3.-Description of what to do to get this running?
- 22 Oct 2009
For revision 475 patch not work. stream.c not patch corrected.
- 22 Dec 2009
motion_stream_ffmpeg_rev552.diff.gz - worked
- 28 May 2012
MOTION_LOG(ERR, TYPE_STREAM, NO_ERRNO, "connect %s fps $d bps %d vbr %d", purl, fps, bps, vbr);
need to be as
MOTION_LOG(ERR, TYPE_STREAM, NO_ERRNO, "connect %s codec %s fps %d bps %d vbr %d", purl, fps, bps, vbr);
at second - Not Work
In log I see:
connect stream_add_client codec mov fps 25 bps 500000 vbr 0
connect stream_add_client codec mpeg4 fps 25 bps 500000 vbr 0
connect stream_add_client codec mpegts fps 25 bps 500000 vbr 0
get_oformat: ffmpeg_video_codec option value mpegts is not supported
get_oformat: ffmpeg_video_codec option value mjpg is not supported
stream_add_client: ffopen_open error creating (new) stream [stream_add_client]
and no Video at vlc
- 17 Sep 2012
Alexey, Could you make a patch for the current stable version? motion-3.2.12.tar.gz
- 15 Nov 2012
this patch not work
- 05 Jan 2013