VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 24 of 24
Thread
  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,
    Quote Quote  
  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.
    Quote Quote  
  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
    Quote Quote  
  4. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    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.
    Quote Quote  
  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.
    Quote Quote  
  6. Right, sorry, just google'd filehosts and used the first one.

    Do you have a preference?
    Quote Quote  
  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.
    Quote Quote  
  8. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Originally Posted by jagabo View Post
    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
    Quote Quote  
  9. Originally Posted by infinifc View Post
    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)
    Image Attached Files
    Last edited by pippas; 10th Dec 2015 at 09:36.
    Quote Quote  
  10. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    Did you interpolate from 25 --->50fps pippas? Something like http://compression.ru/video/frame_rate_conversion/index_en_msu.html
    Quote Quote  
  11. Originally Posted by KarMa View Post
    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....
    Image Attached Files
    Last edited by pippas; 11th Dec 2015 at 06:55.
    Quote Quote  
  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:

    Click image for larger version

Name:	artifacts.jpg
Views:	211
Size:	186.6 KB
ID:	34777

    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.
    Last edited by jagabo; 11th Dec 2015 at 08:11.
    Quote Quote  
  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'
    Image Attached Files
    Quote Quote  
  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
    Image Attached Files
    Quote Quote  
  15. Originally Posted by fornit View Post
    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?...
    Quote Quote  
  16. Originally Posted by pippas View Post
    Originally Posted by fornit View Post
    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?...
    Thanks for your comment

    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
    Image Attached Files
    Quote Quote  
  17. Originally Posted by fornit View Post

    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!...
    Quote Quote  
  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
    Image Attached Thumbnails Click image for larger version

Name:	image1.jpg
Views:	211
Size:	110.4 KB
ID:	34800  

    Click image for larger version

Name:	image2.jpg
Views:	323
Size:	124.8 KB
ID:	34801  

    Click image for larger version

Name:	image3.jpg
Views:	264
Size:	120.7 KB
ID:	34802  

    Click image for larger version

Name:	image4.jpg
Views:	234
Size:	112.4 KB
ID:	34803  

    Click image for larger version

Name:	image5.jpg
Views:	191
Size:	103.8 KB
ID:	34804  

    Click image for larger version

Name:	image6.jpg
Views:	181
Size:	90.1 KB
ID:	34805  

    Quote Quote  
  19. Dinosaur Supervisor KarMa's Avatar
    Join Date
    Jul 2015
    Location
    US
    Search Comp PM
    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.
    Quote Quote  
  20. Originally Posted by KarMa View Post
    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
    Quote Quote  
  21. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    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.
    Image Attached Files
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  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.
    Quote Quote  
  23. Originally Posted by jagabo View Post
    .........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?......
    Quote Quote  
  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.
    Quote Quote  



Similar Threads