<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Magic919</id>
	<title>ZoneMinder Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.staging.zoneminder.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Magic919"/>
	<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/Special:Contributions/Magic919"/>
	<updated>2026-04-20T05:18:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.staging.zoneminder.com/index.php?title=How_to_stream_h264_with_ffmpeg_from_an_Axis_P3343&amp;diff=5908</id>
		<title>How to stream h264 with ffmpeg from an Axis P3343</title>
		<link rel="alternate" type="text/html" href="http://wiki.staging.zoneminder.com/index.php?title=How_to_stream_h264_with_ffmpeg_from_an_Axis_P3343&amp;diff=5908"/>
		<updated>2013-10-04T07:51:04Z</updated>

		<summary type="html">&lt;p&gt;Magic919: remove spam link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;--[[User:Stagecoach|stagecoach]] 12:45, 19 October 2010 (BST)&lt;br /&gt;
&lt;br /&gt;
Go back to the [[How_To|How To]] pages...&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
We are trying to get h264 capturing and recording going in ZM. This page provides a starting point. The goal of this page is to test and make sure that h264 streaming is working in principle. &lt;br /&gt;
&lt;br /&gt;
=Reference=&lt;br /&gt;
&lt;br /&gt;
[http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/ FFmpeg x264 encoding guide]&lt;br /&gt;
&lt;br /&gt;
=x264 Preset Files=&lt;br /&gt;
If you build ffmpeg from scratch, then the preset files are by default located in /usr/local/share/ffmpeg&lt;br /&gt;
&lt;br /&gt;
=General Camera Configuration=&lt;br /&gt;
&lt;br /&gt;
==Variable Bit Rate==&lt;br /&gt;
Camera Settings:&lt;br /&gt;
[[Image:AX H264 VBR 1.png|thumb|Variable Bit Rate configuration]]&lt;br /&gt;
&lt;br /&gt;
ffmpeg command:&lt;br /&gt;
two-pass vbr:&lt;br /&gt;
ffmpeg -t 00:00:30 -f rtsp -i rtsp://172.16.2.100:554/axis-media/media.amp -an -pass 1 -vcodec libx264 -vpre slow_firstpass -b 180000 -bt 180000 -threads 0 -y outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Output file plays back in Totem Media Player. &lt;br /&gt;
&lt;br /&gt;
==Constant Bit Rate==&lt;br /&gt;
Camera Settings:&lt;br /&gt;
[[Image:AX H264 CBR 1.png|thumb|Constant Bit Rate configuration]]&lt;br /&gt;
&lt;br /&gt;
ffmpeg command:&lt;br /&gt;
ffmpeg -t 00:00:30 -f rtsp -i rtsp://172.16.2.100:554/axis-media/media.amp -vcodec libx264 -vpre medium -crf 20.0 -b 180000 -threads 0 -y outfile.mp4&lt;br /&gt;
&lt;br /&gt;
Output file plays back in Totem Media Player.&lt;br /&gt;
&lt;br /&gt;
=Ubuntu 12.04 Configuration=&lt;br /&gt;
After much searching and researching, this configuration works for me for the Axis P3343, M3014, and M3011.&lt;br /&gt;
&lt;br /&gt;
The default Ubuntu 12.04 ffmpeg, or &amp;quot;avconv&amp;quot; as the new fork is known as, works fine for camera capture, h264 video construction, and EyeZM.  It is automatically installed as a dependency to the zoneminder package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Set the following options for Zoneminder under the &amp;#039;&amp;#039;&amp;#039;Images&amp;#039;&amp;#039;&amp;#039; tab:&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;OPT_FFMPEG:&amp;#039;&amp;#039;&amp;#039; (Checked)&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;PATH_FFMPEG:&amp;#039;&amp;#039;&amp;#039; /usr/bin/avconv&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add the Zoneminder cameras with the following settings:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;General&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Source Type:&amp;#039;&amp;#039;&amp;#039; Ffmpeg&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Maximum FPS:&amp;#039;&amp;#039;&amp;#039; Empty&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Alarm Maximum FPS:&amp;#039;&amp;#039;&amp;#039; Empty&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Source&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Source Path:&amp;#039;&amp;#039;&amp;#039; rtsp://(camera dns name or IP address)/axis-media/media.amp?streamprofile=Quality?tcp&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Capture Width (pixels):&amp;#039;&amp;#039;&amp;#039; 640 for the M3011, 1280 for the P3343 and the M3014&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;Capture Height (pixels):&amp;#039;&amp;#039;&amp;#039; 480 for the M3011, 800 for the P3343 and the M3014&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If your camera status repeatedly goes orange or red, copy the &amp;quot;Quality&amp;quot; profile on the camera and setup a &amp;quot;ZM&amp;quot; profile on the camera with &amp;#039;&amp;#039;&amp;#039;GOV Settings&amp;#039;&amp;#039;&amp;#039; length of 20.  Note that this is usually due to the camera trying to handle multiple streams.  It can usually do the &amp;quot;Quality&amp;quot; profile just fine if it is only serving 1 stream.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;?tcp&amp;quot; argument on the Source Path URL is critical.  Otherwise you will get packets dropped and half and artifacted frames.&lt;/div&gt;</summary>
		<author><name>Magic919</name></author>
	</entry>
</feed>