Comments

NickHope wrote on 11/26/2014, 12:29 PM
The silence detection in the voice-over tool is absolutely brilliant. However, I have found a small bug with it...

If the voice-over is split into many events on the track, as mine usually is, and the duration of the "quiet" part at the start or end of an event is shorter than the "Min Duration", the fade incorrectly starts from the end of the event rather than from the point at which the volume passes the threshold.

Here is a simple project that illustrates this. The "silence" at the end of the events on track #2 is 10 frames in a 24p project, and therefore less than the 0.5 sec of the "Min Duration". The volume envelopes on the "music" tracks #3 and #4 were made using the Vegasaur defaults. They should be the same. If those silent ends are 12 or more frames there is no problem.

Unfortunately the problem arises many times in my projects as I routinely cut up my voice-over into short events with a fraction of a second silence at each end.
NickHope wrote on 11/27/2014, 3:11 AM
I've been testing the new smart trim feature with VP13.

It works beautifully for DV footage, where it is frame-accurate, for GH4 C4K .mov footage, where it seems to trim clips nicely to the next I-frame outside the wanted part of the clip. It also worked pretty well for Apple ProRes clips.

Unfortunately it is not working with HDV .m2t clips (captured with HDVSplit), or AVC .m2ts clips from my Sony RX100. For DNxHD 444 10-bit I got audio only.

The one format I'd really like this to work for is 4k .mp4 clips from my GH4. When I try that I just get a tiny unplayable .mp4 file. The Smart Trim Log is below.

altarvic, I'm more than happy to work with you to get this working for more formats, either by testing or by providing sample media.

SMART TRIM


Copying 'E:\0-capture-GH4\20140820\P1010122.MP4' to 'D:\0-Vegas-projects\Vegas-Pro-12-13\SmartTrim\P1010122 [14,62 - 19,32].MP4'
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\0-capture-GH4\20140820\P1010122.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2014-08-20 19:18:13
Duration: 00:00:34.03, start: 0.000000, bitrate: 78579 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 3840x2160 [SAR 1:1 DAR 16:9], 76981 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
[mp4 @ 0000000009210900] Could not find tag for codec pcm_s16be in stream #1, codec not currently supported in container
Output #0, mp4, to 'D:\0-Vegas-projects\Vegas-Pro-12-13\SmartTrim\P1010122 [14,62 - 19,32].MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
encoder : Lavf56.3.100
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 76981 kb/s, 29.97 fps, 90k tbn, 90k tbc (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
Stream #0:1(und): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, stereo, 1536 kb/s (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
Stream #0:2(und): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2014-08-20 19:18:13
timecode : 02:07:07;05
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #0:2 -> #0:2 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred
NickHope wrote on 11/27/2014, 5:01 AM
While I'm at it, I'll post my settings for the voice-over tool. It took me ages and many attempts to get this right, but now this closely approximates what I've been doing manually. The silence detection feature is brilliant.


NickHope wrote on 12/16/2014, 6:55 AM
Feature suggestion!

Could the Render Assistant check if GPU acceleration is turned off in the video preferences, and be set to either turn it off, or prompt if it's on?

I have been caught out a couple of times recently where long renders failed because I had forgotten to turn GPU acceleration off before rendering.
OldSmoke wrote on 12/16/2014, 9:37 AM
@Nick

Which card are you using for GPU acceleration?

Proud owner of Sony Vegas Pro 7, 8, 9, 10, 11, 12 & 13 and now Magix VP15&16.

System Spec.:
Motherboard: ASUS X299 Prime-A

Ram: G.Skill 4x8GB DDR4 2666 XMP

CPU: i7-9800x @ 4.6GHz (custom water cooling system)
GPU: 1x AMD Vega Pro Frontier Edition (water cooled)
Hard drives: System Samsung 970Pro NVME, AV-Projects 1TB (4x Intel P7600 512GB VROC), 4x 2.5" Hotswap bays, 1x 3.5" Hotswap Bay, 1x LG BluRay Burner

PSU: Corsair 1200W
Monitor: 2x Dell Ultrasharp U2713HM (2560x1440)

NickHope wrote on 12/16/2014, 11:20 AM
On that occasion it was my AMD HD 6970. I was doing a big frameserved render in VP13 and it kept hanging at 6%. I think the GPU was to blame. Can't be sure. I could do some more testing.
OldSmoke wrote on 12/16/2014, 1:56 PM
I have now 2x R9 290 and had issues with it too, especially rendering. Like you, I was stuck at around 8-9%. I upgraded driver from 14.4 to 14.9 and even the latest 14.12, none solved the problem. I am now on driver 13.251 which I downloaded from the manufacturer website as the latest driver for my card. Guess what, all is working now.

Proud owner of Sony Vegas Pro 7, 8, 9, 10, 11, 12 & 13 and now Magix VP15&16.

System Spec.:
Motherboard: ASUS X299 Prime-A

Ram: G.Skill 4x8GB DDR4 2666 XMP

CPU: i7-9800x @ 4.6GHz (custom water cooling system)
GPU: 1x AMD Vega Pro Frontier Edition (water cooled)
Hard drives: System Samsung 970Pro NVME, AV-Projects 1TB (4x Intel P7600 512GB VROC), 4x 2.5" Hotswap bays, 1x 3.5" Hotswap Bay, 1x LG BluRay Burner

PSU: Corsair 1200W
Monitor: 2x Dell Ultrasharp U2713HM (2560x1440)

NickHope wrote on 12/16/2014, 11:47 PM
I assume you mean from ASUS, from looking at your system specs, for which you now need to update your driver version ;)

I checked Sapphire and they are linking to the same latest drivers for HD 6970 as AMD are. I am a couple of driver versions out of date so I may update and try that. I don't think I'm going to start going backwards on the off chance of a solution.
altarvic wrote on 2/6/2015, 3:10 AM
Vegasaur 2.1

1. Paste Event Attributes: Added support for Fade Ins/Outs
2. Replace Media: Introduced Match Media Properties option to automatically change the project settings to match the replaced media properties
3. Transcoder: Added support for DoStudio chapters
4. Voice Over:
- Added ability to save and restore settings using presets
- "Detect Silence" function can process audio from nested projects
5. Presets Manager: Save/Restore toolbar buttons
6. Automatic check for updates
7. Minor bug fixes and improvements

http://vegasaur.com/Vegasaur
NickHope wrote on 2/6/2015, 3:55 AM
Great updates. Thanks very much altarvic, especially for changes #2 and #4!

Panasonic GH4 UHD mp4 smart trimming is still just rendering a tiny unplayable file. Does it just work with intra-frame formats? I'm very happy to contribute media and test if there is any prospect of getting it working.

I was wondering if it might be more straightforward to create a function that simply trims the file to the nearest i-Frames outside the area to keep. You would get a slightly longer clip than needed but it might make the function more reliable and simple to code. Just a thought.
TeetimeNC wrote on 2/6/2015, 11:33 AM
+1 for #4. It is nice that you hear our requests for improvements and act on them!

/jerry
altarvic wrote on 2/12/2015, 8:36 AM
Nick,
Under the hood, Smart Trim uses FFMpeg for actual trimming, so... obviously ffmpeg does not support Panasonic GH4 mp4 files...
wwaag wrote on 2/12/2015, 9:40 AM
It also doesn't work with m2ts (1080 60P) files from a Sony Handycam. The trimmed file is shorter than the event length on the timeline.

wwaag

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

NickHope wrote on 9/21/2015, 2:49 PM
altarvic, having still not found a way to smart render GH4 footage in a batch, I've been doing some more testing and it looks like the problem is with the PCM audio that is in the GH4 MP4 files. PCM is not supported in MP4 output in ffmpeg.

I've found that I can get success by ignoring the audio (which doesn't matter for much of my footage), for example:
ffmpeg -ss 00:00:02.603 -i input.MP4 -an -c copy -to 00:00:17.384 output.mp4


...or by transcoding the audio to aac, only smart rendering the video:
ffmpeg -ss 00:00:02.603 -i E:\source.mp4 -acodec libvo_aacenc -q:a 100 -vcodec copy -to 00:00:17.384 E:\output-ffmpeg-libvo.mp4


Actually the best aac encoding available in ffmpeg is apparently with the Fraunhofer FDK AAC codec library, which requires compiling ffmpeg yourself.

So I was wondering if it would be possible to give us a couple more additional options in the Smart Trim dialog: "Render video only" (which invokes -an), and "Transcode audio to aac"?
musicvid10 wrote on 9/21/2015, 4:34 PM
Can you remux the original pcm back in with mp4box?
NickHope wrote on 9/25/2015, 4:27 AM
@musicvid Unfortunately not. I managed to get a wav file out using ffmpeg but it wouldn't mux it into an mp4 container. The official mp4 still doesn't support pcm audio. mp4box won't even remux the .h.264 and .twos files that it demuxes from the original mp4. I failed with FFmpeg too.

However I've today discovered that pcm audio is allowed with h.264 video in a mov container, and it's pretty easy to rewrap .mp4 as .mov in ffmpeg:

ffmpeg -i source.mp4 -c:v copy -c:a copy output.mov


The files aren't frame accurate (2 duplicate static frames at each end) but otherwise the video quality is untouched, the pcm audio is fully intact, they play nicely on the timeline, and Vegasaur will smart trim them. Unusual things happen at the ends of the trimmed file (extra length and duplicate or even reverse frames), but the section that you wanted to keep is preserved.

A simple command line to trim and rewrap to mov would be this:

ffmpeg -ss 00:00:02.603 -i E:\source.mp4  -codec copy -t 00:00:17.384 E:\output.mov


This would seem to make it more sensible to shoot MOV/LPCM rather than MP4/LPCM if you want to smart trim with Vegasaur or FFmpeg.
NormanPCN wrote on 9/25/2015, 11:03 AM
Maybe MP4 only supports PCM audio in the newer mp42 container spec.

ffmpeg only supports mp41/isom output. mp4box defaults to mp41/isom.