![]() I can do it like that with the original cut points but then the video is re-rendered even though all cuts come from the same video file. So there are that many position,length time pairs for each.īut I have also found out that there is no good way to run the cut extraction and concat in a single ffmpeg command using exact cut points. Well, I need to script it on Linux (Ubuntu 20.04 LTS server) so a GUI style program will not really work.Įach video file I process has about 6-8 sections to extract and concat. The program will show you the exact cut point. Load your file, click main, click cut, insert your desired start point and click Key Frames. I hope you can use this information is of use. ![]() Ths can be checked by omitting the -skip_frame nokey and you will get all the frames information for 1000 frames: The best method is to cut at the 'P' frame just before the next 'I' frame. One thing I might point out that I have found and use during cut/paste is that Cutting with ffmpeg will arbitrarily change the last pts time to sometimes twice the duration if the last frame of the sequence is a 'B' frame or not a true 'P' frame. You will get a list of all frames in a spreadsheet format:Ġ.000000 and 10.000000 = pts OR KEY FRAME TIME (POSSIBLE CUT TIME before and after 9 seconds) You can shorten it to 251 so you include only the preceding and the following if you wish. ![]() The reason i use 1000 is the maximum normal GOP distance between key frames in an AVS (Most common) encoding is 250 so this gives you the preceding key frame and 3 after. Since the key frames on my test video was 0,10,20,30 it will show the preceding key frame and 1000 frames after. read_intervals 9.000000% #1000 = read intervals from 9 seconds until a 1000 frames after. show_entries frame=pkt_pts,pkt_pts_time,pict_type,key_frame = show only key frame indicator, the actual pts of that frame, the frame type and a time packet pts time. skip_frame nokey = skip all frames that are not key frames print_format csv = output as a csv speadsheet (it is also a text file separated by ',') The format for this, if you are not familiar is: Code: C:\UsersFull path to\ffprobe.exe -i "C:\Full path to\video.mp4" -select_streams v:0 -print_format csv -skip_frame nokey -show_entries frame=pkt_pts,pkt_pts_time,pict_type,key_frame -read_intervals 9.000000% #1000 > "C:\full path to\ffprobe.csv" COMMAND LINE USES 1 '%', FOR CUT TIME, BATCH FILE USES 2
0 Comments
Leave a Reply. |