Commit Graph

84 Commits

Author SHA1 Message Date
Isaac Connor 42abe5c917 include hwcontext in zm_ffmpeg.h so that it gets included where needed 2021-01-26 18:28:11 -05:00
Isaac Connor 430d64ba67 create fix_deprecated_pix_fmt function to adjust deprecated pixfmts 2021-01-15 17:01:59 -05:00
Isaac Connor 9740b635dd Fix missing comma 2021-01-11 13:46:50 -05:00
Isaac Connor 9cad82e916 include kleyframe status in zm_dump_video_frame 2021-01-11 13:46:50 -05:00
Isaac Connor a39a656373 Merge branch 'master' into zma_to_thread 2020-09-29 11:02:40 -04:00
Isaac Connor 610f73a835 Merge branch 'release-1.34' 2020-08-17 19:30:32 -04:00
Isaac Connor e5dda8d142 Include avutils/imgutils.h to support compile on libav-tools 2020-08-16 14:56:52 -04:00
Isaac Connor 869860bb26 Merge branch 'master' into zma_to_thread 2020-07-21 17:49:39 -04:00
Isaac Connor 7575afc8d5 Merge branch 'master' into zma_to_thread 2020-07-21 17:38:32 -04:00
Isaac Connor 9f73a55087 Make params to is_video_* a const because we don
't alter it
2020-05-07 13:39:32 -04:00
Isaac Connor c5cf6e1a74 undo random addition 2020-05-01 19:01:09 -04:00
Isaac Connor 050868fad1 fix build on libavtools < 12 2020-05-01 19:00:40 -04:00
Isaac Connor 11b1bf1100 undo random addition 2020-03-11 10:54:52 -04:00
Isaac Connor c90655d178 fix build on libavtools < 12 2020-03-11 10:54:35 -04:00
Isaac Connor 09fcbad666 Merge branch 'master' into zma_to_thread 2019-11-30 14:59:39 -05:00
Isaac Connor 3a5d1ff3ca Hack in missing bits for ubuntu trusty/libav/avresample 2019-09-13 15:51:35 -04:00
Isaac Connor 5ddd20ed1a refactor code. Handle resample buffering during encoding instead of when closing file 2019-09-13 14:34:53 -04:00
Isaac Connor 701aa8d924 add flushing the resample buffer to get the remaining samples encoded 2019-09-13 10:55:30 -04:00
Isaac Connor 8fb55cdbff Add codec name to zm_dump_codec and zm_dump_codecpar add new functions zm_receive_packet 2019-09-12 16:51:33 -04:00
Isaac Connor 8215fe1c0f Some versions off avcodec libs have pkt_pts and pkt_dts but they have been deprecated and weren't of any use anyways 2019-09-08 16:10:20 -04:00
Isaac Connor b26ed9bf62 Yet more debugging. Also, move pts adjustment to before audio encoding 2019-08-26 16:17:45 -04:00
Isaac Connor 396be10d6f Merge branch 'master' into zma_to_thread 2019-08-22 12:57:00 -04:00
Isaac Connor 0cdb43e165 make dump_video_frame a define instead of a function, fix linesize 2019-08-10 14:45:45 -04:00
Isaac Connor 288f2f3e8f Convert zm_dump_frame from a function to a define, this way we get line #'s from where we call zm_dump_frame instead of from the line in zm_ffmpeg where the function was. 2019-07-11 17:56:22 -04:00
Isaac Connor 0f35d86efb implement zm_send_frame which sends a frame and receives a packet 2019-07-07 08:56:39 -04:00
Isaac Connor 246b4cb9d1 working hwdecode 2019-06-24 17:22:59 -04:00
Isaac Connor aec8311deb implement sorting incoming packets in the packetqueue 2019-05-03 13:48:05 -04:00
Isaac Connor 077ad75516 Merge branch 'storageareas' into origin/zma_to_thread 2019-04-25 12:41:48 -04:00
Isaac Connor f78e95f5d4 add is_video_context and is_audio_context and use them in zm_revceive_frame to add audio decoding support 2019-04-03 13:21:52 -04:00
Isaac Connor c9985107ee Add a deinit function to handle avformat_network_deinit 2019-04-01 13:38:13 -04:00
Isaac Connor a9e2011727 Merge branch 'storageareas' into zma_to_thread 2019-02-13 12:24:38 -05: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 36f7e9abb1 Merge h265 and begin work on swsresample 2018-11-21 09:46:14 -05:00
Isaac Connor b16cd7ec84 Merge branch 'h265' into zma_to_thread 2018-11-20 12:38:17 -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 cd3046abb3 Merge branch 'storageareas' into zma_to_thread 2018-04-14 11:03:08 -04:00
Isaac Connor 18f0610d87 Merge zm_ffmpeg.cpp from zma_to_thread 2018-01-21 17:18:29 -05:00
Isaac Connor 0ea6fd9807 Merge branch 'storageareas' into zma_to_thread 2017-12-19 14:06:58 -05:00
Isaac Connor 887235c746 move dumpPacket to zm_ffmpeg 2017-12-19 09:59:04 -05:00
Isaac Connor 43b71fc49b rework 2017-11-20 15:32:40 -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