VideoHelp Forum
+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 46 of 46
Thread
  1. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Unfortunately , the last time I tried the segment option with any example that copies segments, ffmpeg again NEAR 0 timecode start as it explains in the ffmpeg docs. This is even worse if the video is not 25 fps. Ffmpeg seems to want to cut at some point other than where you want it or where you should. Recoding works well but since most people want to copy, problems arise when concat is used without recoding.

    Maybe I set it up wrong but I couldn't get start to begin at key frame with start pts of 0 .
    Quote Quote  
  2. Originally Posted by Selur View Post
    that's why I linked to the description of the function in the ffmpeg manual. (haven't used the option for years, but it should work,..)
    sorry i not programmer or video editor, the references you give to me, i dont know what is it, what before or after result is, i am really sorry
    Quote Quote  
  3. Originally Posted by Budman1 View Post
    Unfortunately , the last time I tried the segment option with any example that copies segments, ffmpeg again NEAR 0 timecode start as it explains in the ffmpeg docs. This is even worse if the video is not 25 fps. Ffmpeg seems to want to cut at some point other than where you want it or where you should. Recoding works well but since most people want to copy, problems arise when concat is used without recoding.

    Maybe I set it up wrong but I couldn't get start to begin at key frame with start pts of 0 .
    i not make you rush, but, any progress?
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Yes I have a batch file that I use for testing in which I enter the start timestamp (2 frames before I-frame) and the number of frames between scene changes. It produces a segment of correct size with audio to match and the first frame timestamp is 0 to make joining correct without errors.

    This is not automatic or fast. I am simultaneously coding A windows program that displays scene changes and allows you to select which ones to keep or discard. Again this is manual unless you want to automatically cut all scene change segments without skipping any. This could be done for batch and automatic.

    A couple quick questions... Do you want all files in a batch cut at all scene changes? Do you ever plan to join them together again ? Please understand that scene change detection is a matter of percentage of change from preceding frame so a slow pan head to toe may change so slowly the the change is very slight and might not be picked up.

    Also if you cut at all scene changes the resulting length of some could be only a few seconds long. If you can, let me know what your end purpose is. Thanks
    Budman1
    Quote Quote  
  5. Originally Posted by Budman1 View Post
    A couple quick questions... .Do you want all files in a batch cut at all scene changes? Do you ever plan to join them together again ? Please understand that scene change detection is a matter of percentage of change from preceding frame so a slow pan head to toe may change so slowly the the change is very slight and might not be picked up.

    Also if you cut at all scene changes the resulting length of some could be only a few seconds long. If you can, let me know what your end purpose is. Thanks
    Budman1
    i prefer join them together again if them belong to same story,
    something like this :
    total video 12 minutes,
    that video contain 3 story, let said : "A.red little riding hood", "B.3 pigs", "C.Goldilocks "
    every story contain average 4 scene ( 3 scene changing ),
    let say i like to safe story "B.3 pigs" and remove the rest,
    i will split all scene from 12 minutes video and combine only "B.3 pigs" parts and delete other parts.

    sorry if i ask too many.
    Quote Quote  
  6. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    No problem... Then it appears you would like all scene changes cut and you will view which ones to join. Do you have a joining program or do you still prefer ffmpeg, possibly as a separate function of the same program to separate?
    Quote Quote  
  7. Originally Posted by Budman1 View Post
    No problem... Then it appears you would like all scene changes cut and you will view which ones to join. Do you have a joining program or do you still prefer ffmpeg, possibly as a separate function of the same program to separate?
    for split i prefer 1 drag file CMD because you not require open many window GUI and do many setup things

    for joining, i prefer drag CMD too, but different batch file , if you drag first file then add second file, then they will be combine
    Quote Quote  
  8. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    The realities of your request are not the best method. A CMD batch could be used to cut at all Scene changes and merge them but this would be a bad idea.

    1. A video may have many scene changes, some a few seconds apart and some more. Lets say 50 for a video of moderate length. Anime may have many more.
    2. A video is cut/encoded by frames, mainly Key frames at Scene changes but they are usually at 25, 29.97 or 30 Frames a second so their duration are either .04, .033367 or .033333 seconds.
    3. Audio is cut at a sample rate of about 44100 or 48000 sample per second so their duration is 1/44100 (or 1/48000) = .000002267 seconds.

    You can see that cutting them is almost impossible to cut at the same point so usually audio is shorter, maybe just a few milliseconds. This may not hurt or be detectable for a single cut but merging many (50?) and the milliseconds add up. It is much easier to cut an entire chunk of several scene changes that you wish to maintain consecutively.

    Also, with many scene changes you would have to view each video segment to see if you want them included and some several times if they are not to be added in order. This is possibly more work than setting up a GUI.

    The preliminary GUI I have done so far lets you see the first frame (if your codec is set that way) of each scene change and you can determine if that belongs to the 3 little pigs video or not. Then just check include or keep and it builds a string for a single cut.

    If you really wish to have ALL scene changes cut into many video files and I'll work on the batch file to do that or someone else may have a method also that works after you join those segments again . I already have one that cuts a drag and drop file although CMD is not a speedy program.

    Below is the preliminary GUI I have working up to a point. Double clicking a thumbnail image opens that image in your default image viewer and contains the time of the scene change frame. If anyone reads this and has suggestions or better information, please add comments.

    Image
    [Attachment 45885 - Click to enlarge]
    Quote Quote  
  9. Originally Posted by Budman1 View Post
    The realities of your request are not the best method. A CMD batch could be used to cut at all Scene changes and merge them but this would be a bad idea.

    1. A video may have many scene changes, some a few seconds apart and some more. Lets say 50 for a video of moderate length. Anime may have many more.
    2. A video is cut/encoded by frames, mainly Key frames at Scene changes but they are usually at 25, 29.97 or 30 Frames a second so their duration are either .04, .033367 or .033333 seconds.
    3. Audio is cut at a sample rate of about 44100 or 48000 sample per second so their duration is 1/44100 (or 1/48000) = .000002267 seconds.

    You can see that cutting them is almost impossible to cut at the same point so usually audio is shorter, maybe just a few milliseconds. This may not hurt or be detectable for a single cut but merging many (50?) and the milliseconds add up. It is much easier to cut an entire chunk of several scene changes that you wish to maintain consecutively.

    Also, with many scene changes you would have to view each video segment to see if you want them included and some several times if they are not to be added in order. This is possibly more work than setting up a GUI.

    The preliminary GUI I have done so far lets you see the first frame (if your codec is set that way) of each scene change and you can determine if that belongs to the 3 little pigs video or not. Then just check include or keep and it builds a string for a single cut.

    If you really wish to have ALL scene changes cut into many video files and I'll work on the batch file to do that or someone else may have a method also that works after you join those segments again . I already have one that cuts a drag and drop file although CMD is not a speedy program.

    Below is the preliminary GUI I have working up to a point. Double clicking a thumbnail image opens that image in your default image viewer and contains the time of the scene change frame. If anyone reads this and has suggestions or better information, please add comments.

    Image
    [Attachment 45885 - Click to enlarge]
    i dont understand video term,
    based your explanation it seem bad,
    so wise to me wait till your program finish
    Quote Quote  
  10. Originally Posted by Budman1 View Post
    The realities of your request are not the best method. A CMD batch could be used to cut at all Scene changes and merge them but this would be a bad idea.

    1. A video may have many scene changes, some a few seconds apart and some more. Lets say 50 for a video of moderate length. Anime may have many more.
    2. A video is cut/encoded by frames, mainly Key frames at Scene changes but they are usually at 25, 29.97 or 30 Frames a second so their duration are either .04, .033367 or .033333 seconds.
    3. Audio is cut at a sample rate of about 44100 or 48000 sample per second so their duration is 1/44100 (or 1/48000) = .000002267 seconds.

    You can see that cutting them is almost impossible to cut at the same point so usually audio is shorter, maybe just a few milliseconds. This may not hurt or be detectable for a single cut but merging many (50?) and the milliseconds add up. It is much easier to cut an entire chunk of several scene changes that you wish to maintain consecutively.

    Also, with many scene changes you would have to view each video segment to see if you want them included and some several times if they are not to be added in order. This is possibly more work than setting up a GUI.

    The preliminary GUI I have done so far lets you see the first frame (if your codec is set that way) of each scene change and you can determine if that belongs to the 3 little pigs video or not. Then just check include or keep and it builds a string for a single cut.

    If you really wish to have ALL scene changes cut into many video files and I'll work on the batch file to do that or someone else may have a method also that works after you join those segments again . I already have one that cuts a drag and drop file although CMD is not a speedy program.

    Below is the preliminary GUI I have working up to a point. Double clicking a thumbnail image opens that image in your default image viewer and contains the time of the scene change frame. If anyone reads this and has suggestions or better information, please add comments.

    Image
    [Attachment 45885 - Click to enlarge]
    sorry if I seem not patient, but any progress?
    Quote Quote  
  11. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Yes, I have a version I use for my own use as I perfect it. I can upload a version but it still has a ways to go. I have added features to try to handle the items I listed as problems above. It has a Manual mode in case your scene is not on a key frame or the scene is not found but you know approximately where it is. The scenes below are during actual use and I blanked some image because I sometimes use adult material, although not that bad, because they are absolutely the WORST in errors, play-ability, seek, mediainfo errors, etc. and they are easy to determine which frame is which. They have often been cut and merged unsuccessfully many time which makes for a good test subject if not subject material.

    Bad video example... This video has scene changes at non key frame locations and the rate is listed as 30 FPS by mediainfo,, .033000 by FFprobe and 29.98+ by the header information.
    Image
    [Attachment 46455 - Click to enlarge]

    Image
    [Attachment 46456 - Click to enlarge]

    Image
    [Attachment 46457 - Click to enlarge]


    This is shown by right clicking image and FFplay will start at other than what the image shows if you left click and view the first frame information.. This can all be corrected by using such as Manual and Check Frames, etc. Below is a sample of a corrected key frame scene change and the resulting play end of playing 327.127127 and viewing 335. 468802.

    The program is not s speed demon and it cannot determine good from bad video although it can correct manually for it. If you just want to trust that the scene changes are on I-frame boundaries then it will indeed cut them on I-frame boundaries because even if the scene shown is not a key frame, the program will cut at the preceding key frame and include you segment. If in the example beklow you tried to cut at 327.127127 and it was not a key frame, you would get 318.+ up to 335+, both key frames. Also it creates 2 videos in an attempt to make frame 0 of a segment timestamp 0.000000.. I have not set it to remove the frist video with the FFmpeg audi overhead that FFmpeg seems to like to leave.

    Image
    [Attachment 46458 - Click to enlarge]


    If you wish to try it, I can explain further and can upload a copy to test.


    Working view:
    Image
    [Attachment 46460 - Click to enlarge]
    Last edited by Budman1; 13th Aug 2018 at 00:33. Reason: add better view of layout
    Quote Quote  
  12. Originally Posted by Budman1 View Post
    Yes, I have a version I use for my own use as I perfect it. I can upload a version but it still has a ways to go. I have added features to try to handle the items I listed as problems above. It has a Manual mode in case your scene is not on a key frame or the scene is not found but you know approximately where it is. The scenes below are during actual use and I blanked some image because I sometimes use adult material, although not that bad, because they are absolutely the WORST in errors, play-ability, seek, mediainfo errors, etc. and they are easy to determine which frame is which. They have often been cut and merged unsuccessfully many time which makes for a good test subject if not subject material.

    Bad video example... This video has scene changes at non key frame locations and the rate is listed as 30 FPS by mediainfo,, .033000 by FFprobe and 29.98+ by the header information.
    Image
    [Attachment 46455 - Click to enlarge]

    Image
    [Attachment 46456 - Click to enlarge]

    Image
    [Attachment 46457 - Click to enlarge]


    This is shown by right clicking image and FFplay will start at other than what the image shows if you left click and view the first frame information.. This can all be corrected by using such as Manual and Check Frames, etc. Below is a sample of a corrected key frame scene change and the resulting play end of playing 327.127127 and viewing 335. 468802.

    The program is not s speed demon and it cannot determine good from bad video although it can correct manually for it. If you just want to trust that the scene changes are on I-frame boundaries then it will indeed cut them on I-frame boundaries because even if the scene shown is not a key frame, the program will cut at the preceding key frame and include you segment. If in the example beklow you tried to cut at 327.127127 and it was not a key frame, you would get 318.+ up to 335+, both key frames. Also it creates 2 videos in an attempt to make frame 0 of a segment timestamp 0.000000.. I have not set it to remove the frist video with the FFmpeg audi overhead that FFmpeg seems to like to leave.

    Image
    [Attachment 46458 - Click to enlarge]


    If you wish to try it, I can explain further and can upload a copy to test.


    Working view:
    Image
    [Attachment 46460 - Click to enlarge]
    based your software, i cant still figure what is what,
    can you make it like windows movie maker, then mark where scene changes, then select the parts where it is part of movie, and other parts is other movie,
    some thing like scene 1,2,3,4 is movie A, scene 5,6,7,8 is movie b, etc. then split it (it will be nice if you can add option delete original file)
    sorry if i ask too many
    Quote Quote  
  13. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Sure but Movie MAKER creates movies by joining images and videos of different sizes and formats and adds such things as transitions. This is dont with COMPLETE images and videos and uses a lot of Re-Encoding. Any free program can do most of this with no problem.

    What you asked for was a program that SPLITS on scene change and not to use RE-ENCODING, in other words copy. Videos are made up of 3 types of frames I (complete image), P (references differences only from preceding frame, and B (references differences from preceding AND following frame.)

    The following represents a typical 3 scene change sequence that will occur. Notice the 3rd scene change is a scene change but it is NOT on an I-Frame start. This means that if you actually cut it at point 'D', The B frame could no longer reference preceding 'B' frame since it would be cut off. I would play as junk until the next I(complete) frame.

    Image
    [Attachment 46469 - Click to enlarge]


    I can give you drag and drop and set up all the scene changes as below but how would you like to trim off the part of scene 2 that is already saved WITHOUT Re-encoding?

    Image
    [Attachment 46470 - Click to enlarge]


    If you notice Movie Maker has it '8' windows on the right, my program had '8' windows on 2 lines. Movie maker has a separate window to play, My program has its own viewer just by right clicking the image. MOvie maker you click remove if you don't want, My program you uncheck 'Keep' checkbox.

    Now, again any suggestions on how you salvage the third scene ONLY from point 'D' with the simpler interface shown above? Better yet what if the scene change is subtle and it misses some? I am open for suggestions
    Quote Quote  
  14. Originally Posted by Budman1 View Post
    Sure but Movie MAKER creates movies by joining images and videos of different sizes and formats and adds such things as transitions. This is dont with COMPLETE images and videos and uses a lot of Re-Encoding. Any free program can do most of this with no problem.

    What you asked for was a program that SPLITS on scene change and not to use RE-ENCODING, in other words copy. Videos are made up of 3 types of frames I (complete image), P (references differences only from preceding frame, and B (references differences from preceding AND following frame.)

    The following represents a typical 3 scene change sequence that will occur. Notice the 3rd scene change is a scene change but it is NOT on an I-Frame start. This means that if you actually cut it at point 'D', The B frame could no longer reference preceding 'B' frame since it would be cut off. I would play as junk until the next I(complete) frame.

    Image
    [Attachment 46469 - Click to enlarge]


    I can give you drag and drop and set up all the scene changes as below but how would you like to trim off the part of scene 2 that is already saved WITHOUT Re-encoding?

    Image
    [Attachment 46470 - Click to enlarge]


    If you notice Movie Maker has it '8' windows on the right, my program had '8' windows on 2 lines. Movie maker has a separate window to play, My program has its own viewer just by right clicking the image. MOvie maker you click remove if you don't want, My program you uncheck 'Keep' checkbox.

    Now, again any suggestions on how you salvage the third scene ONLY from point 'D' with the simpler interface shown above? Better yet what if the scene change is subtle and it misses some? I am open for suggestions
    i am sorry if my request seem to harsh,
    about the picture
    Image
    [Attachment 46469 - Click to enlarge]

    i like to "show all" the "scene changing point", at your picture i writes in A,B,C,D and E,
    then you manually remove the "point" and set as "ignore this point", if i set point B to ignore, the software will think A to C is one part,
    it will display using MS-EXCEL > "convert text to Column wizard" :
    (actually, i don't know how to insert images, i add it to attachment if you can see it)
    https://forum.videohelp.com/attachment.php?attachmentid=46471&stc=1&d=1534223331
    at that picture you can see what i talking about
    Image Attached Thumbnails Click image for larger version

Name:	Untitled.png
Views:	155
Size:	16.7 KB
ID:	46471  

    Quote Quote  
  15. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Okay just for clarification... I set the program to show ALL scene changes in a separate image window. Thats what the 8 images are. They are separate scenes all by themselves.

    In the image below you will see the circled items show the frame rate to be about 24 FPS (.041667 duration.), There are 6 pages of 8 scene changes (48 in all) shown at top right. The scene changes occur so fast that notice the circled 'NbrFrms' (Number of frames in the scene) is low at 86, 72, an 76. That's about 3 seconds each. (86/24FPS, 72/24FPS, 76/24FPS). My wishes for this video is to eliminate the opening (KEEP 1) so I unchecked it. This means the first scene change will not be saved (A to B so to speak). The next 3 scenes are all part of the same scene and I want to keep together as one video so I checked KEEP 2/3/4 boxes. Being contiguous they will be saved as one complete video.

    Keep 5 is also unchecked and will not be saved. KEEP 6/7/8 are checked and in a sequence so will be saved as the second video.

    If i had any questions which I want and which I do not, I right click the image and it will play only that segment (scene) with frame number and time overlayed. To add more or continue, I just click BIG RED ARROW in the upper right to go to page 2, 3, 4, etc. and select, view, or omit sequences. When everything is final, I click Build Segments and it creates the number of segments I set up.

    The boxes with information, extra button and CMD Windows are not necessary to use or worry about unless you understand enough and then they let you make advanced changes such as set manual start and stop of a scene segment and others. For instances the Scen Variance box is drop down to select 0.200000 thru 0.600000 which are typical values but if you are advanced and want other the value can be changed directly for greater or less(0.900000-0.0500000 for example)

    Other wise these can just be ignored but they are there to fix crazy videos with 100's of scenes changes or incorrect timings, etc. In this particular video, there is a total of 2953 frames but the entire video only runs for 123.1401 seconds. Thats a lot of very short segments and I hardly wanted 48 videos from a 2 minute one. By checking contiguous KEEP, I can save 2-3 which includes many of the short ones. This is what I would want.


    Image
    [Attachment 46472 - Click to enlarge]
    Last edited by Budman1; 14th Aug 2018 at 01:32. Reason: Cat keeps helping me type... GRRRRRR.
    Quote Quote  
  16. Originally Posted by Budman1 View Post
    Okay just for clarification... I set the program to show ALL scene changes in a separate image window. Thats what the 8 images are. They are separate scenes all by themselves.

    In the image below you will see the circled items show the frame rate to be about 24 FPS (.041667 duration.), There are 6 pages of 8 scene changes (48 in all) shown at top right. The scene changes occur so fast that notice the circled 'NbrFrms' (Number of frames in the scene) is low at 86, 72, an 76. That's about 3 seconds each. (86/24FPS, 72/24FPS, 76/24FPS). My wishes for this video is to eliminate the opening (KEEP 1) so I unchecked it. This means the first scene change will not be saved (A to B so to speak). The next 3 scenes are all part of the same scene and I want to keep together as one video so I checked KEEP 2/3/4 boxes. Being contiguous they will be saved as one complete video.

    Keep 5 is also unchecked and will not be saved. KEEP 6/7/8 are checked and in a sequence so will be saved as the second video.

    If i had any questions which I want and which I do not, I right click the image and it will play only that segment (scene) with frame number and time overlayed. To add more or continue, I just click BIG RED ARROW in the upper right to go to page 2, 3, 4, etc. and select, view, or omit sequences. When everything is final, I click Build Segments and it creates the number of segments I set up.

    The boxes with information, extra button and CMD Windows are not necessary to use or worry about unless you understand enough and then they let you make advanced changes such as set manual start and stop of a scene segment and others. For instances the Scen Variance box is drop down to select 0.200000 thru 0.600000 which are typical values but if you are advanced and want other the value can be changed directly for greater or less(0.900000-0.0500000 for example)

    Other wise these can just be ignored but they are there to fix crazy videos with 100's of scenes changes or incorrect timings, etc. In this particular video, there is a total of 2953 frames but the entire video only runs for 123.1401 seconds. Thats a lot of very short segments and I hardly wanted 48 videos from a 2 minute one. By checking contiguous KEEP, I can save 2-3 which includes many of the short ones. This is what I would want.


    Image
    [Attachment 46472 - Click to enlarge]
    that very good, can't wait until it releases
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!