Isaac Connor
7575afc8d5
Merge branch 'master' into zma_to_thread
2020-07-21 17:38:32 -04:00
Isaac Connor
4ff341a0f5
Merge branch 'master' into zma_to_thread
2020-05-02 18:03:42 -04:00
Pliable Pixels
ff7defa84e
re-enable fragmented mp4 recordings
2020-03-13 14:46:20 -04:00
Isaac Connor
09fcbad666
Merge branch 'master' into zma_to_thread
2019-11-30 14:59:39 -05:00
Isaac Connor
50986ce3b4
Merge branch 'zma_to_thread' of github.com:ConnorTechnology/ZoneMinder into zma_to_thread
2019-11-30 13:53:05 -05:00
Isaac Connor
fdf5150a16
fix build on jessie
2019-11-13 13:51:22 -05:00
Isaac Connor
35ae81d985
dynamically allocate next_dts and use it in write_packet to store the next dts value. write_interleaved_packet destroys the passed in packet so we need to store next_dts before writing out the packet.
2019-10-23 09:25:16 -04:00
Isaac Connor
76fd32b427
more debug, and ensure that pts != AV_NOPTS_VALUE
2019-10-22 10:01:24 -04:00
Isaac Connor
dfe2f55ebe
More debugging to figure out #2720
2019-10-20 13:50:24 -04:00
Isaac Connor
d9d91c4a8d
Fix #2728 by resetting the frame size before reading from the fifo
2019-10-20 13:32:16 -04:00
Isaac Connor
21dd9b527d
when ipkt->pts is AV_NOPTS_VALUE should still set opkt.pts to AV_NOPTS_VALUE
2019-10-19 17:12:19 -04:00
Isaac Connor
17a7d02275
fix reversal of in_frame/out_frame in VideoStore destructor
2019-10-18 10:16:18 -04:00
Isaac Connor
f938fd83ac
keep track of video_next_dts. Use it when packet dts is AV_NOPTS_VALUE. Also handle EAGAIN in send_packet_get_frame etc
2019-10-16 09:01:59 -04:00
Isaac Connor
90d6e11fb9
If we try to write a packet with dts == AV_NOPTS_VALUE, set it to stream->cur_dts. This might at least give us a playable file.
2019-10-11 14:04:51 -04:00
Isaac Connor
e8e29d62b2
Use dts instead of pts for first values
2019-09-17 12:53:29 -04:00
Isaac Connor
0a31a8dab6
Just use pts instead of tracking both first pts and first dts. Should prevent conflicts
2019-09-15 17:53:25 -04:00
Isaac Connor
eafa0da06f
fixes, handle when audio codec isn't open in ffmpeg_camera
2019-09-13 16:06:25 -04: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
788b5b480b
hack to make sync work on resample
2019-09-12 17:59:08 -04:00
Isaac Connor
d9d4c6b4ca
fix build
2019-09-12 17:26:19 -04:00
Isaac Connor
0a8aba2b76
rework how pts/dts is handled. We still use video_first_pts, but if the result is negative, normalize it to 0. Also now use audio_next_pts/dts to calculate pts when resampling and re-encoding. I believe this resolves the issues with wrong duration in the audio stream.
2019-09-12 16:52:59 -04:00
Isaac Connor
097ce5e778
add const to cast
2019-09-09 17:09:01 -04:00
Isaac Connor
792af28c54
return a value from write_packet
2019-09-09 16:55:22 -04:00
Isaac Connor
d5aa95e45f
cpplint fixes
2019-09-09 16:13:32 -04:00
Isaac Connor
d5d4d9d19b
ret should be a heap var, not a member of the object. Somehow this also seems to fix crashing on debian buster. I assume the compiler is confused
2019-09-08 16:10:57 -04:00
Isaac Connor
bd3395ac98
introduce VideoStore::write_packet to refactor out duplicated code. Add the ability to receive multiple packets from audio encoder per input packet
2019-08-28 12:19:54 -04:00
Isaac Connor
39620c01ff
Add rescaling of pkt pts/dts from audio_out_ctx to audio_out_stream
2019-08-26 16:37:32 -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
2fe9442257
Fix time_base conversion when flushing audio queue. Add more debugging. COrrect pkt_Duration when resampling audio
2019-08-23 18:17:26 -04:00
Isaac Connor
396be10d6f
Merge branch 'master' into zma_to_thread
2019-08-22 12:57:00 -04:00
Isaac Connor
6a9464044b
Demote warnings about fixing non-monotonic dts to debug
2019-08-02 08:03:02 -04:00
Isaac Connor
1e0c39c632
mostly spacing cleanups. Don't bother setting pkt_duration on resampled frame
2019-07-19 16:28:18 -04:00
Isaac Connor
13c91bdf60
Add pts adjustment to the delayed flushed encoder packets
2019-07-11 17:56:53 -04:00
Isaac Connor
94cc85aa36
Sorta fix pts on encoded audio packets. Sync is off, but at least it is close
2019-07-07 08:57:22 -04:00
Isaac Connor
5ea5bd9bde
Only do audio_first_pts if we have audio_in_stream
2019-07-02 12:26:33 -04:00
Isaac Connor
4e8ac47060
Use the video_first_pts to set the audio_first_pts
2019-07-02 11:58:22 -04:00
Isaac Connor
dd57fd95ce
Clean up cruft from videostore api. Fix packetqueue clear_unwanted_packets to take a pre_event_count and take it into consideration when finding the right spot in the queue to start recording.
2019-06-27 11:11:14 -04:00
Isaac Connor
46f3aabc25
Merge branch 'hwdecode' into storageareas
2019-06-25 15:35:56 -04:00
Isaac Connor
86c4051c44
handle zm_receive_frame returning AVERROR instead of boolean
2019-06-25 15:34:36 -04:00
Isaac Connor
9a353d0b6d
don't set frame size
2019-06-24 11:44:21 -04:00
Isaac Connor
44e4d93445
Merge branch 'master' into storageareas
2019-06-24 11:35:36 -04:00
Isaac Connor
dab9544845
Revert audio sync fixes ( #2646 )
...
* Reference /run/zm instead of /var/run/zm because systemd-tmpfiles complains about it
* Spacing, google code style and tabs to spaces
* Revert the work I did to srt packets by dts after changing their time_base. It doesn't work. Instead since dts doesn't actually matter to playback, only ffmpeg storing, munge it to whatever is neccessary to make ffmpeg happy.
2019-06-24 11:27:47 -04:00
Isaac Connor
55d98e4a9f
fix crash
2019-06-20 15:56:25 -04:00
Isaac Connor
470da03322
Merge sync fixes from storageareas
2019-06-20 15:14:20 -04:00
Isaac Connor
4c8b8d0c16
Only check pts vs dts if pts isn't AV_NOPTS_VALUE. Also set frame_size in output codec when doing passthrough
2019-06-20 15:09:30 -04:00
Isaac Connor
16b035f76c
Use common first_dts/pts instead of separate video and audio first pts/dts
2019-06-19 09:22:21 -04:00
Isaac Connor
acb95709e6
Fix issues with too much audio in events by storing packets in the queue with their timestamps converted to AV_TIME_BASE_Q, so that we can sort video and audio packets together.
2019-06-11 10:19:42 -04:00
Isaac Connor
8b4fddadfb
out_frame->pts is calculated in resample_audio
2019-05-27 12:29:29 -04:00