• Most new users don't bother reading our rules. Here's the one that is ignored almost immediately upon signup: DO NOT ASK FOR FANEDIT LINKS PUBLICLY. First, read the FAQ. Seriously. What you want is there. You can also send a message to the editor. If that doesn't work THEN post in the Trade & Request forum. Anywhere else and it will be deleted and an infraction will be issued.
  • If this is your first time here please read our FAQ and Rules pages. They have some useful information that will get us all off on the right foot, especially our Own the Source rule. If you do not understand any of these rules send a private message to one of our staff for further details.
  • Please read our Rules & Guidelines

Converting multiple pieces of footage to a single framerate

The Scribbling Man

Tenant of the Tower of Flints
Staff member
Donor
Faneditor
Messages
4,644
Reaction score
2,416
Trophy Points
148
Not a fanediting project, but hopefully something that peeps can help me with. I have not yet had to work with different framerates in fanediting, but I currently have a non-fanedit project I need to work on and have been given multiple pieces of footage (mp4) from different gopros that were unfortunately filmed at different framerates - not ideal, but it is what it is. These are the different framerates:

23.976 (the bulk)
29.970
50
80

Basically, I need to drop all these files into vegas and do some multi-cam style editing switching between the different cameras. What I don't want to happen (and would expect to happen) is to let Vegas handle the different framerates and potentially render out with flashframes or glitches because it's interpereting the footage differently on the timeline to when rendering. I've had a former project that i wasn't too concerned about frame blending etc. and just needed to get done ASAP, and that was exactly the issue I had. Naturally, I'd like to prevent that from happening and generally learn to work with multiple framerates properly, should it become relevant again.

My first thought was to index the file and use virtual dub, but if that is the way I'm not sure I went about it quite right because I kept getting errors. I'm also assuming there's potential for the higher framerates to basically become slow motion once converted... I wouldn't be sure how to avoid this either. 

Any thoughts? Tips?
 

DigModiFicaTion

DᴉმWoqᴉԷᴉcɑꓕᴉou
Staff member
Faneditor
Messages
8,609
Reaction score
3,508
Trophy Points
168
You can manually change the undersample rate to match the framerate. Right click on the video file>properties>media>set undersample rate.
29.97 set at 0.8 will align it with 23.976
just mess around with the rate until it matches. I'm sure some purests would cry foul, but it's worked for me pretty seamlessly.
 

Malthus

Well-known member
Donor
Faneditor
Messages
1,599
Reaction score
1,632
Trophy Points
148
Why not convert all files to the say frame rate using Handbrake? I've had to do that when working with pal and NTSC sources.
 

The Scribbling Man

Tenant of the Tower of Flints
Staff member
Donor
Faneditor
Messages
4,644
Reaction score
2,416
Trophy Points
148
DigModiFicaTion said:
You can manually change the undersample rate to match the framerate.

Thank you! I will give that a go.

Malthus said:
Why not convert all files to the say frame rate using Handbrake? I've had to do that when working with pal and NTSC sources.

I have no idea how trustworthy handbrake is in that regard, but my first thought against using it is that it would also compress the file, which is something I would want to avoid prior to editing.
 

Malthus

Well-known member
Donor
Faneditor
Messages
1,599
Reaction score
1,632
Trophy Points
148
The Scribbling Man said:
I have no idea how trustworthy handbrake is in that regard, but my first thought against using it is that it would also compress the file, which is something I would want to avoid prior to editing.

Fair enough, there are a variety of settings that you can change in regards to compression and the like. It's fast become my one stop shop for all conversion needs both video and audio. Personally I've not noticed any noticeable quality drops except when I inadvertently changed the bit rate. Good luck with your project
 

The Scribbling Man

Tenant of the Tower of Flints
Staff member
Donor
Faneditor
Messages
4,644
Reaction score
2,416
Trophy Points
148
I do use handbrake, but usually just for video compression after rendering. It may well be an OK option; I'm just wary of resorting to a video converter for adjusting framerate, especially when I'm already working with a lossy format. Thanks though!
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
Change the frame-rates with AviSynth.  The bulk of your footage is 23.976fps, but as you are in a PAL area and this is not a fanedit, 25fps is a possibility depending on the intended delivery format; please give details as to this.  I assume that this if for work.  Are you sure that there are 50fps and 80fps clips?  The former is possible, but I'm dubious about the latter.  Can you upload them for me and PM me the links so I can take a look at them?
The Scribbling Man said:
I'm also assuming there's potential for the higher framerates to basically become slow motion once converted... I wouldn't be sure how to avoid this either.

There is such potential.  You avoid it by changing the frame-rate in a way that doesn't change the duration: blending, decimating, interpolation.

EDIT:  Do these clips have audio that needs adjusting or are you building the soundtrack from scratch?
 

The Scribbling Man

Tenant of the Tower of Flints
Staff member
Donor
Faneditor
Messages
4,644
Reaction score
2,416
Trophy Points
148
Captain Khajiit said:
Change the frame-rates with AviSynth.  The bulk of your footage is 23.976fps, but as you are in a PAL area and this is not a fanedit, 25fps is a possibility depending on the intended delivery format; please give details as to this.  I assume that this if for work. 

The video is a musical performance that I need to edit together, and what I create will be passed onto another person who will be collecting several videos and then putting them into a single video which will be uploaded for an online streamed event. From what I gather, the recipient is unlikely to know about framerate differences - or at least won't be concerned about them - and so there will probably be some innevitable imperfections in their final video.

All they've requested is that it be a 720p or 1080p, landscape oriented MP4. Since it's not going on a DVD, it shouldn't need to be 25fps. I think since most of the footage is 23.976 and the same was the case with a similar previous project, I feel like it might be a safe bet to keep it that way.  

 
Are you sure that there are 50fps and 80fps clips?  The former is possible, but I'm dubious about the latter.  Can you upload them for me and PM me the links so I can take a look at them?

80fps seemed odd to me too, and there is only one clip at this framerate, whereas there are several at 50fps. I checked them using mediainfo, which is what I typically use to check these things.

Thank you for offering to look. There is a lot of footage to wade through, but I will upload the 80fps clip and one of the 50fps clips. They are basically one long recording from each camera which has been split into shorter chunks, so logic dictates that one clip from the same recording should be the same fps as the others from that recording.

 
EDIT:  Do these clips have audio that needs adjusting or are you building the soundtrack from scratch?

The video is being put to a seperate audio file that has already been mixed and mastered. It would be helpful to use the cam audio as a reference for timing up the visuals with the final audio, but that is all. They don't need to sound good.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
The Scribbling Man said:
I think since most of the footage is 23.976 and the same was the case with a similar previous project, I feel like it might be a safe bet to keep it that way.

Understood.  The reason I mentioned 25fps is that if your clips really are 50fps, you could make them 25fps by discarding every other frame and retain evenly spaced motion-increments, and then integrate them with the other footage with minor speed adjustments.  Neither 80 nor 50 decimates evenly to 23.976, so motion is going to suffer somewhat; but as it's a music video, the audio takes precedence, and it's not likely to be as noticeable as it would be in a film.  It's a bit odd that someone would record at high frame-rate for this sort of content, but you deal with what you get sometimes.
 
There is a lot of footage to wade through, but I will upload the 80fps clip and one of the 50fps clips.

That should be all I'd need.
 
The video is being put to a seperate audio file that has already been mixed and mastered.

That's of immense significance; it will make things much easier.
 

TM2YC

Take Me To Your Cinema
Staff member
Donor
Faneditor
Messages
14,869
Reaction score
2,379
Trophy Points
228
@"Captain Khajiit" knows best but here's my penny worth...

If these will be short edits/clips in a montage then slowing down, or speeding up the footage slightly and the resultant increasing/decreasing audio sync issues the longer the clips play will be undetectable. You just need it to be close and have it converted cleanly. So...

- If you decimate the 50 by half, you get 25. Then slow that down to 23.97fps in VirtualDub.
- If you decimate the 80 by four, you get 20. Then speed that up to 23.97fps in VirtualDub.
- Then de-interlace the 29.970 (right?) to get progressive 23.97fps, again in VirtualDub.

I'm probably talking rubbish :D .
 

addiesin

Well-known member
Messages
5,888
Reaction score
1,502
Trophy Points
163
Just wanted to suggest a possible origin of the 80fps footage. You said the footage came from GoPro cameras, and possibly similar "action" cameras of other brands I assume. One probably has some built in slow motion/high frame rate option and whoever was filming probably turned it on either accidentally or to test it out or maybe they really had a good slowmo shot in mind. That's my theory. My phone can do this, not sure what the frame rate ends up being but I imagine it's similar on the camera.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
TM2YC said:
I'm probably talking rubbish :D .
No, that's pretty much what I was going to suggest for 23.976fps output.  :)  But first I'd like to ascertain whether the non-23.976fps clips are true 50fps/80fps (no duplicates/combing/incorrect metadata, etc) before decimation.  The 29.97fps clip might not be telecined, so it would be good to get a look at that as well.
 

Captain Khajiit

Well-known member
Donor
Messages
2,685
Reaction score
8
Trophy Points
48
@The Scribbling Man
Thanks for the clips!  They're an object lesson in why one shouldn't infer the best of way of handling a clip from its frame-rate/metadata.  The audio streams decode as 32-bit float, so I've converted them to 16-bit.  Let's take them one at a time.  You'll need ffms2.

80fps

The 80fps clip really is 80fps.  It has the infamous GoPro blur.  There's so little motion and so many frames with which to play that given what you've told me about client expectation, I'd honestly perform a straight decimation to 23.976fps (no speed change).  I've encoded the result, and it looks fine.  No adjustment to the AAC audio is needed.
Code:
LoadPlugin("ffms2.dll")
FFMpegSource2("80fps.mp4",atrack=-1)
ChangeFPS(24000,1001)
ConvertAudioTo16bit()


50fps

The 50fps clip is really 25fps with every frame doubled, so we discard every other frame without loss of temporal resolution and then apply NTSC slowdown to 23.976fps, adjusting the audio to keep it in sync.  It's Quicktime audio, which decodes to 32-bit, so the script converts to 16-bit after resampling, which is necessary to compensate for the rate change that's a consequence of the slowdown.
Code:
LoadPlugin("ffms2.dll")
FFMpegSource2("50fps.mp4",atrack=-1)
SelectEven()
AssumeFPS(24000,1001,sync_audio=true)
ResampleAudio(48000)
ConvertAudioTo16bit()

29.970fps

As I suspected it might be, the clip is genuine 29.970fps, so deinterlacing/IVTC would have been the wrong approach  The slowdown from 29.970fps to 23.976fps is a substantial one, and the motion of the clip is of a slow nature, so let's try a straight decimation to 23.976fps to start.  The clip is 4k, so let's resize to 1080p.
Code:
LoadPlugin("ffms2.dll")
#29.970fps 4k
#Quicktime audio
FFMpegSource2("29.970fps.mp4",atrack=-1)
ChangeFPS(24000,1001)
Spline36Resize(1920,1080)#convert to 1080p
ConvertAudioTo16bit()

If you are working with 24-bit audio, change ConvertAudioTo16bit() to ConvertAudioTo24bit() throughout.  Similarly, if you are working at 44.1 kHz, change the scripts to ResampleAudio(44100) where appropriate.

Let me know if you are not happy with the result of any of the scripts.  I'm more than happy to take a second look. :)
 
Top Bottom