VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    I have some videos using screen recorder software. They are by default saved as mkv files with MPEG4 visual video and ac3 audio. Due to mismatch in internet speed, there will be much interruptions and video would be blank. I used to edit them in VirtualDub and save them to mp4 using external encoders. I have no problem upto this stage. I also want to save the original screen recorded video after editing like direct stream video and audio using same external encoders. I have attached the video details of original video before editing. Could anyone help me giving me the command line parameters. Thanks.
    Image Attached Files
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Have you tried any other editors? Like avidemux? Set start, stop, press delete to remove sections and save. Under Video and Audio choose copy.
    Quote Quote  
  3. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by Baldrick View Post
    Have you tried any other editors? Like avidemux? Set start, stop, press delete to remove sections and save. Under Video and Audio choose copy.
    Thanks Baldrick. As you said it is possible to save the edited video using avidemux. But, I need to edit the video twice in a minute. Moreover, I can only do it at keyframes. Whereas I can do it framewise and I find it very easy in virtualdub.
    Quote Quote  
  4. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    I'm a little lost when you say:

    Could anyone help me giving me the command line parameters.
    Command line for Virtualdub or for capturing When you Play back the edited video?
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by Budman1 View Post
    I'm a little lost when you say:

    Could anyone help me giving me the command line parameters.
    Command line for Virtualdub or for capturing When you Play back the edited video?
    I want the command line to save the mkv video in virtualdub external encoders way. Due to slow internet speed, the on screen video will not be recorded and there will be gaps approximately twice during one minute of video recording. So, for 30 minutes of recording roughly 50 to 60 gaps will be there. I open the video in virtualdub and remove the gaps. I want to save the resultant video as video copy and audio copy. The video format is as given at my 1st post.
    Quote Quote  
  6. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Okay... I got Virtualdub to pass an MKV with mp4 video and ac3 audio to the FFmpeg external encoder. I used ffmpeg for audio, video and the muxer and it worked fine once the settings were right but it seems to be touchy.

    I don't know if this will work for you or not and don't recommend it since I get the message that I cannot use direct stream copy for the video. That would mean Encoding it and sending it to external encoder where it will be encoded again. I'm still looking into this to see why Virtualdub seems to send raw data instead of the compression assigned in it.
    Quote Quote  
  7. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by Budman1 View Post
    Okay... I got Virtualdub to pass an MKV with mp4 video and ac3 audio to the FFmpeg external encoder. I used ffmpeg for audio, video and the muxer and it worked fine once the settings were right but it seems to be touchy.

    I don't know if this will work for you or not and don't recommend it since I get the message that I cannot use direct stream copy for the video. That would mean Encoding it and sending it to external encoder where it will be encoded again. I'm still looking into this to see why Virtualdub seems to send raw data instead of the compression assigned in it.
    Thanks Bud! This is what my requirements exactly. After removing the gaps in the on-screen recorded video, I save the video to mp4 H264 AAC using the FFmpeg external encoder feature to reduce the size. However, as I wouldn't get the original video again, I wanted to save it as video, audio copy ( to mkv mpeg4 visual ac3 ). I tried to save using the command line, but I get the message that I cannot use the direct stream copy for the video. So, I wanted some help from genius like you and others in the forum.
    Quote Quote  
  8. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    It appears that no matter what you set for Virtualdub compression codec, it sends raw data to the external encoder feature. It sort of makes sense since Normally you would set filters and sharpen, etc. then send to external encoder so why encode to MP4 and AC3 and then send to an encoders whose job is to do the same thing.

    [*] Beginning dub operation.
    [i] Dub: Input (decompression) format is: YUV420.
    [i] Dub: Output (compression) format is: YUV420.
    [i] VideoEnc: ffmpeg version N-53380-g0fb7fef Copyright (c) 2000-2013 the
    FFmpeg developers
    [i] AudioEnc: ffmpeg version N-53380-g0fb7fef Copyright (c) 2000-2013 the
    FFmpeg developers
    ~
    [i] VideoEnc: Input #0, rawvideo, from 'pipe:':
    [i] VideoEnc: Duration: N/A, start: 0.000000, bitrate: 147423 kb/s
    [i] VideoEnc: Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
    854x480, 147423 kb/s, 29.97 tbr, 29.97 tbn, 29.97 tbc
    ~
    [i] VideoEnc: Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
    [i] AudioEnc: [ac3 @ 000000000038a940] max_analyze_duration 5000000 reached at 5014400 microseconds
    [i] AudioEnc: Input #0, ac3, from 'pipe:':
    [i] AudioEnc: Duration: N/A, start: 0.000000, bitrate: 192 kb/s
    [i] AudioEnc: Stream #0:0: Audio: ac3, 44100 Hz, stereo, fltp, 192 kb/s
    [i] AudioEnc: Output #0, ac3, to 'C:\Users\Bud\Desktop\bypass.mkv.ac3':
    [i] AudioEnc: Stream #0:0: Audio: ac3, 44100 Hz, stereo, 192 kb/s
    [i] AudioEnc: Stream #0:0 -> #0:0 (copy)
    ~
    [i] Mux: Stream #0:0 -> #0:0 (copy)
    [i] Mux: Stream #1:0 -> #0:1 (copy)
    [i] Mux: frame= 4890 fps=0.0 q=-1.0 Lsize= 17438kB time=00:02:43.13 bitrate=
    875.7kbits/s
    ~[*] Ending operation.
    Anyway, I set Virtualdub to use MP4 V3 compression codec and Audio compression to use AC3 codec. I am enclosing images of how I set up the external encoder as a reference for others that might view this and get a clearer understanding of this feature. Basically, I created an encoder set:

    'FFmpeg Merge', as the muxer under the encoder tabs (Options -> external encoders -> encoders tab)
    'FFmpeg MP4', as the video under the encoder tabs (Options -> external encoders -> encoders tab)
    'FFmpeg AC3', as the audio under the encoder tabs (Options -> external encoders -> encoders tab)
    The script portions were:
    Video =
    Code:
    -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v mpeg4 "%(tempvideofile)"
    Audio =
    Code:
    -i - -vn -acodec copy "%(tempaudiofile)"
    Muxer =
    Code:
    -i "%(tempvideofile)" -i "%(tempaudiofile)" -acodec copy -vcodec copy "%(outputname)"
    Images:
    Click image for larger version

Name:	Set.jpg
Views:	232
Size:	36.2 KB
ID:	35401Click image for larger version

Name:	Audio Encoder.jpg
Views:	225
Size:	54.7 KB
ID:	35402Click image for larger version

Name:	Video.jpg
Views:	332
Size:	56.5 KB
ID:	35403Name:  ScreenHunter_188 Jan. 26 13.13.jpg
Views: 592
Size:  7.1 KBClick image for larger version

Name:	Multiplexer.jpg
Views:	225
Size:	54.9 KB
ID:	35405
    Quote Quote  
  9. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Thanks Bud for sparing your precious time. I downloaded the latest FFmpeg version, did copy paste of the command line scripts what you have given and processed a sample video. It appears that VirtualDub processed the "Test" video and audio file as can be seen from the attached screenshot, but somehow they were not muxed in the output video and nothing was available in the final mkv. I have attached a sample video.
    Image Attached Thumbnails Click image for larger version

Name:	Bud Command TEST.jpg
Views:	215
Size:	40.2 KB
ID:	35409  

    Image Attached Files
    Quote Quote  
  10. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Quick reply while I check it out... Did you set the compression in VirtualDub for BOTH Video and Audio?
    Quote Quote  
  11. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by Budman1 View Post
    Quick reply while I check it out... Did you set the compression in VirtualDub for BOTH Video and Audio?
    I didn't set the compression in VirtualDub. I didn't touch that step. Normally, I open the video file under files of type tab "FFMpeg Supported Files", do the editing i.e, cut the portion wherever it was not recorded and finally save File->Export->Using external encoder. Under Video tab
    it would be 'Full processing mode' and audio 'Direct stream copy'.
    I do one more thing which I forgot to mention earlier please. After opening the video file, I do File-> 'Save WAV...' . Increase the volume of the audio without clipping, load that wav in virtualdub again under Audio-> Audio from other file ... .
    Quote Quote  
  12. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Normally you would be correct in your steps but that would be to have VirtualDub use IT'S encoders and save the file. But to let the external encoders (ffmpeg) do the encoding, it expects raw data from VDub and a final compression from the audio. By converting to WAV, you just add another step and ffmpeg audio encoder script is set to COPY it so it will copy WAV -> WAV. If you set it to AC3 in VDub, it will be encoded once and thats all.

    Video has a raw data setting and that worked on my test but it's going to send raw data anyway but just won't allow direct stream copy to be selected so, bottom line set the final compessions, audio and video in VDub and that should work. Any other setting are touchy and you get strange results.

    I also added
    Code:
    -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v mpeg4 -b 3200k "%(tempvideofile)"
    This improves the final output to near what you had, Actually you can tweak the Video encoder per ffmpeg settings after you get it working in a simple form first.

    I made a video of how it works for me and what I did in sequence at https://files.secureserver.net/0sECwCKGihk6SQ You can download and watch because its a Godaddy site and they quit allowing conversion to watch online. Dumb for them since the cloud, dropbox and others allow better usage and viewing.

    Anyway,
    1. Go with basic setting first
    2. Set VDub Video AND Audio compression settingsa
    3. Use the FFmpeg plugin (FFInputDriver.vdplugin) if you have it since it works here.
    4. You can View-> Log and look for any errors when things don't work also.

    Let me know what happens.
    Quote Quote  
  13. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    This supersedes my post #11. Sorry for my ignorance. I have just installed MPEG4 and AC3 codec. Set both video and audio compression in VirtualDub. Saved the video using external encoder feature. But, the output Mkv does not have any video or audio and shows 0.00 Byte.
    Quote Quote  
  14. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    That usually comes from some error in the 3 scripts and should show as an error in virtual dubs log. The log shows video audio and mux completion with no error if all went well? Any errors in log?
    Quote Quote  
  15. Member
    Join Date
    Mar 2011
    Location
    India
    Search Comp PM
    Originally Posted by Budman1 View Post
    I made a video of how it works for me and what I did in sequence at https://files.secureserver.net/0sECwCKGihk6SQ You can download and watch because its a Godaddy site and they quit allowing conversion to watch online. Dumb for them since the cloud, dropbox and others allow better usage and viewing.

    Anyway,
    1. Go with basic setting first
    2. Set VDub Video AND Audio compression settings
    3. Use the FFmpeg plugin (FFInputDriver.vdplugin) if you have it since it works here.
    4. You can View-> Log and look for any errors when things don't work also.

    Let me know what happens.
    The video what you have uploaded got deleted.

    After viewing the log file, I understood the mistake, i.e. under FFMpeg Merge - I didn't check the box 'Delete output file before starting'
    When I did it, every thing went on fine and finally I succeeded. Thanks a lot Bud for your patience. You have added a feather in my learning
    curve. Thanks again for your immense help.
    Quote Quote  
  16. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Great! Now just tweak the video settings if something doesn't look right. Looks like you did a lot of research on your own on this. Cudos!
    Quote Quote  



Similar Threads

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