Newbie question- What is the proper way to add a clip to an existing file?

Started by Accomac, September 16, 2016, 03:35:00 PM

Previous topic - Next topic

Accomac

I hope this is the right place to ask a question, I'll understand if it gets moved somewhere else!

I am trying to edit a video, so one section of it repeats one time. I use the >> buttons to find the key frames that show the beginning and end of part I want to have repeat. Then use COPY and PASTE at the point where I want the file to repeat. I am leaving the [A and B] markers where they were. The copy/paste seems to work fine, but as I continue the video to the end, I get files that I don't want, added to the existing one!
For instance, I get 2 sets of credits at the end as if I had deliberately added them. I must go back and delete the last set to make the clip end properly. The more times I use the COPY and PASTE the more this occurs. I keep getting these random sections of the original file added into it as if it was deliberately being done, including the ones I copied/pasted. :o

Obviously I am doing something wrong but am clueless as to what it is. All the searching I have done including YouTube have yielded no results for what I am trying to do. If my question isn't clear please let me know and I'll try and explain it again.

thank you in advance,

Accomac

eumagga0x2a

You don't do anything wrong, it is a bug. Currently it seems that the position of the B marker is not taken into account when copying video. "Paste" pastes everything from the A marker till the end of the video at the current slider position.

Mean, could this be a release blocker despite the EBML header story and the related urgency, please? Copy & paste is basic functionality, maybe the fix is not dificult in this case.

mean

The whole thing is half broken, it's not too easy to fix and more important, it is a pain to test
Meanwhile, all the mpeg1/2/4/FF encoder are broken, so i'll release tomorrow, dont know i will have time in the near future after that




Accomac

Well at least I know what the cause of the problem is, I am surprised that it hasn't been fixed at some point. Since there seems to be no fix in the future I will simply remove both copoies from my dual boot machine running Win 7 and Linux Mint.

I'll have  to search for a replacement to do simple editing.

Thank you both for the speedy reply. although I was hoping it was me and my fat fingers causing the problem! :'(

Cheers

Accomac

fish

Why not just copy the section you want to repeat, save it. Copy the section up to where you want to add the repeat section, save that. Copy the section that will follow the repeated clip, save that and then append the clips together.

Accomac

Hi fish,

Not sure even how to copy just what I want since the [A B] buttons copy more than they should. I don't know if a simple Ctrl C will work ......and how do I choose to delineate what I want to copy/ save?

Sorry to be so lame, all my work is done on RAW files or .jpgs I am just trying to edit a few vids that I have, I do'tn want to make a vocation of it. But it would be nice to know of a work around that won't make me tear out my remaining hair! ;D

Accomac

Jan Gruuthuse

Quote from: Accomac on September 17, 2016, 11:03:27 PM
Not sure even how to copy just what I want since the [A B] buttons copy more than they should.
Your used hardware? OS? 32-bit or 64-bit?
And what is your understanding of "[A B] buttons copy more than they should."
The behaviour depends on several things
- are you using avidemux in copy mode for video? You can only select marker with keyboard up or down arrow. Not with left or right.
- the kind of video
-- video codec
-- container
-- same recording/ matching time index
- your workflow
- something we are not aware off

do use a copy of video you want to edit

mark a segment you want to cut / copy / paste with [A ] [ B]
save part01
mark next segment
save part02
and so on

check if the segments contain what you intended

Deleting fragment
mark fragment [A ] [B ], simultaneous keypress [Ctrl][X]
The segment is gone
Save Video "new01"
repeat this steps if more fragments need deleting, increase video name by 1 (new02, new03, ...) when saving.

now load the last video like new03 and add the segment part01 , save that video new03part01
load video new03part01 and add segment part02, save video new03part01part02.
at each step check if the result is there.

If you still have issues, provide a more detailed work flow, reproducible at will be us, and see if we can take it from there.

Check out: Avidemux Quickstart
and please do note:
QuoteAvidemux is a simple tool for simple video processing tasks. The keyword here is simple: it does not offer tools like a timeline, multitrack editing, you cannot freely move or splice audio and video clips from various sources. However, Avidemux allows you to do elementary things in a very straightforward way.

eumagga0x2a

Quote from: Accomac on September 17, 2016, 11:03:27 PM
Not sure even how to copy just what I want since the [A B] buttons copy more than they should.

Remember, the marker A (it doesn't matter whether you set it via clicking on the button or via Ctrl+PgUp) sets the start of the segment copied to clipboard, but the marker B has no effect thus the end of the segment is always the end of the video. This applies only to the "copy to clipboard" operation, otherwise marker B is well respected, e.g. for the delete operation.

QuoteI don't know if a simple Ctrl C will work

It works or rather fails in the same way as clicking through menus.

Quote......and how do I choose to delineate what I want to copy/ save?

Currently copy & paste is directly usable only if you copy a segment at the end of the video. Otherwise you have to save the part you want to copy & paste as a separate video first, then append it to the original video. Now you can copy it and paste elsewhere. Delete the appended part at the end.

QuoteBut it would be nice to know of a work around that won't make me tear out my remaining hair! ;D

Presumably the workaround outlined above falls into the tearing hair out category. The relief is not far away: a fix for the editing engine is scheduled for the next Avidemux release.

fish

I do not see the issue with the 'B' mark out control (Win 7).  If I mark points A and B, I can save that section of video between the in and out markers.
If the file format is a raw file, which should be similar to an M-JPEG and DV, , in that each frame is compressed independently, rather than with interframe prediction, it should be unnecessary to cut to I-frames.
Assuming the section to be repeated is repeated without a gap of other video then, in copy mode simply mark A at the start of the video, mark B at the end of the section to be repeated. Save that as part 1. Then mark A at the beginning of the section you want repeated and mark B at the end of the video. Save as part 2. Then append part 1 and part 2, save that and you will have a video with a section repeating. If you want a section that repeats but doesn't repeat adjacent in time, then you will need to do it as I suggested previously.   
Mark A and B of the section you want to repeat, save it as part2. Mark A and B of the section where you want the repeat section to start, save that as part 1. Mark A and B of the section that will follow the repeated section, save that as part 3. Then append the clips together, which in Win7 in copy mode, is a simple case of dragging part 1 into Avidemux, followed by dragging part 2 and part 3. Then save that as your new video The section you selected as part 2 will repeat between your part 1 and part 3.

Jan Gruuthuse

Quote from: eumagga0x2a on September 18, 2016, 06:39:02 AM
>8 >8
But it would be nice to know of a work around that won't make me tear out my remaining hair! ;D
>8 >8
Presumably the workaround outlined above falls into the tearing hair out category.
I don't understand your adversity versus workarounds or my postings. Not the 1st time you're doing this.

eumagga0x2a

Quote from: fish on September 18, 2016, 08:41:44 AM
I do not see the issue with the 'B' mark out control (Win 7).  If I mark points A and B, I can save that section of video between the in and out markers.

Yes, correct, saving and deleting works. The copy operation announces at avidemux/common/ADM_editor/src/ADM_segment.cpp:804 and at line 805 that it would do the right thing like

  [HandleAction]  ************ Copy **************
  [copyToClipBoard]  Copy to clipboard from 00:18:21,160  [copyToClipBoard]  to 00:23:24,520


The values for startTime and endTime are correct for markers A and B I've set in my test video which is 38 minutes 51 seconds long. Then things start to go wrong. Actually, the second condition in

        if(s._startTimeUs<=endTime && (s._startTimeUs+s._durationUs)>endTime)
        {
           
            // need to refine last seg           
            uint64_t offset=endTime-s._startTimeUs;
            s._durationUs=offset;
            aprintf("Marker B is here offset=%d\n",(int)offset);
        }


fails as "Marker B is here offset=" message never gets printed in the console. Naively deleting

&& (s._startTimeUs+s._durationUs)>endTime

and replacing the line 829 with

            uint64_t offset=endTime-startTime;

sort of fixes the copy to clipboard function. I have no idea how many kittens have to die due to this surgery with a pry bar, but it works this way.

Of course, this is not a real fix, just an uneducated hack! Don't do it at home!

eumagga0x2a

Quote from: Jan Gruuthuse on September 18, 2016, 08:59:40 AM
Quote from: eumagga0x2a on September 18, 2016, 06:39:02 AM
Presumably the workaround outlined above falls into the tearing hair out category.
I don't understand your adversity versus workarounds or my postings. Not the 1st time you're doing this.

I'm shocked that my statement could be misunderstood this way, my apologies that my wording must have been not clear enough. The phrase was related solely to my own workaround directly above:

Quote from: eumagga0x2a on September 18, 2016, 06:39:02 AM
Currently copy & paste is directly usable only if you copy a segment at the end of the video. Otherwise you have to save the part you want to copy & paste as a separate video first, then append it to the original video. Now you can copy it and paste elsewhere. Delete the appended part at the end.

I considered mine (and only mine) workaround to be too tedious.


Accomac

Whew!

It was never my intention to start an argument among everyone, I just wanted to know what I was doing wrong when using your program. I have never ignored anyone's posting or suggestion with a solution or workaround. When I get a reply from a senior member 'eumagga0x2a' :You don't do anything wrong, it is a bug. Currently it seems that the position of the B marker is not taken into account when copying video. "Paste" pastes everything from the A marker till the end of the video at the current slider position. I have to believe them!

to: Jan Gruuthuse My system is dual boot Win 7 64 and Linux Mint, Graphics Card is Nvidia 880GTS, 6GB RAM, Hybrid drive 1 SSD 1 500GB HDD MS is an Asus Rampage Extreme, Quad Core Intel Processor

I would love to use Avidemux to do simple editing! It's exactly what I need, I will not be creating Steven Spielberg production quality videos, that's not my intention, it's waaaaaay beyond my paygrade. I don't even own a video camera of any kind.

When you say 'choose what you want to add and save it', you lose me. I can visualize what you're telling me but I can't accomplish it. That's where it goes off the rails for me.  Sorry I didn't realize there is an COPY MODE.... You are operating under the false assumption that I understand the terminology.

You are ALL far more knowledgeable on the subject than I am and I bow to your superior skills. I don't do any coding or compiling, I am just an end user.

That said, I wonder if I was to ask you to read a schematic diagram for a MK !V Harsco Tamper, and tell my why the hydraulic cylinder on the lining frame isn't getting the signal to move the rail, how well would you do? It all depends on your skill set, just like me fumbling with Avidemux!

I am confident that at some point the proverbial light will come on and I'll sigh and think "boy this was easy, I was over thinking it!"

Right now though we aren't at that juncture.

You don't need my permission to delete the entire thread and remove me as a member of the forum, but for God's sake don't drag me into an argument because I asked a simple question and was given an answer that "You don't do anything wrong it is a bug" "

Thank you all

Jan Gruuthuse

copy mode is when Video Output and Audio Output both showing [Copy] no re-encoding takes place.

My understanding of Basic editing: Fast Edit with Copy Mode 3.15 Minute video on youtube.
All selections here are made with keyboard up/down arrow.

Try with Linux Mint (not a virtual machine) and latest http://www.avidemux.org/nightly/appImage/ that should run without install.

If copy paste does not work: save video in parts, then load parts in order you want.
Load  part 01 and append remaining videos manually, don't let avidemux load remaing parts if it asks to do so.

remove previously created .idx2 files.
I'm basic user, and try to keep things simple, explaining from this perspective.