Therefore, you have to correct the PTS during the trimming procedure. If you cut or trim a video starting after the first frame, the first frame in the output video contains a value of non 0. The first frame contains the value 0 (under standard conditions). If they are not specified, ffmpeg uses default values (about medium quality).Įvery frame in a video (full frame like mjpeg, K-frame or B-frame) contains a PTS (presentation time stamp) that determines the position of this specific frame in the video line. The quality of the output video depends on the parameters you are using during re-encoding. It has to be re-encoded to get a clean output video. Therefore, a video with a H.264 codec cannot be cut at any position without having black frames. However, it contains K-frames, having a full image and B-frames in between, not containing a full image. This common codec can be replayed by most of all video players. In your case, the video format (or better named codec) is H.264 in a mp4 container. However, some video programs (like windows media player) cannot replay these formats (codecs), if not an appropriate codec is installed separately. Cutting the video is simple due to the existence of a full images in every frames. The uncompressed format can be stored as mkv or avi container (the mp4 container always uses compressed images)Īll these formats have a full image stored in each single video frame that is perfect in doing video observation and editing frame by frame. The compressed format can be stored as mp4, mkv or avi container. This can be mjpeg or rawvideo, whereby all compressed formats are using the mjpeg codec. ![]() The native video format Kinovea uses is a format (codec) that contains a full image for every frame. > ffmpeg -i unCut.MP4 -ss 00:00:18.440 -to 00:00:20.440 cut.MP4Ģ) Cut video while making every frame a keyframe (seems to reduce quality) I don't think any of those listed in the FAQ (/help/en/002.html) are lossless, correct?ġ) Cut video unCut.MP4 from 18.44s to 20.44s (video is 100 Hz and times where manually picked in Kinovea (toe off in my case) ![]() But I have no idea which can be read by Kinovea. I understand, that this is not an ffmpeg forum, but since Kinovea uses it internally, maybe the developers have some insight here?ģ) Perhaps I could resolve the quality issue by exporting in ffmpeg to a lossless format. I would have thought, that only file size and playback performance would worsen. I'm not sure why this is, but I'm new to video editing/encoding. VLC can still play it).Ģ) If I convert the video in ffmpeg to turn all frames into keyframes, the quality drops (in/output is MP4 and I'm not recording). Seems like Kinovea is using it as a building block, too.ġ) If I happen to cut to a position which is not a keyframe (aka i-frame), Kinovea can not load the video anymore (screen appears black, yet e.g. ![]() So far ffmpeg () seems to be my best shot. That is, I have a Excel/csv file with video filenames and start/stop frames manually established through Kinovea. I'm trying to programmatically cut videos before using them in Kinovea.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |