Commit Graph

48 Commits

Author SHA1 Message Date
Isaac Connor c9985107ee Add a deinit function to handle avformat_network_deinit 2019-04-01 13:38:13 -04:00
Isaac Connor 87d1390fed Merge branch 'storageareas' into h265 2019-01-16 15:20:17 -05:00
Isaac Connor a46b443d4a create zm_dump_frame to print out useful frame info. 2019-01-14 10:48:06 -05:00
Isaac Connor a8329465fb Merge branch 'master' into h265 2018-10-22 10:30:01 -04:00
Isaac Connor 5ef64bf256 fix memleak on old libav distros 2018-09-26 16:20:29 -04:00
Isaac Connor 0ec391354c Merge branch 'fix_zms_from_mp4' into h265 2018-09-13 16:18:28 -04:00
Isaac Connor 18f0610d87 Merge zm_ffmpeg.cpp from zma_to_thread 2018-01-21 17:18:29 -05:00
Isaac Connor a81ff85fbb add ffmpeg decoding of a .mp4 to get the frames 2017-08-23 15:05:44 -04:00
Isaac Connor b73c0ba978 rough in zm_ffmpeg_input and split out eventstream 2017-06-22 17:58:32 -04:00
Isaac Connor 119f8fc86c Fix version checks to fix build on yaketty 2017-06-15 13:02:54 -04:00
Isaac Connor b51d885f66 fix build on old ffmpeg 2017-06-14 10:36:08 -04:00
Isaac Connor 3c053b36ef introduce zm_dump_codecpar and zm_dump_codec to be used for debugging 2017-06-13 16:51:51 -04:00
Isaac Connor b1f8485969 Fix videostorage (#1885)
* merge relevant c bits to make h264 recording work

* h264 code requires libavresample and boost

* Need libavresample
2017-05-16 12:04:56 -04:00
Isaac Connor c859f7291c Feature h264 videostorage (#1882)
* Moved writing of configure options from Controller to Model.  Fixes #191.

* Initial commit for saving events as videos :)

* Add zm_video.cpp to autotools

* Add zm_video.h to autotools

* Search for MP4V2 header file 3 times: mp4v2/mp4v2.h, mp4v2.h, mp4.h

* Fix serve memory leak

* Few minor code improvements

* Added the ability to override preset, tune, profile and few other improvements

* Correctly write SPS & PPS from x264 encoder headers

* Remove unnessecary SPS & PPS writing code

* Imported missing files from master to feature-h264-videostorage

* Audio support including fixes for dts/pts, split on keyframe and update to mkv extension to prevent ffmpeg problems writing rtsp audio to mp4 containter (header problem)

* Updates to make gcc happy

* Add html5 video control to timeline and event to support mkv playback

* Add zm_videostore.cpp to CMakeLists.txt

* Remove Modern Branch for now

* Fix minor bug

* Option handled added in master, removing duplicate declaration

* Add CaptureandRecord from zm_camera.h

* Putting placeholder in for CaptureAndRecord function

* Removed duplicate code and brackets

* add digest auth file for cmake

Conflicts:
	src/CMakeLists.txt

* Add web dir back into Makefile.am
Revert "Removed web from SUBDIRS in Makefile.am"

This reverts commit d9bbcdf3a9.

* Add CaptureAndRecord to vlc, still need to make it record

* Resolve SegFault on videostore

* Swap to mp4 container

* mp4 changes

* spaces to tabs, hide video stuff if video writer is turned off

* Make timeline open event.mp4 instead of mkv

* Missed mkv in timeline.js

* Fix some issues from the merge conflict

* Resolve post merge build issues with braces

* Fix whitespace

* Update Jpeg and Video options for passthrough options

* Whitespace fix zm_camera.h

* Fix array mkssing comma

* Add support for Jpeg save options for h264 branch snapshot. Might remove altogether if snapshots not needed

* Update VideoStoreData memory size comment

* Change from config.use_mkv_storage to per monitor option VideoWriter from video branch

* Fix bracket issues post merge

* Clean up comments and add av_free_packet

* Convert from event_directory to event file as per Video branch

* Testing videojs for video playback

* Fixed a missing bracket post merge and also SQL_values now used for EventID and Monitors

* bring recent improvements in ffmpeg capture function into captureandrecord

* Remove pict from writeAudioFramePacket as not used

* Add translate options for h264 Storage options in Monitor and update en_gb file

* Cherry-Pick from iconnor - make it compile on ubuntu 15.04.  Which is libav 56.1.0

Conflicts:
	src/zm_ffmpeg.cpp
	src/zm_remote_camera_rtsp.cpp

Conflicts:
	distros/ubuntu1204/changelog

* Clean up videostore code and remove lots of unused code

* proof of concept for dynamic/automatic video rotation using video-js plugin zoomrotate

Conflicts:
	web/skins/classic/views/event.php

* removed redundant field in sql query

Conflicts:
	web/skins/classic/views/event.php

* local storage of video js plugin

* Beautify!

Make the code somewhat readable.

* added missing videojs.zoomrotate.js file

added missing videojs.zoomrotate.js file

* Typo

added missing "

* Added missing brackets

* fix to display thumbnails when only storing snapshot.jpg

* added control for video playback rate

Conflicts:
	web/skins/classic/views/event.php

* dynamically create jpegs from video file for viewing in browser

* fix timeline view for SaveJPEGs monitors (without enabled VideoWriter)

* only expose monitor info which are being used in client

* fix segmentation fault in zma with ubuntu 14.04 and ffmpeg 2.5.8 (gcc 4.8)

when libx264 is not installed

* better way of detecting showing image or video in timeline and event view

instead of Monitor.VideoWriter, Event.DefaultVideo is used, so even if
VideoWriter/SaveJPEG option is changed, a valid image or video will always be
displayed for historical events in both timeline and event view

this also fixes loading videos in timeline view

* Fixes problem of crashing zmc when bad packet arrives causing av_interleaved_write_frame() to return non-zero (-22).  Prefilters common packet issues. Add metadata title to generated video file

* Remove syslog.h

* fixed SaveJPEGs are not working

which is caused in errors introduced when merging with master

* Update README.md

* Fix build warnings specific to h264 branch, unused FrameImg, unused ret and int64_t snprintf issues

* Fix PRId64 issue in travis, builds locally fine, but I can see a gcc version issue here

* Fix PRId64 issue in travis, another try

* Try "STDC_FORMAT_MACROS" to see if that helps Travis on gcc 4.6.3

* Revert space removal around PRId64

* video branch ffmpeg 2.9 fixes

ffmpeg 2.9 patched removed SSE2 CPU

* Add FFMPEGInit back

* use webvvt to overlay timestamp (honoring Monitor.LabelFormat) to videos in timeline and event

also fixed bug which prevented seeking in timeline video preview

* ffmpeg 3.0 API build failure fixes

* Update README.md

* merge all the commits from the messed up iconnor_video branch

* fix whitespace

* revert

* whitespace fixes

* spelling fix

* put back some text

* add these back

* fix spelling mistake

* Steal some packet dumping routines from ffmpeg. Convert them to use our logging routines

* add a test and error message if the codec is not h264

* these have been removed in master

* add a view to check auth and just send the video

* add some comments, and dump filename and AVFormatContext on failure to write header

* add the toggle for RecordAudio so that the checkbox works to turn off Audio

* Must init videoStore in constuctor

* more debug and comments, return checking

* Fix dropped part of sql query.

* fix extra else and some whitespace

* Fix missing } from merge that was preventing building.

* fix tabs

* get rid of use of separator, just use \n

* Restore lost fixes for deprecation

* Why are these failing

* Respect record_audio flag when setting up video file so dont try and initiliase mp4 with unsupported audio

* Forgot that I was trying to solve case of stream is true and record_audio
is false.

* Pass swscale_ctx back in to getCachedContext or it will create new
context every frame and leak memory like a mofo.

* Add libx264-dev and libmp4v2-dev to build requires to save hassle of
ensuring they are installed before build.

* Merge my Rotation/Orientation work and fixes for bad h264 streams

* need arpa/inet for reverse lookups

* pull in the new byte range code for viewing videos

* Move our recording flag deeper into closeevent

* add braces and only call closeEvent if there is an event

* deprecate the z_frame_rate stuff which is deprecated in ffmpeg

* remark out some debugging

* fix for video on stream 1

* fix audio_stream to audio_st

* Ignore bad decodes

* fix problems with content-length causing viewing to not work in chrome/android

* change logic of sending file contents to handle an off by one and be more readable

* Some fixes pointed out by Maxim Romanov.  Also simply the loading of events to not join the Monitors table

* fix to sql for timeline

* added RecordAudio to sql in README

* Use sub queries instead of joins to fix errors when using new mysql defaults.

* fix sql queries

* Dockerfile to build feature-h264-videostorage

* Must cast codec

* add php-acpu as a dependency

* require php5-acpu

* fix typo

* remove extra /

* Add a line for out-of-tree builds to do api/lib/Cake/bootstrap.php

* delete merge conflict files

* delete merge conflict files
2017-05-15 22:02:48 -04:00
Andy Bauer 254fcbcef7 update gpl 2 mailing address in source files 2016-12-26 09:23:16 -06:00
Isaac Connor 3f713df826 bump libavutil version check as per @SteveGilvarry 2016-08-09 13:14:10 -04:00
Isaac Connor 177c2c741b Fixes #1584. I've just copied the relevant functions from ffmpeg source. Please review carefully before merging. 2016-08-07 10:55:19 -04:00
Steve Gilvarry e73935a15b Clean up extraneous avutil include 2016-04-29 21:29:07 +10:00
Steve Gilvarry 8452c4bce5 Fix tab to spaces merge issues 2016-04-29 21:27:28 +10:00
Isaac Connor 03b1ced568 tabs to spaces and use 2space indenting 2016-04-04 10:11:48 -04:00
SteveGilvarry 2122d6e443 Fix all the av_picture related deprecations 2016-03-03 01:03:55 +11:00
SteveGilvarry bc5ef6c599 Handle PixelFormat to AVPixelFormat change using _AVPIXELFORMAT and version
check to define correctly. Also at same time define all AV_PIX_FMT_* to
PIX_FMT_*
2015-11-04 12:46:26 +11:00
Dmitry Smirnov 0ff7a4e616 Replace deprecated FFmpeg API
Fixes FTBFS with ffmpeg-2.9; compatible with ffmpeg-2.8.

Author: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803850
2015-11-03 11:58:23 +11:00
Emmanuel Papin 818a5256e4 Readd checking of micro version in zm_mpeg.cpp to fix compilation issue 2015-05-29 19:23:00 +02:00
Emmanuel Papin f6d69e02b5 Mention original source for check functions 2015-05-29 17:45:35 +02:00
Emmanuel Papin a36b4aa65d Implement version check for ffmpeg and libav (address issue #580) 2015-05-29 17:38:02 +02:00
Isaac Connor 2a71973307 make zm compile using libav on ubunut 14.04 2014-10-15 13:23:29 -04:00
Andrew Bauer 9ef9b17c6b fixes ftbs with no ffmpeg support 2014-10-11 17:14:09 -05:00
Andy Bauer 549360cabd Merge branch 'zms/videostream-improvements' of https://github.com/Sune1337/ZoneMinder into Sune1337-zms/videostream-improvements
Conflicts:
	src/zm_ffmpeg.h
	src/zm_mpeg.cpp
2014-10-11 15:38:38 -05:00
Sune1337 04b8ecf0a7 Support streaming with zms (using ffmpeg) better
* ZoneMinder compiles with ffmpeg 0.5..master
    * Make VideoStream class able to stream through ffmpeg better.
    * Ability to use fixed quality instead of fixed bitrate (by specifying bitrate 0...100)
    * Format url parameter supports <format>/<encoder> syntax

Details:
    - Redefine av_err2str to a to avoid compiler warning on newer g++'s
    - When using rtp format; if ffmpeg does not have a default codec, use CODEC_ID_MPEG4. (because this is what the default is as of 2.2 when this code was written)
    - Specify ofc->packet_size if rtp format is requested
    - Video generated in a thread to guarantee a constant fps.
    - Move _AVCODECID definition into zm_ffmpeg.h (and use instead of (AV)CodecID
    - Call avformat_network_init because ffmpeg warns about it beeing required soon.
    - increase VideoStream::video_outbuf_size to 4MiB to be able to encode larger pictures
2014-04-25 22:12:58 +02:00
Anton Khirnov 296aa2517b Support building with new libavcodec versions.
CODEC_ID_* has been replaced with AV_CODEC_ID_* upstream.
2014-02-06 08:39:47 +01:00
Kfir Itzhak d50169c383 Added SWScale wrapper class and FFMPEG PixelFormat match function 2013-11-26 16:34:26 +02:00
Kfir Itzhak 421d67e379 Improvements to zm_ffmpeg.h 2013-10-10 07:16:11 +03:00
POKKAHOH b0a014928e remove #else errors for avutils/ffmpeg 2013-10-01 16:05:49 +04:00
POKKAHOH 33b6e5cd03 Now can recive RTSP stream.
Decode fragmented NAL
Understand sprop-parametr-sets
Don't check unsetted video format (zm_remote_camera_rtsp.cpp)
2013-09-27 15:08:11 +04:00
Isaac Connor cdac403fb1 Merge ../zum into develop
Conflicts:
	AUTHORS
	configure.ac
	db/zm_create.sql.in
	scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
	scripts/zmupdate.pl.in
	src/Makefile.am
	src/zm_buffer.cpp
	src/zm_config_defines.h
	src/zm_event.cpp
	src/zm_ffmpeg.h
	src/zm_ffmpeg_camera.cpp
	src/zm_image.cpp
	src/zm_jpeg.h
	src/zm_local_camera.cpp
	src/zm_logger.cpp
	src/zm_mem_utils.h
	src/zm_monitor.cpp
	src/zm_monitor.h
	src/zm_mpeg.cpp
	src/zm_remote_camera_http.cpp
	src/zm_remote_camera_rtsp.cpp
	src/zm_rtsp.cpp
	src/zm_sdp.cpp
	src/zm_sdp.h
	src/zm_stream.cpp
	src/zm_thread.cpp
	src/zm_thread.h
	src/zm_threaddata.cpp
	src/zm_user.cpp
	src/zm_user.h
	src/zm_utils.cpp
	src/zm_zone.cpp
	src/zm_zone.h
	web/includes/actions.php
	web/lang/big5_big5.php
	web/lang/cn_zh.php
	web/lang/cs_cz.php
	web/lang/de_de.php
	web/lang/dk_dk.php
	web/lang/en_gb.php
	web/lang/es_ar.php
	web/lang/et_ee.php
	web/lang/fr_fr.php
	web/lang/he_il.php
	web/lang/hu_hu.php
	web/lang/it_it.php
	web/lang/ja_jp.php
	web/lang/nl_nl.php
	web/lang/pl_pl.php
	web/lang/pt_br.php
	web/lang/ro_ro.php
	web/lang/ru_ru.php
	web/lang/se_se.php
	web/skins/classic/js/skin.js
	web/skins/classic/views/js/monitor.js.php
	web/skins/classic/views/monitor.php
	web/skins/classic/views/zone.php
2013-07-25 11:49:55 -04:00
nextime 8bf1824159 Ok, this time it will work? 2013-04-27 02:17:11 +02:00
nextime 7cb43d0efc Fix a wrong macro.. 2013-04-27 01:10:51 +02:00
nextime 6af58aca09 Fix CodecID changes in recent libav libraries 2013-04-27 00:59:34 +02:00
nextime 33cbd89212 Migrate svn to git 2013-03-17 00:45:21 +01:00
Kfir Itzhak 2dfdc8129c Few small fixes:
1) Added a workaround against SWS_CPU_CAPS_SSE2 not being defined.
2) Fixed enableDisableAlarms javascript error.
3) swscale unsupported format errors now include the unsupported format in the error.
4) Fixed a small error affecting local cameras with rotation enabled.
2012-03-07 14:33:09 +02:00
stan 02831ddcb1 Removed support for old locations of ffmpeg headers
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3468 e3e1d417-86f3-4887-817a-d78f3d33393f
2011-06-24 16:05:06 +00:00
stan e6041e24a7 Uppdated copyright headers
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2611 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-25 09:33:23 +00:00
stan f6a029bc4d Updated properties
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2608 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-25 09:08:15 +00:00
stan 4012faddb6 Very dodgy stuff for different types of compiler linkage.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2607 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-25 09:00:23 +00:00
stan 4c2c4199ca Fixed to compile with recent ffmpeg
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2601 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-24 16:57:39 +00:00
stan 8d503408f8 Fixe dproblem with detection of FFMPEG header locations
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2597 e3e1d417-86f3-4887-817a-d78f3d33393f
2008-07-24 11:30:18 +00:00
stan aa26ab7b18 git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2532 e3e1d417-86f3-4887-817a-d78f3d33393f 2008-07-16 08:35:59 +00:00