Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
25th April 2007, 11:32 | #1 | Link |
Registered User
Join Date: Feb 2006
Posts: 18
|
Changing fps from 60 to 30.
Hi,
I have fraps footage that I put together in Virtualdub and saved as an .avi file (non compressed). Basically so its just one file. Its about 30GB in total and is shot at 640x512 @ 60fps, 20 mins long. based on this thread http://forum.doom9.org/showthread.php?t=125079 (great work btw) Now I am encoding it into x264 using a batch file I created (attached) with switches. Could some of the more experienced look over it and see if its ok. It encodes the file down to 300MB and the quality is excellent, took 3 hours for one pass (first), but it doesn't seem to change the fps from 60 to 30fps. I am assuming it will reduce the file size further if its @ 30fps so I need to convert it. Is the --fps switch broken or am I missing something? This is my very first time doing this sort of thing. Ripping from DVD's is easy, point and click lol. But doing this from scratch with avi files etc requires me to get some advice. Code:
@ECHO OFF ECHO. ------------------------------ ECHO. Setting Variables. ECHO. ------------------------------ SET bitrate=2000 SET threads=2 SET fps=30.00 SET input=frapScript.avs SET output=output.mp4 ECHO. ------------------------------ ECHO. Encode First Pass ECHO. ------------------------------ x264.exe --fps %fps% --trellis 2 --me umh --bime --merange 64 --no-fast-pskip --partitions all --8x8dct --pass 1 --bitrate %bitrate% --subme 7 --bframes 16 --b-pyramid --ref 5 --b-rdo --aq-strength 0.5 --mixed-refs --direct auto --weightb --progress --deblock 1:-1 --threads %threads% -o %output% %input% ECHO. ---------------------------------- ECHO. Encode Second Pass ECHO. ---------------------------------- x264.exe --fps %fps% --trellis 2 --me umh --bime --merange 64 --no-fast-pskip --partitions all --8x8dct --pass 2 --bitrate %bitrate% --subme 7 --bframes 16 --b-pyramid --ref 5 --b-rdo --aq-strength 0.5 --mixed-refs --direct auto --weightb --progress --deblock 1:-1 --threads %threads% -o %output% %input% ECHO. ------------------------------ ECHO. Finished Encoding ECHO. ------------------------------ PAUSE CLS EXIT D. EDIT: once I have done 2 passes, what software can i use to put music and title screens in. Will I have to encode it again? won't it loose quality. Last edited by DangeR!; 25th April 2007 at 13:03. |
25th April 2007, 15:42 | #2 | Link |
Registered User
Join Date: Mar 2005
Location: Germany
Posts: 27
|
hi .. what about using avisynth internal conversion of fps ?
convertfps(30) ... but the value choosen can be max. 2/3 of source fps. so if you want to perhaps go convert to 25fps you can combine multiple convertfps convertfps(30).convertfps(25) see also avisynth docs ConvertFPS(). About audio: try ... Code:
video = yourvideosource audio = wavsource("your.wav") #or directshowsource("your.something.soundfile") audiodub(video,audio) convertfps(30) Last edited by AVmaniac; 25th April 2007 at 15:51. |
25th April 2007, 15:57 | #3 | Link |
x264 developer
Join Date: Sep 2004
Posts: 2,392
|
Multiple calls to convertfps? That's just asking for trouble. The convertfps doc even says so.
|
25th April 2007, 17:00 | #4 | Link |
Registered User
Join Date: Feb 2006
Posts: 18
|
Hi,
thanks for the replys. this is whats in my .avs file Code:
DirectShowSource("video.avi") ConvertToYV12() didn't realise .avs files could do that (don't really know what they do tbh lol.) This is a good site for x264 commands, witch I have followed http://aflux.deltaanime.net/Zero1/MP4/x264.html Also, does my x264 settings look ok + will 30fps reduce the file size by half, if any? |
25th April 2007, 17:12 | #5 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
With Avisynth scripts you can do almost everything (some additional Plugins might be necessary though) You might like to read this: http://avisynth.org/YourFirstScript
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
25th April 2007, 18:41 | #6 | Link |
Registered User
Join Date: Feb 2006
Posts: 18
|
Thanks LoRd_MuldeR, I'll have a read of that soon.
I have a problem. x264 cannot open my avs file, any ideas why? my error: avis [error]: unsupported input format (DIB ) x264 [error]: could not open input file 'frapScript.avs' Last edited by DangeR!; 25th April 2007 at 18:58. |
25th April 2007, 19:26 | #8 | Link |
Derek Prestegard IRL
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
|
It might be a lot faster if you re-encode to HuffYUV, or a similar universal lossless codec. It will save space and time.
~Misfit
__________________
These are all my personal statements, not those of my employer :) |
25th April 2007, 20:52 | #10 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
HuffYUV is lossless, x264 usually is not (except you use CQ=0)
But don't expect HuffYUV to achieve a decent compression-ratio, it's more intended for real-time capturing and intermediate storage!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
25th April 2007, 22:57 | #11 | Link | |
Registered User
Join Date: Aug 2005
Posts: 66
|
Quote:
|
|
25th April 2007, 23:19 | #12 | Link | |
Registered User
Join Date: Feb 2006
Posts: 18
|
Quote:
I take it no one knows why this error has come up when the file used to encode fine before. I also thought that reducing the fps would also reduce the overall size of the footage when encoded. less frames less size. Last edited by DangeR!; 25th April 2007 at 23:23. |
|
25th April 2007, 23:29 | #13 | Link |
Registered User
Join Date: Feb 2006
Posts: 18
|
I figured out my error, or at least why it wouldn't open properly. its the command ConvertFPS(30). I took this out and it started to encode as it should.
If reducing the fps isn't going to reduce the file size, then there is no need to change it. I'm fine with 2000 bitrate, though I may experiment with it to get the file size down a bit. |
25th April 2007, 23:39 | #14 | Link |
Registered User
Join Date: Oct 2005
Posts: 6
|
Why not just use selecteven()? By using ConvertFPS(30) you're removing half the frames, same as selecting every other frame.
edit- whoops, nevermind. Confused this with changefps. You may be looking to use changefps instead! Last edited by ballofsnow; 25th April 2007 at 23:44. |
25th April 2007, 23:55 | #17 | Link |
Registered User
Join Date: Feb 2006
Posts: 18
|
The encoded footage wont play on WMP or QuickTime, but it plays in VCL. How can I make it more compatable? is it to do with --merange should I use 64 or 32, as I hear 32 allows it to be played in quicktime/ipod.
sorry for all the questions and thanks for the help so far. |
26th April 2007, 00:06 | #18 | Link |
Registered User
Join Date: Oct 2005
Posts: 6
|
You may have missed my edit above. You should look into both selecteven(), and ChangeFPS(30). Changefps will delete or duplicate frames to meet the desired framerate. In your case it'd delete half of them, which I'm pretty sure is what you want.
To make it Quicktime 7 compatible, in MeGUI you'd select main profile, and make sure that bpyramid is off. Not sure what the exact command line would be though. |
26th April 2007, 00:08 | #20 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Bitrate is selected as "Kilobits per Second" and not "Bits per Frame" or something This means the resulting Filesize will be the same, no matter which Framerate the video has! Of course if the video has a lower Framerate, then you can usually encode at a lower Bitrate and still get a decent quality. So reducing the Framerate will not make your file any smaller, as long as you don't adjust the Bitrate too!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 26th April 2007 at 00:14. |
|
|
|