@davexnet
This is one method I was playing with to go from the 50 fps > 24, then speed up to 25:
directshowsource("C:\Documents and Settings\Dave New\Desktop\ml-50.avi")
tfm().TDecimate(mode=2,rate=24)
assumefps(25,sync_audio=true)
This particular test avi file was something I was using to simulate jjcinema's sources. I took a 24 fps source file and used changefps(50) to create it.
I can see what you mean here and it does make sense but i'm not sure if this would work with all my recordings as all methods but the interlaced has produced frame stutter which is what im originally trying to get rid of. As manolito says my hardware seems to be working best with the interlaced method and with my source filters as FFMpegSource so I am grateful that some form of progress is happening.
jjcinema
+ Reply to Thread
Results 3,121 to 3,150 of 4109
-
-
Can you provide a longer clip, perhaps 2 minutes - include a scene that has some steady movement, so we can check (the other clip was too short)
If interlacing is working for you perhaps stick with it ?Last edited by davexnet; 21st Aug 2016 at 23:31.
-
@davexnet
Interlacing seems to be working well. I tried to upload a 2 minute clip but its very large for my internet speed and takes too long to upload sorry.
If I can get manolitos plugin to force mplex muxing instead of FFMpeg as I would be pleased and this would also help stop the chances of any audio sync issues in future conversions.
I can get my recorder to out put mp4 in 60fps I think but I still need the end dvd to be 25fps pal so maybe keeping it at the 50fps is better as its closer to the 25 divide that 30?
jjcinema -
If you step through the interlaced mpg that you provided earlier frame by frame in Virtualdub, you can see many field order changes as it
switches back and forth. Perhaps your equipment handles it and it's not noticeable? -
No, I cannot detect any field order changes in the output created with the "interlaced" method...
The output is TFF and stays TFF throughout the whole length. Tested with the old and proven method to detect the field order of an interlaced clip:
dss2("i:\test.mpg")
assumetff()
separatefields()
Cheers
manolito -
@manolito
"IMO using this "interlaced" method may not be the most elegant way to handle such sources, but the method is technically correct, and every player or TV should be able to deinterlace the resulting file correctly."
I think you are correct as I have tested teh outputs on a few different TV's and DVD players and it plays without a problem, its seems to be the exact same as if footage is recorded on a DVD R with a standard standalone DVD recorder, Using media info this footage also says Interlaced Top Field First so I guess the interlaced method may now be ideal on paper but in real world hardware it seems to work fine and also like you say every player and Tv should be fit to deinterlace it correctly so Im Thinking as long as the audio sync issue is fixed then the interlaced method may be the way to go with these mp4 recordings.
I cant get mplex to work though for the muxing?
jjcinema -
@davexnet
"If you step through the interlaced mpg that you provided earlier frame by frame in Virtualdub, you can see many field order changes as it
switches back and forth. Perhaps your equipment handles it and it's not noticeable?"
I think like manolito said a while back it has to be deinterlaced in the playback chain somewhere and maybe the Hardware equitment (TV, DVD, Bluray Players) handle this correctly as it must has all Tv and players must have a built in deinterlacer or technique as standard.
jjcinema -
manolito technically you're correct but where the input switches from a duplicate field to two duplicates something weird happens to the motion
as the fields are reversed. This can easily be seen using Virtualdub and the viewfields plugin - but as I said before, perhaps the playback
equipment handles it.
Just out of interest here's the progressive speeded up version from the original clip. I would have liked a longer clip but jjcinema is not able to provide it -
Yes, this clip is probably the optimal solution (I believe that TFM would not even be necessary because there are no fields which could be matched).
I wonder if jjcimema can play this clip without visible motion judder...
Cheers
manolito -
When you look at the original interlaced mpg in virtualdub you see clearly top field first for the first 20 frames; the freezer door is opening
and the bottom field is slight advanced in it's movement than the top field (as you would expect). then at frame 21 the top field advances and the
bottom field doesn't move.
The next few frames are progressive (same temporal moment).
I don't have any PAL equipment, but it's possible that it looks entirely normal on the TV - or it might appear as if the door reversed it's direction for that
one frame (frame 21)
In terms of the encoding it could be argued that the progressive looks a little cleaner; it's more efficient and for the lower bitrate that is being used
could be a factor.
You're of course right about the TFM, here's the script I used
Video = A2DVideoSource("C:\Documents and Settings\Dave New\My Documents\Downloads\original.mp4", CacheFolder="C:\Documents and Settings\Dave New\Desktop\test", VFR=false, FrameRateNum=50, FrameRateDen=1, FrameRate=50)
Audio = A2DAudioSource("C:\Documents and Settings\Dave New\My Documents\Downloads\original.mp4", CacheFolder="C:\Documents and Settings\Dave New\Desktop\test")
Video = Video.ConvertToYV12()
Video = Video.LanczosResize(720,576)
video=video.TDecimate(cycleR=26,cycle=50)
AudioDub(Video, Audio)
assumefps(25,sync_audio=true).SSRC(48000)
I think we've just about beaten this one to death now -
I will try to upload a clip later for to tp check this method out. also i will have a look at your clip and see if it plays without stutter on my end. I do appreciate all the help fellas.
jjcinema -
@davexnet
Here is a clip a little longer and includes a few panning shots ect. Try your method on this and see how it works out,
jjcinemaLast edited by jjcinema1; 25th Aug 2016 at 19:07.
-
Here's a quick encode, the video at the beginning is frozen for a second or two, so was the source. Perhaps related to the way you cut the clip?
-
@davexnet
I downloaded I watched, apart from the little freeze at the start it plays flawlessly. I would like to try this script on my conversion to see how it pans out with the full movie and my other source clip as well. can you instruct me the best way to use this method?
also will this work for all my mp4 recordings that I need to convert from 50fps to 25 fps?
Thanks
jjcinema -
Look in the log I provided for the script. I commented out selecteven() and added two lines. That's it. Encode progressive.
-
@davexnet
This doesn't seem to work for me it keeps giving me an error.
"Warning! Title 1 output Video duration (00:00:00) is shorter than expected duration (01:22:03).
Do you want to continue anyway? Default 'No'"
Thanks
jjcinema -
Perhaps you're missing the package. Download tivtc from here, extract the tivtc.dll and add it to the avisynth\plugins folder
http://avisynth.nl/index.php/TIVTC -
@davexnet
Yes that was the issue. I have it running now so I will let you know what the outcome is. Fingers crossed lol!
jjcinema -
I remember reading somewhere that back in 1964 when they shot the Beatles movie "A Hard Day's Night" the decision was made to record it on film
@ 25 fps. I often wondered why they did this. Could it be because they were thinking ahead and wanted it to playback at the proper speed on UK TV ?
For the US TV releases it must have been slowed back down to 24 fps and then telecined,which is why the songs sound kind of slow.
I've played around in Sound Forge and done these speed ups/slow downs manually; I guess it's a personal issue, doesn't bother some people
and others absolutely hate it. In SF you can keep very good quality and keep the pitch the same, even though the speed has changed.
But even with the pitch change, people in the PAL countries got used to it.
Now your source, perfectly good for PAL HDTV, has to be massaged in a similar way for SD DVD. It's like Back To The Future ... -
@jjcinema
I almost forgot to answer your question about how to use Mplex for muxing:
The FF_VBR plugin must be installed, make sure that Mplex.exe is present in the AVStoDVD\FFmpeg folder. Edit the batch file so it shows "SET UseMplex=1".
You will not see the Mplex messages in the A2D log file, you can only see them in the FFmpeg command window while muxing takes place. If you want a more visible way to see that Mplex is running, no problem. Open ff_vbr.bat in Notepad and edit the very last line. You need to put "START /W " at the beginning of the line. This will run Mplex in a separate process with a separate Mplex console window.
@davexnet
This method of retrieving back the original 24 fps and then using speedup is the best thing one can use for these HD captures. Just some remarks:
You can safely replace TDecimate(....) with FDecimate(24). No need to learn the different TDecimate mode parameters.
To avoid counting duplicates manually I found a nice little tool called "ApparentFPS".
http://forum.doom9.org/showthread.php?p=1698468#post1698468
I found that it works nicely with jjcinema's clips using default parameters, but sometimes you need to adjust the Dupe Threshold.
Regarding pitch correction when using speedup:
AviSynth has a built-in TimeStretch plugin which can do this. The built-in version is deprecated though, better to use the separate TimeStretch plugin by Wilbert (suports multi-channel audio).
To use it you need to remove the "sync_audio=true" from your modified script and add this line instead:
TimeStretchPlugin(tempo = (100.0*25.0*1000.0)/24000.0)
Generally pitch correction is a dangerous thing, it can cause nasty artifacts depending on the audio characteristics. The TimeStretch algos are quite good, a better professional solution is Izotope Radius. It comes with Sonar and Adobe Audition.
Cheers
manolitoLast edited by manolito; 23rd Aug 2016 at 08:18.
-
@manolito @davexnet
I do have FF_VBR plugin must be installed and have the Mplex.exe is present in the AVStoDVD\FFmpeg folder. I also have edited the batch file to "SET UseMplex=1" so presume it must be using Mplex then?
My latest test on my conversion worked fantastic. I used davexnet's "TDecimate method" But I kept my source filters at FFMpegSource in fear of the audio going out as this seems to work for me. Audio is 100% in sync and panning shots are fantastic with no frame jitter and yes the progressive makes it look a lot cleaner both on VLC player and on my TV DVD Player. Very Happy about this.
@manolito
"This method of retrieving back the original 24 fps and then using speedup is the best thing one can use for these HD captures. Just some remarks:
You can safely replace TDecimate(....) with FDecimate(24). No need to learn the different TDecimate mode parameters.
To avoid counting duplicates manually I found a nice little tool called "ApparentFPS".
http://forum.doom9.org/showthread.php?p=1698468#post1698468
I found that it works nicely with jjcinema's clips using default parameters, but sometimes you need to adjust the Dupe Threshold.
Regarding pitch correction when using speedup:
AviSynth has a built-in TimeStretch plugin which can do this. The built-in version is deprecated though, better to use the separate TimeStretch plugin by Wilbert (suports multi-channel audio).
To use it you need to remove the "sync_audio=true" from your modified script and add this line instead:
TimeStretchPlugin(tempo = (100.0*25.0*1000.0)/24000.0)
Generally pitch correction is a dangerous thing, it can cause nasty artifacts depending on the audio characteristics. The TimeStretch algos are quite good, a better professional solution is Izotope Radius. It comes with Sonar and Adobe Audition."
Is this method a little bit better then to use FDecimate(24) instead? also does the frame count tool "ApparentFPS" work within the scritp or do I have to use it separately? I'm a little confused as Im still new to this all but am learning a lot from you guys, I do appreciate all your help.
so now that we have made progress Im thinking if we can get a script together that I can use with all these hd mp4 recordings for future conversions it would be easier to keep track of.
also I Attached my log of the successful "TDecimate method" conversion if you guys what to have a look at.
jjcinema -
@jjcinema
Your log file looks OK to me, for this kind of movies you do have the "golden" method now.
And yes, you should stick with FFmpegSource.
For deciding if you want to use TDecimate or FDecimate you should first read the documentation for both filters. TDecimate is very universal, but you have to pick one of seven modes. Depending on the input several modes might work, some of them better than others. Davexnet already used modes 2 and 0, according to the docs also mode 1 and mode 7 are likely candidates. FDecimate OTOH is specifically made for files like yours, it does not have several modes.
The "ApparentFPS" tool must be used separately from AVStoDVD. You first have to write a small script like:
MySourceFilter("My Video")
LoadPlugin("Full Path\ApparentFPS.dll") # Or copy the DLL into your AviSynth\Plugins folder so it will autoload
ApparentFPS()
For movies of this kind you can probably be sure that they all have the same pattern how duplicates are added, so just try decimating to 24 fps. I would be curious what kind of files your recorder spits out for different content, let's say for a sports event. At least in Germany those sports videos are broadcast as interlaced. What will your recorder do to such clips? And what about movies which were originally shot on film, but with 25 fps instead of 24 fps. Some European concert shows are like this.
Cheers
manolito -
@manolito
Thanks for the information. I want to keep things as simple as I can for myself so if you say "FDecimate OTOH is specifically made for files like yours, it does not have several modes." I think I will use FDecimate as it doesn't have the several modes to have to alter ect.
I will try the "ApparentFPS" out with virtual dub, so can I load my mp4 files directly into Virtual Dub?
"For movies of this kind you can probably be sure that they all have the same pattern how duplicates are added, so just try decimating to 24 fps. I would be curious what kind of files your recorder spits out for different content, let's say for a sports event. At least in Germany those sports videos are broadcast as interlaced. What will your recorder do to such clips? And what about movies which were originally shot on film, but with 25 fps instead of 24 fps. Some European concert shows are like this."
I will have to check out how it does handle different inputs. All I know is it out puts at 720p/1080p 50fps or 720p/1080p 60fps all mp4 container. The clip I provided was from an older movie and it did a great job with it but on the same dvd I added another movie that is more modern and it seems to have handled this very well indeed so maybe this script will work for all the recordings it produces fingers crossed
jjcinema -
VirtualDub cannot open MP4 files out of the box. You have to install an MP4 input plugin to add this capability.
But if you want to use ApparentFPS then you need to open your MP4 through an AviSynth script like the one I posted. Save the script (after putting in your source filter and the path for your video) with the "AVS" extension and open this AVS file in VirtualDub.
Cheers
manolito -
Not really...
AFAIK you only have the ffms2 files in the "AVStoVD\Lib" folder. To use FFmpegSource in a script you need to load the ffms2.dll first with a LoadPlugin command. Or you copy ffms2.dll and ffms2.lib into your AviSynth\Plugins folder so the plugin will be loaded automatically. Then you do not need the LoadPlugin() command.
And secondly there is no exported function "FFmpegSource". The exported functions are "FFmpegSource2" and "ffms2". In your case you do not need audio, so "FFVideoSource" would be better. You really need to read the docs for a plugin before trying to use it.
If you extracted the correct ApparentFPS DLL (for AviSynth 2.6 it must be "ApparentFPS26.dll") into your AviSynth\Plugins folder then there is no need to use the LoadPlugin command. Also note that your AviSynth version should be the 32-bit version, and this version should be installed in the "C:\Program Files (x86)" folder (not in "C:\Program Files").
So I assume that you have DSS2Mod installed (the file "avss_26.dll" is in your "AviSynth\Plugins" folder), and you also have extracted "ApparentFPS26.dll" into the "AviSynth\Plugins" folder. Then the AVS script to run ApparentFPS should look like this:
dss2("C:\Users\IntelVPro\Desktop\HD STUFF\Movie 2.mp4")
ApparentFPS()
Cheers
manolitoLast edited by manolito; 24th Aug 2016 at 17:25.
-
@Manolito
Thank you, great job. I have it working now and am getting the hang of it.
So basically i just when I run the script I just move to a scene with motion and then go forward one frame at a time and keep an eye on the AppFPS until it settles at a constant rate (24 fps) then I can assume that my whole clip is 24 fps?
I see that the Max AppFPS does keep increasing when you move the slider again but I think i can work with this little tool.
Can this tool tell me the correct framerate of any source clip i use it with?
Thanks
jjcinema -
It should work for all clips which contain duplicates. Clips which are interlaced or where blending was used to bring up the frame rate will not give you any meaningful results...
Cheers
manolito -
@Manolito @davexnet
Ok I will start with this the ApparentFPS tool work is a great job so good find Manolito, It will be of use to me in future conversions and I'm getting to hang of it the more I use it.
As for My Video/Audio Source Filters as Manolito has said and previous tests have proven that the FFMpegSource works best for me in regards to solving the Audio sync Problem, so I will be sticking with FFMpegSource.
Also in regard to my Video encoder I will be using Manolito's VBR Plugin as its very easy installed and work very well for me and Im happy with the end results.
I can output my end results to Muxed Mpeg2 files which I can use in DVDStyler for my menu creation without the need to re-encode. (Thanks to Manolito for help with that)
So Now the Code Scripts
So if my clips are 24fps I can use the TDecimate Method as metioned by davexnet (Thanks for the Input Davexnet) which is the following:
Video = Video.ConvertToYV12()
Video = Video.Spline36Resize(720,576)
#Video = Video.SelectEven()
video=video.TDecimate(mode=0,cycleR=13,cycle=25)
AudioDub(Video, Audio)
assumefps(25,sync_audio=true).SSRC(48000)
Also if I wish to use the FDecimate Method as Mentioned by Manolito ( Thanks for this alsoand I can choose betwwen fdecimate110 & fdecimate102 depending which works best for me?) I just use the following code:
Video = Video.ConvertToYV12()
Video = Video.Spline36Resize(720,576)
#Video = Video.SelectEven()
video=video.FDecimate(24)
and to use the timestretch method for Audio I install the TimeStretch plugin by Wilbert into "C:\Program Files\AviSynth\plugins" folder and change the modified script to:
AudioDub(Video, Audio)
assumefps(TimeStretchPlugin(tempo = (100.0*25.0*1000.0)/24000.0))
am I correct with all so far?
also these scripts are for my Recorder Output mp4 50fps (that is really 24fps as we have discovered) to get them to be PAL 25FPS.
so if I find any clips that in the future that come out as mp4 50fps but ApparentFPS tool is saying that its really 25fps will the same scripts work or will I have to alter them?
Many Many Many Thanks fellas for taking the time and effort to help me get this solution.
jjcinema1
Similar Threads
-
AVANTI - FFmpeg/Avisynth GUI (support thread).
By Chris K in forum Video ConversionReplies: 1189Last Post: 12th Jun 2017, 12:39 -
TEncoder 4.0.0 - Multithreaded GUI for FFMpeg and Mencoder (Support thread)
By ozok in forum Video ConversionReplies: 104Last Post: 4th Jun 2014, 10:10 -
Hybrid [x264/XViD - MKV/MP4] Converter Support Thread
By Bonie81 in forum Video ConversionReplies: 6Last Post: 8th Jan 2013, 03:53 -
AVStoDVD 2.4.0
By Hoser Rob in forum Authoring (DVD)Replies: 0Last Post: 30th May 2011, 20:37 -
Start product support thread?
By midders in forum FeedbackReplies: 2Last Post: 4th Aug 2009, 14:15