stiching avc file together without re-encoding

colin-anderson wrote on 2/2/2018, 5:57 PM

Hi,

If I drop several MAGIX/AVC rendered files on a single timeline in Vegas Pro 15 and render in the same output (MAGIX/AVC, VBR), Will Vegas pro smart render or will it re-encode? I would render in m2ts and use TsMuxer to merge the files together but, for whatever reason, I get artifacts around text objects when I render in AVCHD in Vegas Pro.

 

Thanks for the input

Comments

Musicvid wrote on 2/2/2018, 6:10 PM

Yes it will re-encode in Vegas; you want a muxer, not an encoder, which is different under the hood.

My choice is Videoredo, which has a free trial. Another paid solution is TSDoctor.

Freeware muxers including TSMuxer and AVIDemux just stitch the files without GOP or stream error correction, which can murder files, particularly Transport Streams beyond usability in an editor.

colin-anderson wrote on 2/3/2018, 8:17 AM

Thanks Musicvid, I'll give it a try.👍

Peter_P wrote on 2/3/2018, 8:24 AM

Quite a while ago I wrote this tool: AVCmerge to merge the AVC files and edit them in Vegas. Others used it to stich their files for playing.

colin-anderson wrote on 2/3/2018, 8:44 AM

Hi Peter and thanks for your work. Sadly, I'm working in NTSC and it says your tool is only for PAL.

Peter_P wrote on 2/3/2018, 11:22 AM

Yes it is fixed to work with PAL footage - sorry.

colin-anderson wrote on 2/14/2018, 9:02 PM

Yes it will re-encode in Vegas; you want a muxer, not an encoder, which is different under the hood.

My choice is Videoredo, which has a free trial. Another paid solution is TSDoctor.

Freeware muxers including TSMuxer and AVIDemux just stitch the files without GOP or stream error correction, which can murder files, particularly Transport Streams beyond usability in an editor.


Hi, I tried to load an Mainconcept AVC file (.avc file extension) into Videoredo and it can't open it. I also tried TSDoctor and it is not a valid stream format. Do you have any other suggestions?

Thanks.

wwaag wrote on 2/14/2018, 10:11 PM

Another option is TMPGEnc's MPEG Smart Renderer 5.

Here's the link. http://tmpgenc.pegasys-inc.com/en/product/tmsr5.html

I only have version 4, but it works well. Good for AVC smart-renders.

P.S. Just re-read your post. The problem with VideoReDo may be the use of the avc file extension which generally indicates an elementary stream. Try rendering to MP4 instead, regardless of whether you have an audio stream. Then try again in VRD.

 

Last changed by wwaag on 2/14/2018, 10:22 PM, changed a total of 1 times.

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.

colin-anderson wrote on 2/15/2018, 5:33 AM

Hi wwaag, I cannot render in MP4 because my footage is interlaced and it's for blu ray. It needs to be DVD Architect compliant. I'll try TMPGEnc's MPEG Smart Renderer 5 and report back.

fr0sty wrote on 2/15/2018, 6:24 AM

Chances are, any stitching you do will just be required to re-encode in DVDA anyway. That program will make you re-encode your video if you have on the wrong color shirt when you load it in. Any excuse it can find to make you re-encode, it takes it. GPU accelerated video encodes? No. Higher (or lower) bitrate than the stock 25 or 16mbps presets? No. Not unless you do the encode (very slowly) within DVDA. It is the most strict disc authoring app I've ever used.

Last changed by fr0sty on 2/15/2018, 6:26 AM, changed a total of 2 times.

Systems:

Desktop

AMD Ryzen 7 1800x 8 core 16 thread at stock speed

64GB 3000mhz DDR4

Geforce RTX 3090

Windows 10

Laptop:

ASUS Zenbook Pro Duo 32GB (9980HK CPU, RTX 2060 GPU, dual 4K touch screens, main one OLED HDR)

colin-anderson wrote on 2/15/2018, 6:28 AM

Hi wwaag, thanks for suggesting MPEG Smart Renderer 5. It seems to work. Still have to figure out why I'm ending up with an extra frame at the end but so far so good. And it's DVD Architect compliant! Thanks!

john_dennis wrote on 2/15/2018, 2:34 PM

Colin, Using VideoReDo TVSuite 5, I was able to combine .avc segments rendered from Vegas 14 with the Mainconcept AVC Blu-ray template. It's a convoluted process and even I would be resistant to doing it every day as part of my workflow. I didn't have any extra or missing frames at the end of the process, which was a round-trip through DVD Architect back to the original Vegas Pro 14 timeline. DVD Architect didn't re-encode the combined file. Your chapter markers could be encoded into the audio stream by changing an internal setting in DVD Architect. That's often the way I roll, anyway. 

This epic has satisfied my intellectual curiosity for at least the next month. I may go on vacation after this.

GJeffrey wrote on 2/15/2018, 7:42 PM

Try avidemux, it's free

colin-anderson wrote on 2/16/2018, 6:12 AM

Wow John thanks a lot for doing this! I'll give it a whirl and report back. Btw, how did you demux the audio from the video in Videoredo so that you had your separate audio and video to import in DVDA? And is it necessary to mux each clips (audio and video) before joining them together? What if I joined just the video together and then render the entire audio as a single file. Would they still sync?

Thanks!

john_dennis wrote on 2/16/2018, 9:37 AM

"Btw, how did you demux the audio from the video in Videoredo so that you had your separate audio and video to import in DVDA?"

I didn't. VideoReDo included the audio in the remux of Segment 1.m2ts, Segment 2.m2ts and Segment 3.m2ts as .aac, but DVD Architect 5.2 didn't know how to handle it and showed no available audio when the Combined in VideoReDo.m2ts file was imported. I then replaced the audio track with the full LPCM audio track that I rendered first, Split Me.wav.  

"And is it necessary to mux each clips (audio and video) before joining them together?"

Muxing the .avc and .wav files was necessary to get the files through VideoReDo. It refused to deal with .avc without an audio stream. In addition, the Mainconcept Blu-ray template is very rigid and won't allow one to include audio when rendering.

"What if I joined just the video together and then render the entire audio as a single file. Would they still sync?"

Possibly, but it's better to render from the original Vegas timeline because of the encode to .aac mentioned earlier. Also, you have all your chapter markers in the Vegas project that can be included in the audio file to move to DVD Architect. 

john_dennis wrote on 2/16/2018, 12:19 PM

"Try avidemux, it's free"

Musicvid wrote on 2/16/2018, 4:22 PM

AVIDemux will cocatenate like a dos command, not heal discontinuous GOPs.

If it works in Vegas without hiccups, no need for the paid solution.

colin-anderson wrote on 2/16/2018, 5:46 PM

Hi again John. I tried to join the avc files without audio but it's not possible. Do you know if Videoredo's joiner tool does so without re-encoding? I'm wondering as we must specify the output file format (.ts, .m2ts, .mpeg...), and there is no .avc option. Also, a test showed that the bitrate changed. The original Mainconcept file from Vegas was 25Mbps vbr and the output m2ts file from Videoredo is 16Mbps. If it doesn't re-encode, then I'll surely put up with the exhaustive process of multiplexing each clips with their respective audio file, which I'll have to render for each sections as I had only rendered the entire audio as a single file. Then join all clip together and then demux the audio in ts muxer so that I'm left with the joined video file and my original ac3 audio file. Bringing those two into DVDA means no re-encoding.

Thank you.

john_dennis wrote on 2/17/2018, 3:18 AM

"I tried to join the avc files without audio but it's not possible."

 

That's why I rendered the .wav files. They're just throw-away files. They won't be used for anything except getting VideoReDo to combine the files in its Joiner.

"Do you know if Videoredo's joiner tool does so without re-encoding?"

Based on these tests, there was no indication of re-encoding as the files were joined. There might have been a few video frames as the program spliced the files together, but, there wasn't enough activity to produce the normal indication:

 You should select Profile:

"Also, a test showed that the bitrate changed."

For my .avc and .m2ts files the Mediainfo looked like this.

colin-anderson wrote on 2/22/2018, 6:33 AM

Hi John, sorry for the delayed response. So I tried the procedure. The multiplexing part works as expected. The problem arises when I join the files together. The audio glitches right at the point of junction, like a scratch noise for a half second. Any way to fix that? I tried a different method using TMPGEnc Smart Renderer to stich the files together and then muxing the output video file with the complete audio file rendered from Vegas, but the audio goes out of sync towards the halfway point of the video.

john_dennis wrote on 2/22/2018, 9:50 AM

Render the complete audio timeline from Vegas Pro and replace any audio that you have in DVD Architect.

Musicvid wrote on 2/22/2018, 2:26 PM

Can you prepare blurays with audio, m2ts or iso, first in Architect, then queue and stitch those in VRD?

Used to do this with DVD elementary streams quite a lot in old vrd.

colin-anderson wrote on 2/22/2018, 5:26 PM

Render the complete audio timeline from Vegas Pro and replace any audio that you have in DVD Architect.


Hi John. Yeah, I tried that. That's how I first noticed that the audio was off. I'll try this: I'll multiplex all sequences through VRD. Then join them together and strip the audio out and remux the full audio render from Vegas.

karma17 wrote on 2/22/2018, 6:33 PM

I am very curious about the OP's question. To follow up, if okay:

When would smart Re-Sample come into play then? I always thought it would not re-encode if output format was the same as the input format.

And to OP, if Vegas were to re-encode the AVC clips, how much degradation in quality is actually visible?

For long projects, it always made more sense to me to render out the project in highest quality AVC clips, then bring them back and render again on a longer master timeline versus messing around with a bunch of .veg files. But for some reason, I thought they were being smart resampled or at least, the re-encoding cause minimal, if any, loss of noticeable quality.

I thought that if your source input matched your output (same frame rates, codec, wrappers, etc,,,e,g, AVC Intra mxf etc), then files were largely left intact and not recompressed or re-encoded. Kind of like when you rendered out of Vegas in a format DVDA likes, it doesn't recompress it again. Or am I confusing recompression with re-encoding?

john_dennis wrote on 2/22/2018, 8:38 PM

Musicvid said:

"Can you prepare blurays with audio, m2ts or iso, first in Architect, then queue and stitch those in VRD?"

I tried it that way with avc and it doesn't look promising. There appears to be one frame missing for each segment in DVD Architect.

Then, if you use LPCM audio, as I usually do, VideoReDo TVSuite 5 refuses to handle the audio stream for the file generated by DVD Architect in an .m2ts wrapper.

Using VideoReDo TVSuite 5 combined video with the Vegas Pro timeline audio shows no lost frames in DVD Architect.

The roundtrip shows no difference in length of the VideoRedo combined video + Vegas timeline rendered audio when taken from the DVD Architect ISO and placed back on the original Vegas Pro project timeline.

There are no audio gaps at the two cut points:

Summary:

It seems to work the way I described at first, but not combining in DVDA. At least with AVC.