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.
+ Reply to Thread
Results 1 to 16 of 16
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.
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.
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
[i] AudioEnc: ffmpeg version N-53380-g0fb7fef Copyright (c) 2000-2013 the
[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=
~[*] Ending operation.
'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)
-f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v mpeg4 "%(tempvideofile)"Code:
-i - -vn -acodec copy "%(tempaudiofile)"Code:
-i "%(tempvideofile)" -i "%(tempaudiofile)" -acodec copy -vcodec copy "%(outputname)"
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.
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 ... .
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 addedCode:
-f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v mpeg4 -b 3200k "%(tempvideofile)"
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.
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.
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?
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.
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!