VideoHelp Forum

Try DVDFab and copy Ultra HD Blu-rays and DVDs! Or rip iTunes movies and music! Download free trial !
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Hello,

    I often need to extract some video sequences from a dvd, fade them in and out, join them back together and sometimes add subtitles. So far I've been converting the dvd to avi and done all the editing with VirtualDub and Avisynth. However, it would be nice if I could create a new dvd with the edited clips (for playback in a standalone dvd player), but as you know, avi to dvd tends to be lossy. Is there a better way to do this editing with not too expensive software? Should I/can I avoid avi? I would be thankful for comments and suggestions!
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Maybe Mpeg video wizard or Tmpgenc Mpeg editor. They wont reconvert the entire video, just around transitions. But I don't think you can burn in subtitles.
    Quote Quote  
  3. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search Comp PM
    If you like what VirtualDub does....just keep using it but frameserve out to an MPEG2 encoder. I use TMPGEnc Plus.
    Quote Quote  
  4. That sounds good, I'll try. Thanks!
    Quote Quote  
  5. Originally Posted by hech54 View Post
    If you like what VirtualDub does....just keep using it but frameserve out to an MPEG2 encoder. I use TMPGEnc Plus.
    Can you give me some details on how you proceed with TMPGenc Plus to get a DVD? Feeding it the frameserved video out of VirtualDub works, but what then? Do you create an mpg file, or m2v and wav? What are the steps? Thanks!

    Edit: Ugh, I saved the file as .mpg and it's massively pixelated ...
    Last edited by Sebastian2011; 5th Feb 2012 at 16:16.
    Quote Quote  
  6. I read this guide and found out that I can feed the avs script directly to TMPGenc. What do I need the VirtualDub frameserver for?
    Quote Quote  
  7. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search Comp PM
    Originally Posted by Sebastian2011 View Post
    I read this guide and found out that I can feed the avs script directly to TMPGenc. What do I need the VirtualDub frameserver for?
    If you want to play with "scripts"....go for it.
    I frameserve from VDub to TMPGEnc Plus at least once each week. Simple and painless.
    Quote Quote  
  8. Originally Posted by hech54 View Post
    Originally Posted by Sebastian2011 View Post
    I read this guide and found out that I can feed the avs script directly to TMPGenc. What do I need the VirtualDub frameserver for?
    If you want to play with "scripts"....go for it.
    I frameserve from VDub to TMPGEnc Plus at least once each week. Simple and painless.
    I see, thanks! Just to clarify: I meant TMPGenc Plus as well. Can you recommend a tutorial or something that explains all the settings of that software? The results I get aren't bad so far, but it's a lot of trial and error.
    Quote Quote  
  9. Originally Posted by Sebastian2011 View Post
    I often need to extract some video sequences from a dvd, fade them in and out, join them back together and sometimes add subtitles. So far I've been converting the dvd to avi and done all the editing with VirtualDub and Avisynth.
    Why get VDub involved (except to test out the script before encoding)? Those things can all be done in the script which can then be opened in the MPEG-2 encoder of your choice.

    Or, encode to a lossless AVI (Lagarith or UT, for example) which can then be frameserved by an AviSynth script (and AVISource) into your encoder.

    ...but as you know, avi to dvd tends to be lossy.
    Anything to DVD is lossy.
    Quote Quote  
  10. Originally Posted by hech54 View Post
    Originally Posted by Sebastian2011 View Post
    I read this guide and found out that I can feed the avs script directly to TMPGenc. What do I need the VirtualDub frameserver for?
    If you want to play with "scripts"....go for it.
    I frameserve from VDub to TMPGEnc Plus at least once each week. Simple and painless.
    I made some mpg files with TMPGenc Plus via frameserving and those are (or seem) fine, but when I author a dvd out of them with DVDFlick, in one of the clips the audio is out of sync. That has always been my main problem with avi to dvd conversion. Since you say it's painless for you, maybe you have an idea what causes this, please??
    Quote Quote  
  11. I've found a way that works well for me. So I thought it would be useful to write all the steps down in order to remember them, and that I might as well do it here where it might help somebody else. Also, since I'm pretty much a noob who got lucky finally figuring something out that works, you might have suggestions for improvement which I'd be happy to read.

    So, the task is to cut video sequences from different sources, add subtitles, and author a new DVD, obviously retaining as much quality as possible. All tools I use except for TMPGenc Plus are free.

    1st step: Preparing files for editing in Avisynth/Virtualdub

    If the source is a DVD, I use DVD Shrink to extract the sequences I want according to this guide. This way I don't have to rip or copy the whole DVD which saves time. This gives me some .vob files containing the sequences I need.

    Then I use DGIndex (part of the DGMPGDec package) to generate a .d2v file containing the video and an .ac3 or .wav file containing the audio. It doesn't matter if the needed sequence is split up into several .vob files by DVD Shrink since the content will be joined back together in the files DGIndex produces. Just put all the .vobs into the file list via File -> Open in the right order. Select Demux all tracks as audio output option and save via File -> Save Project.

    2nd step: Editing files with Avisynth/Virtualdub

    If the source was a DVD, load the .d2v file generated by DGIndex into Avisynth using the filter DGDecode out of the DGMPGDec package:

    MPeg2Source("clip.d2v")

    I load the .ac3 audio file that DGIndex created using the NicAudio plugin:

    NicAc3Source("clip.ac3")
    [Edit: in an earlier version, I said I'd converted the .ac3 to .mp2 to load that one with NicMPG123Source. This was because I sometimes had trouble getting the .ac3 to work in Virtualdub, probably for this reason.]

    To join video and audio together, I use a script like

    vid=MPeg2Source("clip.d2v")
    aud=NicMPG123Source("clip.mp2")
    AudioDub(vid,aud)

    Since this still contains everything from the raw cut made with DVD Shrink, further cutting might be needed. This can simply be done using variables for the sequences I need, eg.:

    vid=MPeg2Source("clip.d2v")
    aud=NicMPG123Source("clip.mp2")
    clip1=AudioDub(vid,aud).Trim(0,21830)
    clip2=AudioDub(vid,aud).Trim(21954,25200)
    clip1+clip2

    I get the frame numbers used for the trim function simply by loading the raw clip via AviSynth into VirtualDub, finding the scenes where I want the cuts and writing the frame numbers down. To create nice transitions, I use AviSynth's FadeIn() and FadeOut() filters, or, if all fades should have the same duration, the Dissolve() function as in this example which tends to run more smoothly. If needed, I add some black frames at the beginning and end or in between joined clips using the BlankClip() function.

    If the source is an .mkv or .mp4 file, I load it with FFMpegSource2(), and .avis with AviSource().

    3rd step: Subtitles

    I open the .avs script in VirtualDub to check if everything is as desired. Fine-tuning is easily done by editing the .avs file, saving and using File -> Reopen in VirtualDub. If everything is right, I save the clip with Xvid compression in low quality. The resulting .avi is only an intermediate dummy file used to make the subtitles.

    I open the dummy .avi in Subtitle Workshop, start a new subtitle file and save the subtitles as .srt. I use DivXLand Media Subtitler to convert the .srt to .ssa, picking fonts, colors, size etc. under Settings -> Format Settings. The .ssa file can then be opened and previewed in VirtualDub using the Subtitler filter.


    4th Step: Frameserving to TMPGenc Plus

    In VirtualDub, I save a couple of seconds of the clip as an uncompressed .avi to open this .avi in GSpot or MediaInfo to check its properties; aspect ratio, framerate etc. Then I start the VirtualDub frameserver and open the .vdr file in TMPGenc Plus. The software has a lot of settings; brief explanations of them are found here. Some trial and error might be in order to get good results if you're not an expert. To make trial and error easier, you can select a tiny portion of the clip in VirtualDub before frameserving, so that TMPGenc Plus only needs a few seconds to encode and you can quickly check the result.

    I don't know why, but I found that having TMPGenc Plus create .mpg files and authoring them to a DVD with DVDFlick didn't get me anywhere - the quality was not that good and sometimes the audio was out of sync, which were the same problems I had when I fed .avis to DVDFlick and were the reasons I tried frameserving in the first place.

    However, having TMPGenc Plus create an .m2v video and a .wav audio file so far solved it for me.

    If no subtitles are needed, I use VirtualDub only for previewing and generating a small clip to check its properties in GSpot and feed the .avs file directly to TMPGenc once I'm happy with the preview.

    5th step: Authoring new DVDs

    If I don't need a DVD menu and only one clip on a DVD that autostarts, I use Muxman, which is quick, easy and produces good results. If I want several clips on a DVD that can be accessed via a menu, I use GUI for DVDauthor. The GUI doesn't accept .wav files, so again, I convert the .wav that TMPGenc Plus produced to .ac3 using BeLight.

    This got me DVDs that run fine on several standalone DVD players in what I consider pretty high quality. If there are any questions, I'll answer them if I can. Thanks to everyone who helped me!
    Last edited by Sebastian2011; 4th Apr 2012 at 11:50.
    Quote Quote  
  12. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Sebastian2011 View Post
    2nd step: Editing files with Avisynth/Virtualdub
    ...
    I convert the .ac3 or .wav file that DGIndex created to .mp2 using BeLight. Then I load that .mp2 file using the NicAudio plugin:
    Why convert when you can just load the .ac3 or .wav directly into Avisynth with NicAc3Source() or WavSource()?
    Quote Quote  
  13. Originally Posted by Gavino View Post
    Originally Posted by Sebastian2011 View Post
    2nd step: Editing files with Avisynth/Virtualdub
    ...
    I convert the .ac3 or .wav file that DGIndex created to .mp2 using BeLight. Then I load that .mp2 file using the NicAudio plugin:
    Why convert when you can just load the .ac3 or .wav directly into Avisynth with NicAc3Source() or WavSource()?
    Good question. I just went through the process again to find out why I did it, and found out/remembered that my VirtualDub seems to have problems with NicAc3Source. It loads the script, but when I hit "play", it only moves forward one frame and does nothing more. However, if I save the clip or a selection as avi, that avi works. Do you have an idea what could cause this?
    Quote Quote  
  14. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Sebastian2011 View Post
    Originally Posted by Gavino View Post
    Why convert when you can just load the .ac3 or .wav directly into Avisynth with NicAc3Source() or WavSource()?
    Good question. I just went through the process again to find out why I did it, and found out/remembered that my VirtualDub seems to have problems with NicAc3Source. It loads the script, but when I hit "play", it only moves forward one frame and does nothing more. However, if I save the clip or a selection as avi, that avi works. Do you have an idea what could cause this?
    No, that's odd, particularly since using NicAc3Source should make no difference to VDub, as all it sees is the uncompressed audio delivered by Avisynth.
    Does this happen with all your .ac3 sources?
    (I'd try it out myself, but I don't have much time right now.)
    Quote Quote  
  15. Originally Posted by Gavino View Post
    Originally Posted by Sebastian2011 View Post
    Originally Posted by Gavino View Post
    Why convert when you can just load the .ac3 or .wav directly into Avisynth with NicAc3Source() or WavSource()?
    Good question. I just went through the process again to find out why I did it, and found out/remembered that my VirtualDub seems to have problems with NicAc3Source. It loads the script, but when I hit "play", it only moves forward one frame and does nothing more. However, if I save the clip or a selection as avi, that avi works. Do you have an idea what could cause this?
    No, that's odd, particularly since using NicAc3Source should make no difference to VDub, as all it sees is the uncompressed audio delivered by Avisynth.
    Does this happen with all your .ac3 sources?
    (I'd try it out myself, but I don't have much time right now.)
    I checked. It appears to be something about the files that DGIndex puts out. I converted a random mp3 to ac3 with BeLight, called that ac3 with the otherwise identical AviSynth script in VirtualDub and it worked. Next I re-encoded the original ac3 as ac3, and then it worked too.
    Quote Quote  
  16. Originally Posted by Gavino View Post
    Originally Posted by Sebastian2011 View Post
    Originally Posted by Gavino View Post
    Why convert when you can just load the .ac3 or .wav directly into Avisynth with NicAc3Source() or WavSource()?
    Good question. I just went through the process again to find out why I did it, and found out/remembered that my VirtualDub seems to have problems with NicAc3Source. It loads the script, but when I hit "play", it only moves forward one frame and does nothing more. However, if I save the clip or a selection as avi, that avi works. Do you have an idea what could cause this?
    No, that's odd, particularly since using NicAc3Source should make no difference to VDub, as all it sees is the uncompressed audio delivered by Avisynth.
    Does this happen with all your .ac3 sources?
    (I'd try it out myself, but I don't have much time right now.)
    I edited the unnecessary conversion out, thanks again. I think the troubles I had with .ac3 files was due to multichannel issues which can be solved by using the script AlanHK posted, i.e. without converting the file.
    Quote Quote  



Similar Threads