cedricve
9d83cab5cc
Set mdhd.Duration to 0 for fragmented MP4
...
Uncomment and explicitly set mdhd.Duration = 0 in machinery/src/video/mp4.go for relevant tracks (video H264/H265 and audio track). This ensures mdhd.Duration is zero for fragmented MP4 so players derive duration from fragments (avoiding QuickTime adding fragment durations and doubling the reported duration).
2026-02-13 21:46:32 +01:00
cedricve
6f559c2f00
Align MP4 headers to fragment durations
...
Compute actual video duration from SegmentDurations and ensure container headers reflect fragment durations. Set mvhd.Duration and mvex/mehd.FragmentDuration to the maximum of video (sum of segments) and audio durations so the overall mvhd matches the longest track. Use the summed segment duration for track tkhd.Duration and keep mdhd.Duration at 0 for fragmented MP4s (to avoid double-counting). Add a warning log when accumulated video duration differs from the recorded VideoTotalDuration. Harden fingerprint generation and private key handling with nil checks.
Add mp4_duration_test.go: unit test that creates a simulated H.264 fragmented MP4 (150 frames at 40ms), closes it, parses the output and verifies that mvhd/mehd and trun sample durations are consistent and that mdhd.Duration is zero.
2026-02-13 21:35:57 +01:00
cedricve
c147944f5a
Convert MP4 timestamps to Mac HFS epoch
...
Add MacEpochOffset constant and convert mp4.StartTime to Mac HFS time for QuickTime compatibility. Compute macTime = mp4.StartTime + MacEpochOffset and use it for mvhd CreationTime/ModificationTime, as well as track tkhd and mdhd creation/modification timestamps for video and audio tracks. Also set mvhd Rate, Volume and NextTrackID. These changes ensure generated MP4s use QuickTime-compatible epoch and include proper mvhd metadata.
2026-02-13 21:01:45 +01:00
Cédric Verstraeten
e8ca776e4e
Merge pull request #236 from kerberos-io/fix/debugging-lost-keyframes
...
fix/debugging-lost-keyframes
v3.6.5
2026-02-11 16:51:07 +01:00
Cédric Verstraeten
de5c4b6e0a
Merge branch 'master' into fix/debugging-lost-keyframes
2026-02-11 16:48:08 +01:00
Cédric Verstraeten
9ba64de090
add additional logging
2026-02-11 16:48:01 +01:00
Cédric Verstraeten
7ceeebe76e
Merge pull request #235 from kerberos-io/fix/debugging-lost-keyframes
...
fix/debugging-lost-keyframes
v3.6.4
2026-02-11 16:15:57 +01:00
Cédric Verstraeten
bd7dbcfcf2
Enhance FPS tracking and logging for keyframes in gortsplib and mp4 modules
2026-02-11 15:11:52 +00:00
Cédric Verstraeten
8c7a46e3ae
Merge pull request #234 from kerberos-io/fix/fps-gop-size
...
fix/fps-gop-size
v3.6.3
2026-02-11 15:05:31 +01:00
Cédric Verstraeten
57ccfaabf5
Merge branch 'fix/fps-gop-size' of github.com:kerberos-io/agent into fix/fps-gop-size
2026-02-11 14:59:34 +01:00
Cédric Verstraeten and Copilot
4a9cb51e95
Update machinery/src/capture/gortsplib.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-11 14:59:15 +01:00
Cédric Verstraeten
ab6f621e76
Merge branch 'fix/fps-gop-size' of github.com:kerberos-io/agent into fix/fps-gop-size
2026-02-11 14:58:44 +01:00
Cédric Verstraeten
c365ae5af2
Ensure thread-safe closure of peer connections in InitializeWebRTCConnection
2026-02-11 13:58:29 +00:00
Cédric Verstraeten and Copilot
b05c3d1baa
Update machinery/src/capture/gortsplib.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-11 14:52:40 +01:00
Cédric Verstraeten
c7c7203fad
Merge branch 'master' into fix/fps-gop-size
2026-02-11 14:48:05 +01:00
Cédric Verstraeten
d93f85b4f3
Refactor FPS calculation to use per-stream trackers for improved accuracy
2026-02-11 13:45:07 +00:00
Cédric Verstraeten
031212b98c
Merge pull request #232 from kerberos-io/fix/fps-gop-size
...
fix/fps-gop-size
2026-02-11 14:27:18 +01:00
Cédric Verstraeten
a4837b3cb3
Implement PTS-based FPS calculation and GOP size adjustments
2026-02-11 13:14:29 +00:00
Cédric Verstraeten
77629ac9b8
Merge pull request #231 from kerberos-io/feature/improve-keyframe-interval
...
feature/improve-keyframe-interval
v3.6.2
2026-02-11 12:28:33 +01:00
cedricve
59608394af
Use Warning instead of Warn in mp4.go
...
Replace call to log.Log.Warn with log.Log.Warning in MP4.flushPendingVideoSample to match the logger API. This is a non-functional change that preserves the original message and behavior while using the correct logging method name.
2026-02-11 12:26:18 +01:00
cedricve
9dfcaa466f
Refactor video sample flushing logic into a dedicated function
2026-02-11 11:48:15 +01:00
cedricve
88442e4525
Add pending video sample to segment before flush
...
Before flushing a segment when mp4.Start is true, add any pending VideoFullSample for the current video track to the current fragment. The change computes and updates LastVideoSampleDTS and VideoTotalDuration, adjusts the sample DecodeTime and Dur, calls AddFullSampleToTrack, logs errors, and clears VideoFullSample so the pending sample is included in the segment before starting a new one. This ensures segments contain all frames up to (but not including) the keyframe that triggered the flush.
2026-02-11 11:38:51 +01:00
Cédric Verstraeten
891ae2e5d5
Merge pull request #230 from kerberos-io/feature/improve-video-format
...
feature/improve-video-format
v3.6.1
2026-02-10 17:25:23 +01:00
Cédric Verstraeten and Copilot
32b471f570
Update machinery/src/video/mp4.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-10 17:20:40 +01:00
Cédric Verstraeten and Copilot
5d745fc989
Update machinery/src/video/mp4.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-10 17:20:29 +01:00
Cédric Verstraeten and Copilot
edfa6ec4c6
Update machinery/src/video/mp4.go
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-10 17:20:16 +01:00
Cédric Verstraeten
0c460efea6
Refactor PR description workflow to include organization variable and correct pull request URL format
2026-02-10 16:17:10 +00:00
Cédric Verstraeten
96df049e59
Enhance MP4 initialization by adding max recording duration parameter, improving placeholder size calculation for segments.
2026-02-10 15:59:59 +00:00
Cédric Verstraeten
2cb454e618
Merge branch 'master' into feature/improve-video-format
2026-02-10 16:57:47 +01:00
Cédric Verstraeten
7f2ebb655e
Fix sidx.FirstOffset calculation and re-encode init segment for accurate MP4 structure
2026-02-10 15:56:10 +00:00
Cédric Verstraeten
63857fb5cc
Merge pull request #229 from kerberos-io/feature/improve-video-format
...
feature/improve-video-format
2026-02-10 16:53:34 +01:00
Cédric Verstraeten
f4c75f9aa9
Add environment variables for PR number and project name in workflow
2026-02-10 15:31:37 +00:00
Cédric Verstraeten
c3936dc884
Enhance MP4 segment handling by adding segment durations and base decode times, improving fragment management and data integrity
2026-02-10 14:47:47 +00:00
Cédric Verstraeten
2868ddc499
Add fragment duration handling and improve MP4 segment management
2026-02-10 13:52:58 +00:00
Cédric Verstraeten
176610a694
Update mp4.go
2026-02-10 13:39:55 +01:00
Cédric Verstraeten
f60aff4fd6
Enhance MP4 closing process by adding final video and audio samples, ensuring data integrity and updating track metadata
2026-02-10 12:45:46 +01:00
Cédric Verstraeten
847f62303a
Merge pull request #228 from kerberos-io/feature/improve-webrtc-tracing
...
feature/improve-webrtc-tracing
v3.6.0
2026-01-23 15:22:45 +01:00
Cédric Verstraeten
f174e2697e
Enhance WebRTC handling with connection management and error logging improvements
2026-01-23 14:16:55 +00:00
Cédric Verstraeten
acac2d5d42
Refactor main function to improve code structure and readability
2026-01-23 13:48:24 +00:00
Cédric Verstraeten
f304c2ed3e
Merge pull request #219 from kerberos-io/fix/release-process
...
fix/release-process
2025-09-17 16:32:58 +02:00
cedricve
2003a38cdc
Add release creation workflow with multi-arch Docker builds and artifact handling
2025-09-17 14:32:06 +00:00
Cédric Verstraeten
a67c5a1f39
Merge pull request #216 from kerberos-io/feature/upgrade-build-process-avoid-base
...
feature/upgrade-build-process-avoid-base
v3.5.6
2025-09-11 16:22:53 +02:00
Cédric Verstraeten
b7a87f95e5
Update Docker workflow to use Ubuntu 24.04 and simplify build steps for multi-arch images
2025-09-11 15:00:37 +02:00
Cédric Verstraeten
0aa0b8ad8f
Refactor build steps in PR workflow to streamline Docker operations and improve artifact handling
2025-09-11 14:09:22 +02:00
Cédric Verstraeten
2bff868de6
Update upload artifact action to v4 in PR build workflow
2025-09-11 13:45:34 +02:00
Cédric Verstraeten
8b59828126
Add steps to strip binary and upload artifact in PR build workflow
2025-09-11 13:39:27 +02:00
Cédric Verstraeten
f55e25db07
Remove Golang build steps from Dockerfiles for amd64 and arm64
2025-09-11 10:29:05 +02:00
Cédric Verstraeten
243c969666
Add missing go version check in Dockerfile build step
2025-09-11 10:26:54 +02:00
Cédric Verstraeten
ec7f2e0303
Update ARM64 build step to specify Dockerfile for architecture
2025-09-11 10:18:19 +02:00
Cédric Verstraeten
a4a032d994
Update GitHub Actions workflow and Dockerfiles for architecture support and dependency management
2025-09-11 10:17:51 +02:00