playback issue ref #3045 #3068
Replies: 1 comment
-
Just use the new "standard mp4" format of the playback server, that will generate files with a broader compatibility: https://github.com/bluenviron/mediamtx?tab=readme-ov-file#playback-recorded-streams |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
[#3045 ]As Taps7734 said to run all the recorded MP4 files through ffmpeg and it seems to fix the videos. I have tried
to execute the bash script after every record segment:
runOnRecordSegmentComplete: |
export MTX_SEGMENT_PATH="$MTX_SEGMENT_PATH"
export MTX_PATH="$MTX_PATH"
./process_segment.sh
inside the script
#!/bin/bash
#Extract environment variables
MTX_SEGMENT_PATH="$MTX_SEGMENT_PATH"
MTX_PATH="$MTX_PATH"
#Move the segment file one level above
mv "$MTX_SEGMENT_PATH" "$(dirname "$MTX_SEGMENT_PATH")/$(basename "$MTX_SEGMENT_PATH")"
#Set the new path for the segment file
NEW_SEGMENT_PATH="$(dirname "$MTX_SEGMENT_PATH")/$(basename "$MTX_SEGMENT_PATH")"
#Run ffmpeg to copy the segment file to the mtx_path
ffmpeg -i "$NEW_SEGMENT_PATH" -c copy "$MTX_PATH/$(basename "$MTX_SEGMENT_PATH")"
Beta Was this translation helpful? Give feedback.
All reactions