Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!

Converting AVCHD 50i to mp4 50P.

1. Hi,

I have been trying and trying to figure out how to convert some .mts clips into .mp4 using a double deinterlace filter and I seem to be doing something wrong.

I have tried Adobe Media Encoder, Premiere Pro, and VirtualDub. I'm not confident at all with command line applications and would like to steer clear if possible.

The problem I have is that I get duplicate frames.

Even when exporting via virtualdub, despite adding a filter using YADIF "double frame rate, TFF". Plenty of forum posts around the web indicate that this should do what I need.

I have tried bob filter the same way and both top and bottom frame first.

In Media encoder I get the same problem with all 3 of the time interpolation options.

I have some software (dartfish) that can open and deinterlace these files for playback with little to no artifacts at 50P. I can't rely on this software though because other people need to be able to play the clips with 0.02s resolution. Also the reduced filesize is important.

Going mildly insane at this point so any help would be appreciated.

Thanks,
2. Then your source is probably encoded interlaced but has progressive frames. Is this from a movie or something else shot on film? Upload a short sample of the source.
3. Ok, I uploaded one of the files here;

http://www.filehosting.org/file/details/526950/Source%20Sample.MTS

If you could have a look that'd be appreciated.

Thanks
4. The video looks very much progressive, even though it says it's interlaced. So any bobbing deinterlacing will just create duplicate frames, as you are experiencing.
5. I not going to give my email address to filehosting.org just to download a file. I tried using mailinator.com but they wouldn't accept that.
6. Right, sorry, just google'd filehosts and used the first one.

Do you have a preference?
7. You can upload files up to 500 GB directly to this site. See the "Upload files/Manage attachments" below the edit boxes. But given KarMa's response I don't think you need to bother. Unless you want a second opinion.
8. Originally Posted by jagabo
I not going to give my email address to filehosting.org just to download a file. I tried using mailinator.com but they wouldn't accept that.
Worked with http://www.emailondeck.com
9. Originally Posted by infinifc
I'm not confident at all with command line applications and would like to steer clear if possible.
That's a shame, because a simple Avisynth script opened in Virtualdub could probably solve your problem with duplicate frames. (50fps sample of your clip attached)

You could even take it one step further and de-shake the file as well - although with the rolling shutter, and the extreme cropping needed to hide the borders, that might be a step too far with this clip. (Second clip shows results of that idea)
10. Did you interpolate from 25 --->50fps pippas? Something like http://compression.ru/video/frame_rate_conversion/index_en_msu.html
11. Originally Posted by KarMa
Did you interpolate from 25 --->50fps pippas? Something like http://compression.ru/video/frame_rate_conversion/index_en_msu.html
Yes, I doubled the frame rate with interpolated frames - although I used MVTools instead. The Avisynth script is quite simple (copy attached)

I actually prefer to convert clips like this to an intraframe format first - Grass Valley HQX usually - hence the use of an AVISource first line.

I'm sure it's probably just as easy to do something similar with the original MTS file directly....
12. Yes, you can tell the video was motion interpolated to twice the original frame rate -- watch the lights and vertical lines on the wall starting around frame 125. In every other frame (the frames created by MVTools) you can see distortions that MVTools generated when it analyzes the motion incorrectly:

Here's pippas' script as a callable function:

Code:
function DoubleFPS(clip source)
{
super = source.MSuper(pel=2)
backward_vec = MAnalyse(super, overlap=0, isb = true, truemotion=true, search=3)
forward_vec = MAnalyse(super, overlap=0, isb = false, truemotion=true, search=3)
source.MFlowFps(super, backward_vec, forward_vec, num=2*FramerateNumerator(source), den=FramerateDenominator(source))
}
Call it like this:

Code:
import("\path\to\DoubleFPS.avs")

AVISource("C:\Videos\bikes\Source Sample.avi")
DoubleFPS()
I have several variations of this DoubleFPS script. Some work better on some videos, some on others.
13. Yes there is a a large degree of movement as part of the fast pan around frame 125, so it's perhaps not surprising that MV tools simply can't make a really accurate assessment to interpolate a single new frame with such diverse differences in the frame either side.
As jagabo says, there are several variations that can be made within that script that will work better with different clips. Changing the overlap values for example, and/ or the pel values and so on.

I tried an experiment with one clip that included a section that was slowed down by 10x . So there were 9 'new' frames interpolated by MV Tools, in between every original frame.. (sample attched of that clip)
Because there was no excessive individual dramatic movments, it was possible to remove most artifacts by changing the parameters. The vertical metal stanchions on the far bank, for example, produced some strange distortions, if the overlap settings were different.
With the final values chosen, I can't see any obvious problems there, but if I'm honest, it's not a particularly challenging example....

I don't think the MV Tools is any better or worse than the commercial equivalents - like Twixtor for example - when it comes to errors in these 'estimated' frames?

There's still no substitute for shooting at 500fps if you can afford to ...and if there's enough light! Or, spending some time experimenting on your standard frame rate clips, if you do need to use optical flow interpolation to create your 'slomo'
14. Hi,

if it would be convenient for you to use ffmpeg ...

Code:
ffmpeg -i source_sample.MTS -aspect 1920:1080 -vf yadif,scale=1920:1080 -c:v libx264 -preset fast -profile:v high -crf 23 -ac 2 -strict experimental -c:a aac -b:a 96k -movflags +faststart -y source_sample.mp4
Sample attached.

Regards
fornit
15. Originally Posted by fornit
Hi,

if it would be convenient for you to use ffmpeg ...

Code:
ffmpeg -i source_sample.MTS -aspect 1920:1080 -vf yadif,scale=1920:1080 -c:v libx264 -preset fast -profile:v high -crf 23 -ac 2 -strict experimental -c:a aac -b:a 96k -movflags +faststart -y source_sample.mp4
Sample attached.

Regards
fornit
I have downloaded your file, but it shows here as 25fps. I'm guessing you meant to upload a 50fps version, which is what the OP is looking for?...
16. Originally Posted by pippas
Originally Posted by fornit
Hi,

if it would be convenient for you to use ffmpeg ...

Code:
ffmpeg -i source_sample.MTS -aspect 1920:1080 -vf yadif,scale=1920:1080 -c:v libx264 -preset fast -profile:v high -crf 23 -ac 2 -strict experimental -c:a aac -b:a 96k -movflags +faststart -y source_sample.mp4
Sample attached.

Regards
fornit
I have downloaded your file, but it shows here as 25fps. I'm guessing you meant to upload a 50fps version, which is what the OP is looking for?...

You're right - I forgot "=1" at yadif.

Now it should fit.

Code:
ffmpeg -i source_sample.MTS -aspect 1920:1080 -vf yadif=1,scale=1920:1080 -c:v libx264 -preset fast -profile:v high -crf 23 -ac 2 -strict experimental -c:a aac -b:a 96k -movflags +faststart -y source_sample2.mp4
17. Originally Posted by fornit

You're right - I forgot "=1" at yadif.

Now it should fit.
Yes, now it's 50fps -- but unfortunately it just has duplicate frames - and getting rid of that problem is why the OP started this thread!...
18. Hm,

that's an interesting question. From my understanding "yadif=1" should use a motion weighted algorithm to turn 50i material into true 50p.

I've just created an output of the first 6 frames of "source_sample2.mp4". See the attachment.

Please note that filesize is different for each frame.

Regards
fornit
19. Even though OP's video says it's interlaced, it's really just 25fps progressive. So yadif will just duplicate frames, when doubling to 50fps.
20. Originally Posted by KarMa
Even though OP's video says it's interlaced, it's really just 25fps progressive. So yadif will just duplicate frames, when doubling to 50fps.
Thank you for your hint. The video indeed says it's interlaced. But if you watch it without any deinterlacing filter it really looks very progressive.

Of course, yadif cannot do frame interpolation for progressive footage.

Regards
fornit
21. mediainfo says it's 25i not 50i. and it looks like 25p not 25i on viewing. i'd try re-encoding to 25p and see if it works for everyone you need it to. like this.
22. 25i and 50i are the same thing. Marketing dweebs just decided the bigger number sounds better.

Like I said in the second post of this thread, the video is encoded interlaced but contains progressive frames.
23. Originally Posted by jagabo
.........the video is encoded interlaced but contains progressive frames.
......which is why I used frame interpolation to create a sample 50p version in post #9. That was what the OP was hoping to do - 50p without frame duplication.

The thread seems to have done another complete 'circuit' since then...... and as the OP hasn't visited since his last post 4 days ago, I'm guessing he has found another option anyway?......
24. One other option is to add blended frames between the existing frames, ie, a 50:50 mix of the frame before and the frame after. Some editors do that. But I find it to be one of the ugliest methods.

Statistics