How to stream h264 with ffmpeg from an Axis P3343

From ZoneMinder Wiki
Revision as of 09:23, 23 October 2010 by Stagecoach (talk | contribs)
Jump to navigationJump to search

--stagecoach 12:45, 19 October 2010 (BST)

Introduction

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 principal.

Reference

FFmpeg x264 encoding guide

x264 Preset Files

If you build ffmpeg from scratch, then the preset files are by default located in /usr/local/share/ffmpeg

General Camera Configuration

Variable Bit Rate

Camera Settings:

Variable Bit Rate configuration

ffmpeg command: two-pass vbr: 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

Output file plays back in Totem Media Player.

Constant Bit Rate

Camera Settings:

Constant Bit Rate configuration

ffmpeg command: 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

Output file plays back in Totem Media Player.