I want to cut lengthy segments of a video file and then join them. But without re encoding precise cutting isn't possible as ffmpeg seeks to the key frame before my listed time stamp and cuts from that key frame or in some cases cuts from that key frame and use some kind of table to play video as intended. When I join such cut segments the joined file shows those unwanted sections due to some inability of concat fun i guess. this is how I am trying to concat those segments:
ffmpeg -f concat -i Cam01.txt -c copy Cam01.mp4
To solve this problem with lesser re encoding I thought to cut the video in two parts; first cut without re encoding from start to just before that key frame which will be faster and then in the second part cut with re encoding from that key frame to my desired frame, which will be few seconds and then join those two parts to have my segment.
Now I have two questions:
1: how can I get time stamp of a key frame before any time stamp?
2: Is there any problem in how i am joining segments so that in some cases it shows those unwanted parts in my joined file?
Or some way I could get time stamps of key frames in an entered range of time if getting to a key frame before any time stamp wont be possible.