ELI5: How to use ffmpeg to prevent preview lag Vegas Pro 13.0

dave-d wrote on 5/3/2018, 12:00 PM

Hi!

Okay, I hear that to prevent preview lag I may not have the right codec and I need to convert my video using ffmpeg. Some comments I have read say things like, "I converted with ffmpeg and now its smooth! Thanks!". Please note that I have tried all the other recommended ways (frame rate decrease, quality, increasing dynamic ram, etc.) to prevent preview screen lag with no success.

Anyway, I am not a computer expert by any means so I am asking if somebody can hold my hand through this and help me convert my videos to the proper format so Vegas can read them properly.

My comments / questions are:

  • My 'Plug-In' name is: mcmp4plug2.dll (I have no idea what this is or means, but people say to look for it)
  • I have installed ffmpeg and have verified it is installed
  • How to I tell ffmpeg to convert a video file and what am I converting it to so Vegas Pro 13.0 can play it properly?
  • How do I tell ffmpeg where to put the converted file?

Any help would be appreciated for this. I worked through the lag on my past projects with selective rendering, but I really don't want to do it again with this project.

Thanks!!!

 

 

Comments

dave-d wrote on 5/3/2018, 7:53 PM

Nick - Thanks for the links. So, just a quick question regarding my files:

  • My video files are already .mp4 (taken with a Samsung S7). So, how can ffmpeg help me? The link you sent is for converting .mov to .mp4. Can I doing something else with ffmpeg that will help with the lag?

Thanks,

Dave

 

NickHope wrote on 5/4/2018, 3:08 AM

You possibly can. It's weird that your files are decoded by mcmp4plug2.dll. I would expect them to be decoded by compoundplug.dll.

You could try a straight rewrap from mp4 to mp4 and see if it "fixes" something in the file. Just follow the method in my 2nd link above but use this batch file instead:

for %%a in ("*.mp4") do ffmpeg -i "%%a" -vcodec copy -acodec copy "%%~na-fixed.mp4"

To be of any more help we'd need to see MediaInfo for a file, or even better, a sample shared to a cloud service, as per my 3rd link.

dave-d wrote on 5/7/2018, 8:08 PM

Hi Nick!

The .bat file option did not prevent the lag. Here is the information you requested from MediaInfo:

 

General
Complete name                            : S:\Pictures\Family\Spoon Videos\Spoons 3\20171223_205809.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42)
File size                                : 4.00 GiB
Duration                                 : 33 min 11 s
Overall bit rate                         : 17.3 Mb/s
Encoded date                             : UTC 2017-12-24 03:31:23
Tagged date                              : UTC 2017-12-24 03:31:23
com.android.version                      : 7.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 1 Ref Frames
Format settings, CABAC                   : Yes
Format settings, RefFrames               : 1 frame
Format settings, GOP                     : M=1, N=30
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 33 min 10 s
Source duration                          : 33 min 10 s
Bit rate                                 : 17.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 30.000 FPS
Minimum frame rate                       : 25.000 FPS
Maximum frame rate                       : 34.156 FPS
Standard                                 : NTSC
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.273
Stream size                              : 3.94 GiB (98%)
Source stream size                       : 3.94 GiB (98%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : UTC 2017-12-24 03:31:23
Tagged date                              : UTC 2017-12-24 03:31:23
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.601
Matrix coefficients                      : BT.709
mdhd_Duration                            : 1990605

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : mp4a-40-2
Duration                                 : 33 min 11 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 60.8 MiB (1%)
Title                                    : SoundHandle
Language                                 : English
Encoded date                             : UTC 2017-12-24 03:31:23
Tagged date                              : UTC 2017-12-24 03:31:23

 

File Properties:

General
  Name: 20171223_205809.mp4
  Folder: C:\My Stuff
  Type: MainConcept AVC/AAC
  Size: 4.19 GB (4,294,673,228 bytes)
  Created: Monday, May 7, 2018, 6:42:42 PM
  Modified: Saturday, December 23, 2017, 10:31:22 PM
  Accessed: Monday, May 7, 2018, 6:42:42 PM
  Attributes: Archive

Streams
  Video: 00:33:10.600, 100.000 fps progressive, 1920x1080x32, AVC
  Audio: 00:33:11.253, 48,000 Hz, Stereo, AAC

ACID information
  ACID chunk: no
  Stretch chunk: no
  Stretch list: no
  Stretch info2: no
  Beat markers: no
  Detected beats: no

Other metadata
  Regions/markers: no
  Command markers: no

Media manager
  Media tags: no

Plug-In
  Name: mcmp4plug2.dll
  Folder: C:\Program Files\Sony\Vegas Pro 13.0\FileIO Plug-Ins\mcmp4plug2
  Format: MainConcept AVC/AAC
  Version: Version 13.0 (Build 453) 64-bit
  Company: Sony Creative Software Inc.

 

I do appreciate your investigation into this lag issue. Is it possible to change what decodes the videos? Please let me know if you need any other information.

 

Thanks,

Dave

Musicvid wrote on 5/7/2018, 8:58 PM

You should use ffmpeg anyway, to convert variable to fixed frame rate. Nick has you on the right course.

NickHope wrote on 5/8/2018, 1:28 AM

Actually the batch file I suggested would not convert variable frame rate to fixed frame rate. It just rewraps. I suggested it in the hope that ffmpeg might do something to the container that would improve playback.

I don't know why the file is getting decoded by mcmp4plug2.dll and not by compoundplug.dll, as would be expected for an AVC/AAC MP4 file.

Dave, the next advice depends on what you want to do with the files in Vegas, and what is your final delivery destination.

It would also be useful if you could share a file on a cloud service (e.g. on Dropbox, Google Drive, OneDrive, mega.nz, wetransfer.com or mediafire.com) for others to test.

dave-d wrote on 5/8/2018, 7:09 AM

Nick,

Final delivery destination is a simple .mp4 for my computer. No DVD, no youtube...just some basic editing, transitions, music, etc.

The file is about 4 Gb. I can certainly put this on the cloud should you want to look at it. Do you have an e-mail I can send you the link to?

Your help is much appreciated!

Dave

 

 

 

NickHope wrote on 5/8/2018, 11:55 AM

So the next thing to try is to convert it. You can try to do that directly off the Vegas Pro timeline. I would use the MainConcept AVC encoder. Refer to this post to get good quality: https://www.vegascreativesoftware.info/us/forum/faq-how-can-i-improve-the-quality-of-my-avc-h-264-renders--104642/

Alternatively you could do it externally. That same post refers to that, or you could try an external converter such as Handbrake or Xmedia Recode. The latter is a GUI for FFmpeg. In either of those cases I suggest you encode with the x264 encoder and use constant quality in the range 18-23. Lower number is higher quality. And I suggest you use AAC audio at 192kbps. And specify constant framerate if you have the option. Links to those converters are in section 8 of this post: https://www.vegascreativesoftware.info/us/forum/faq-how-can-i-improve-the-quality-of-my-avc-h-264-renders--104642/

If you have trouble with that, I could take a look at the file. I'll send you my email address by personal message.