Log in

View Full Version : How to insert filler between two video files?


TrevorS
18th August 2014, 03:40
What I'm doing is appending one 720x480 29.97fps video file to another (MPEG 1/2), but I need a ~9sec filler (intermission) in-between in order for the soundtrack to sync. I guess potentially I could fill the gap with slices of a quiet black segment from one of the existing files, or I could create a black color segment and render it to match, but I don't know what free tools are available to do either of those things. I prefer not to have to buy an editor package for this. If I can create that short file in Mkv format, then MkvMerge could append them. The sound track is DTS. Would appreciate a little guidance. Thanks!

poisondeathray
18th August 2014, 04:32
What I'm doing is appending one 720x480 29.97fps video file to another (MPEG 1/2), but I need a ~9sec filler (intermission) in-between in order for the soundtrack to sync. I guess potentially I could fill the gap with slices of a quiet black segment from one of the existing files, or I could create a black color segment and render it to match, but I don't know what free tools are available to do either of those things. I prefer not to have to buy an editor package for this. If I can create that short file in Mkv format, then MkvMerge could append them. The sound track is DTS. Would appreciate a little guidance. Thanks!

Couldn't you just cut the audio?

All 3 have to be the same specs. So I take it the 1st and 3rd are both MPEG2, 29.97, 720x480, DTS audio ?

Mediainfo (view=>text) can provide some details of the videos

TrevorS
18th August 2014, 06:37
I dug out my old copy of VideoStudio 8.0 and was able to create a long enough black color mpeg file to play with (no audio) and on the surface it matches the specs of the two halves, but MkvMerge says the parameters are inconsistent -- I'm wondering if that could be because the solid color segment is 4:3 whereas the others are 16:9, I can't control that (the Editor is fixed 4:3.) The bitrate's different too, but it's solid color and to be expected. All three are MPEG2, 29.97, 720x480 4:2:0 YUV.

The original audio is a lower bitrate DTS, I strip it out and replace it via MkvMerge. I could probably cut out a segment of the audio track using DTStrim, but frankly, it would be artistically better with a brief break between the halves, the combined video is long and the midpoint image shift is huge.

I could try stripping all the audio out before merging in the color segment, maybe the 16:9 4x3 juxtaposition isn't a problem. Yes, I do have MediaInfo installed, that's where I'm noticing that frame ratio difference. [EDIT -- Just tried this and it still fails due to chapter numbering inconsistency with the color file]

poisondeathray
18th August 2014, 14:21
There is a free DTS encoder, dcaenc. You can access it with standalone binary or through ffmpeg

For the video, you need can find out information with gspot (interlaced? GOP size? b-frames?) . If you need more help, post the information from mediainfo and gspot.

You can encode mpeg2 with specific settingswith hcenc, or ffmpeg

Or try appending them as a mpeg2 program stream (.mpg) with videoredo, or as a transport stream with tsmuxer

manolito
19th August 2014, 18:54
You can create a blank filler clip with AviSynth.

YourSourceFilter("YourSource.mpg")
video=last
blank=BlankClip(video, length=Framerate(video) * [Desired_Length in secs])
combined=video ++ blank
return combined


Cheers
manolito

TrevorS
21st August 2014, 01:45
Thanks for the help fellows, will have to see how things go.