VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Hello everyone, New member here.
    I am seeking advice on a video editing platform.
    A little back story, I record in-game battles for a gaming community, and would like to be able to take a video, (or multiple videos) and then cut certain scenes out, and join them to make 1 video.
    I'm a hair on the technologically impaired side
    Thanks
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Since No one has answered yet, I'll say that I prefer the Command line program FFMpeg. The latest version cuts to frame accuracy and usually adjust DTS/PTS to start at 0.00000 without encoding. Nice Improvement. Since, I assume, you use the same program to record your game action, they are probably the same format, bit rate, frame rate, etc. So you should have no problems cutting or joining without re-encoding.
    Quote Quote  
  3. Hey Budman1, the latest ffmpeg cuts to frame accuracy and not the nearest keyframe? Everyone has been waiting for this! Do you have a link that explains this?
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Yes and No.. I do not have anything posted anywhere except for my beta program I use all the time and its documentation to date. That being said, there are certain items to note that are always true.
    1. You can not COPY and start a video on a 'B' frame and expect it to start in sync since the 'B' Frame has no reference point to look at ahead of it to. Needs Re-encoding.
    2. You can end on a 'B' frame and, for all intents it will probably play ok unless you join another clip behind it. There will be a VERY noticeable glitch at that point.
    3. Most programs (Free at least) cut to the nearest 'I' frame but at the minimum, a segment must end in a 'P' frame since it does not have to look at the frame following.

    The FFmpeg I am referring to usually makes the cut segment start at 0.000000 PTS and end in a 'P' frame even if it has co change BBBPBBBPBBBP to BBBPBBP. Therefore there is usually no problem joining to other videos of the same format or cut from the same video.

    NOw the bad news... Since I have written a program to cut with accuracy, re-encoding and start point not an 'I' frame up to the next 'I' frame and then copy the rest, I have determined the developers of FFMpeg still needs a little work but I am unable to get past the point where it asks me to enter a project number and how many wings a bird has.

    It is VERY important where you use -ss, -t, -to and -vframes as input ir output filters. I have listed below 6 variations of copied segments and the resulting number of frames and types. You should notice that using the best methods, FFmpeg will end at the nearest 'P' frame or create a 'P' frame from a 'B' frame.

    29.97 fps, GOP 250, special MP4
    54 1.801802 0 P
    55 1.835169 0 B
    56 1.868535 0 B
    57 1.901902 0 B
    58 1.935269 0 P
    59 1.968635 0 B
    60 2.002002 0 B
    61 2.035369 0 B
    62 2.068735 0 P

    ffmpeg -ss 0.000000 -i C:\Users\Bud\Desktop\cgop.mp4 -t 2.002002 -c copy test.mp4
    54 1.801802 0 P
    55 1.835169 0 B
    56 1.868535 0 B
    57 1.901902 0 B
    58 1.935269 0 P
    59 1.968635 0 B
    60 2.002002 0 B
    61 2.068735 0 P
    60 2.002002 0 B
    61 2.068735 0 P - 60 2.002002 0 B = 2 frames jump

    ffmpeg -ss 0.000000 -i C:\Users\Bud\Desktop\cgop.mp4 -to 2.002002 -c copy test2.mp4
    54 1.801802 0 P
    55 1.835169 0 B
    56 1.868535 0 B
    57 1.901902 0 B
    58 1.935269 0 P
    59 1.968635 0 B
    60 2.002002 0 B
    61 2.068735 0 P
    61 2.068735 0 P - 60 2.002002 0 B = 2 frames jump

    ffmpeg -i C:\Users\Bud\Desktop\cgop.mp4 -ss 0.000000 -t 2.002002 -c copy test3.mp4
    unplayable 2.021 seconds by windows

    fmpeg -i C:\Users\Bud\Desktop\cgop.mp4 -ss 0.000000 -to 2.002002 -c copy test4.mp4
    unplayable 2.021 seconds by windows

    ffmpeg -ss 0.000000 -i C:\Users\Bud\Desktop\cgop.mp4 -vframes 60 -c copy testv.mp4
    51 1.701702 0 B
    52 1.735068 0 B
    53 1.768435 0 B
    54 1.801802 0 P
    55 1.835169 0 B
    56 1.868535 0 B
    57 1.901902 0 B
    58 1.935269 0 P
    stops at nearest 'P' frame

    ffmpeg -i C:\Users\Bud\Desktop\cgop.mp4 -ss 0.000000 -vframes 60 -c copy testv2.mp4
    0 8.341008 1 I
    1 8.374374 0 B
    2 8.407741 0 B
    3 8.441108 0 B
    4 8.474474 0 P
    5 8.507841 0 B
    6 8.541208 0 B
    7 8.574575 0 B
    8 8.607941 0 P
    9 8.641308 0 B
    10 8.674675 0 B
    ~
    ~
    52 10.076076 0 B
    53 10.109443 0 B
    54 10.142809 0 B
    55 10.176176 0 P
    56 10.209543 0 B
    57 10.242910 0 B
    58 10.276276 0 B
    59 10.309643 0 P
    STARTS at next 'I' frame for 60 frames.

    The program below assumes there is Avisynth 2.60 installed and was created mainly to cut segments from various videos and make them the same if necessary with or without freeze frame adding subtitles and or fade in/out subtitles or any combination. If necessary it re-encodes any beginning segment up to the next I frame. FFMpeg has a nasty habit of overshooting or under shooting the expected number of frames. It now cuts at a 'P' or at the nearest 'P' frame before the cut designation point and notifies you of this.

    Documentation for this can be found at help documents https://files.secureserver.net/0sIgGfphpC5MOy

    I have posted a very beta version but have not tested a download and run test yet. Since my computer knows where all my files reside, I have to make sure I did not hardcode the location of work files. The documentation shows most screen shot and explanation of them.
    Last edited by Budman1; 13th Jun 2020 at 16:56.
    Quote Quote  



Similar Threads