VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Hallo!
    I tried hard just to remove a very small scene from an Avi file using VirtualDub, but when I remove it and save the file, I notice that the scene hasn't been removed from the final avi .
    Then I tried to trim by using Avisynth code, I created a file and typed the following code :
    Code:
    AVISource("C:\clip.avi") 
    Trim(0,88896)+Trim(88934,0)
    Then named the file clip.avs, then I opened the file using VirtualDub...
    And I choosed "Direct Stream Copy" for both Video and Audio to save th avi file with the exact codec, but when I save it, the file will be saved uncompressed and will be more than 7 GB, but the source file is only 700 mb.
    How can I save the file with the same quality as the source ? without needing to decode the file... I want i exactly as the same.
    Any idea please ? Maybe thre is a code to b added to the file to get the same output file as the original one ?
    Why can't the job be solved using the "Mark in" and "Mark out" from the VDub ? I cut the scenes, but the output comes without cutting, the scens can' be cuted.

    Any idea please ?
    Thanks in Advance!
    Quote Quote  
  2. Hi-

    You can only cut AVIs on keyframes. You want to cut only 38 frames, and the usual length between keyframes is 240 (23.976fps) or 250 (25fps) frames (10 seconds). So if you're cutting wthin the same keyframe, then yes, nothing will get cut.

    There's a way around that involving saving the frames within that keyframe, reencoding that one small section, making sure that keyframes are set on the beginning and end frame where you want to cut, reinserting it and then cutting. I don't know if that made any sense, but unless cutting on the 2 keyframes on either side of the 38 frames is OK for you, then you have your work cut out for you. You can find where the keyframes are by using the gold key buttons to advance by keyframe.
    Quote Quote  
  3. Member gadgetguy's Avatar
    Join Date
    Feb 2002
    Location
    West Mitten, USA
    Search Comp PM
    Also, so you know, as a frameserver, the output from AviSynth is always uncompressed, which is why Direct Stream Copy resulted in uncompressed video. To result in a similar size file you would need to use the same compression codec and the entire file will have been re-encoded (unless you do as manono suggested).
    "Shut up Wesley!" -- Captain Jean-Luc Picard
    Buy My Books
    Quote Quote  
  4. Thanks alot manono for your reply.

    Yes you are right... I used the gold keys, and yes I removed th keyframes... But it was little more than what I wanted to remove.
    But I got a problem , when I watched the result after removing the unwanted scene, I noticed that a weird sound appeared when the video arrived to the removed scene, and the sound went lower than usuall for about 10 seconds... What causes that ? And is there a solution to avoid this to be happened ?

    Using the AviSynth is great for cutting, but the only problm is that the saved file is uncompressed and has very big size, over 7 GB , isn't there any idea how to use Avisynth and save the file with th same size and quality and codec of the original file ?

    EDIT :
    Sorry, I was typing in the same time when gadgetguy typed his reply.
    Thanks gadgetguy for your reply.... That means there is no way to get exact file of the original avi file by using AviSynth ? Sorry to hear that.
    Quote Quote  
  5. There is a version of avisynth named DSynth (or something similar) I know only that it has some direct stream functionality, but if it would help in this case I don't know. Another alternative might be Avidemux2 - but I think it will cut also on K frames.
    I think also that k frames are required only for the start of a segment, not for the end of it.
    Quote Quote  
  6. Yeah, it's kind of discouraging about that cutting thing. Have you ever made a 2 CD AVI, made it 1400 MB and there's not much leeway about where to cut. I hate cutting in the middle of a conversation, or even a scene. But maybe there's a fade out nearby where it's good to cut. Except keyframes don't usually get set on fade ins/outs. So I've done that reencoding short sections and refitting it into the AVI before cutting thing a few times. A real PITA.

    As for your audio problem, I don't know for sure, as there's not enough information yet. An educated guess tells me it's VBR MP3, and since VDub doesn't support VBR MP3, that's maybe the cause of your problem. So, for the cutting try either VDubMod or NanDub. I haven't seen that particular audio problem before, but I don't use VDub either.
    Quote Quote  
  7. Thanks all for your replies.
    manono, I don't know really how to remove the noise of the sound where the scene has been cuted, I used VDubMOD too, but the same thing happened.
    Th sound is AC3 as the VDub reports... Isn' there maybe a tool to solve this problem and repair this annoying noise ?
    Quote Quote  
  8. Hi-

    If I read you correctly, you have 2 audio problems. And I don't know the answer to either, short of fixing it in a WAV editor and reencoding it. You said the audio volume got soft for 10 seconds after the join, and I've never seen that. You also said there was a "weird sound" at the join, and I have seen that before, if you're referring to the short "pop" noise.

    You might try splitting the AVI into 2 parts, one before the cut and the other after the cut. Split the original AVI into the 2 pieces. Play the end of the first part and the beginning of the second part and listen for the pop and the quiet audio for the 10 seconds at the beginning of part 2. I don't think you'll hear them. Then rejoin them in VDubMod by opening the first part, and then add the second part with File->Append Segment. Set Video to Direct Stream Copy, save it, and hope for the best. If that doesn't work, another thing you can try is to extract the audio for the Part 2 AVI and run it through AC3Fix. I think the problem is probably because it wasn't cut on an audio frame, which is different from a video frame. But I'm no audio expert, so I could be wrong about that. Good luck.
    Quote Quote  
  9. Member
    Join Date
    Nov 2005
    Location
    Brazil
    Search Comp PM
    Hi folks,

    I’ve some suggestions for you apalace at first you talked as you know how to cut in VirtualDub, so just cut as you have done using mark in and mark out, but remember to put Audio and Video in Direct Stream Copy. What you will do is to cut the initial movie part and Save as AVI (using the instructions I gave above) as “Movie1”, for instance, and do as the same with the second part like “Movie2”. Finally you will end with two files “Movie1” and “Movie2”. Now you simply open “Movie1” in VirtualDub and use Append AVI Segment to join “Movie2” with “Movie1”, but remember always use Audio and Video in Direct Stream Copy.
    I have some experience with Avisynth and if I would do what you did I would do like this (imagine that your movie is 150000 frames long, as an example):

    a=AVISource(“C:\clip.avi”).Trim(0,88896)
    b=AVISource(“C:\clip.avi”).Trim(88934,150000)
    a+b

    But remember if you work with Avisynth like this you will have to recompress that script to avi using your preferred codec with the VirtualDub engine or to Mpeg2 using CCE, for instance.

    That is all.

    See you later,

    Aeolis
    Quote Quote  
  10. Thanks manono...
    I'll try extracting the AC3 file, and correct the bad frames. The problem with Audio is : where the cutted scene, I hear weird sound (pitching) and then the sound goes very low, hard to hear for even more than 10 seconds, maybe 1 or 2 minutes, this is what I had after removing.
    I'll try now extracting the audio file and scan it with AC3fix , but how can I join it back to the video ? I don't know how to join the video with external audio.
    I tried another tool called Avidemux, it is great tool for cutting , and I removed frames instead of k-frame, but after saving I got only Video without Audio... it supposed to contain audio but I don't know if there is any way to have audio with the video by that tool.

    Aeolis, thanks for replying... Your method is nice, I'll try it after I try what manono posted and see if this works.

    Thanks very much!
    Quote Quote  
  11. but how can I join it back to the video ?

    VDub, VDubMod, or NanDub, and I'm sure by other methods. If using VDubMod, open the video and set it for Direct Stream Copy. Go Streams->Stream List->Add, and point it to the AC3 audio. Then go File->Save As and give it a new name. If replacing the original audio, Disable it first, before adding the new fixed audio.
    Quote Quote  
  12. manono thanks for your quick answer.
    The result is that the audio went aut of sync, I hear the voice before the scene for about 5 seconds.
    I'll try to split the video two parts and remove the unwanted scene from the beginning of the second part and see if the sound bitches.

    EDIT::
    Ok I splitted the file into two parts, and removed the unwanted scene... When I viewed both parts, they were fine.... But after I joined them together, the weird (bitching) soun is back and the sound went very low for first few minutes.
    Doesn't VDub support AC3 well ? Bad.
    Now I just hope fo the Avidemux to output the file with audio included. I'll look for this tool since it cuts frames accurate.

    EDIT2 ::
    It seems that my installed AC3 codec in windows was causing this sound problem... I just downloaded the last version and installed it, after that I viewed the Avi file and the weird sound was gone and everything else was fine.

    Thanks to everyone!
    Quote Quote  



Similar Threads

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