Motion - Ffmpeg Stream
You are here: Foswiki>Motion Web>FfmpegStream (05 Jan 2013, AlexeyBelyaev)Edit Attach

ffmpeg stream

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)

vlc http://server:1234/mpeg4?bps=500000 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)

Discussion and Comments


what Version? patch not working due to missing stream.c|h in 3.2.11.1

-- AxelAmthor - 06 Sep 2009


It's against svn trunk but didn't specify svn revision though.

-- AngelCarpintero - 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?

-- HubertBall - 22 Oct 2009

For revision 475 patch not work. stream.c not patch corrected.

-- ParMax - 22 Dec 2009

motion_stream_ffmpeg_rev552.diff.gz - worked

-- ParMax - 28 May 2012

at first: 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 frown, sad smile In log I see: connect stream_add_client codec mov fps 25 bps 500000 vbr 0 or connect stream_add_client codec mpeg4 fps 25 bps 500000 vbr 0 or connect stream_add_client codec mpegts fps 25 bps 500000 vbr 0 get_oformat: ffmpeg_video_codec option value mpegts is not supported or 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 frown, sad smile

-- AlexeyBelyaev - 17 Sep 2012

Alexey, Could you make a patch for the current stable version? motion-3.2.12.tar.gz

-- SergeiBordun - 15 Nov 2012

this patch not work frown, sad smile

-- AlexeyBelyaev - 05 Jan 2013

Topic revision: r11 - 05 Jan 2013, AlexeyBelyaev
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.