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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th January 2010, 03:45   #101  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by roozhou View Post
CFR input module should let i_timebase_num = i_fps_num and i_timebase_den = i_fps_den, and leave i_pts unchanged

VFR input module should let i_timebase_num = 1 and i_timebase_den = i_fps_den, and let each i_pts = real_timestamp * i_timebase_den

Right?
Wrong.

CFR, by definition, must synthesize timestamps. There are no PTS to "remain unchanged". It makes up the PTS in x264.c.

VFR input module does not change the PTS or the timebase (unless the PTS are outright invalid, of course).
Dark Shikari is offline   Reply With Quote
Old 15th January 2010, 04:02   #102  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by Dark Shikari View Post
Wrong.

CFR, by definition, must synthesize timestamps. There are no PTS to "remain unchanged". It makes up the PTS in x264.c.

VFR input module does not change the PTS or the timebase (unless the PTS are outright invalid, of course).
I wonder how an input module should set i_pts in x264_picture_t. Of course I know VFR input should leave PTS as is because my x264 build started to support VFR since Oct 2008.
roozhou is offline   Reply With Quote
Old 19th January 2010, 22:14   #103  |  Link
JoeMiller
Registered User
 
Join Date: Sep 2006
Posts: 3
currently, I compile x264 into mencoder. mencoder eats almost any input, no matter which codec or container. Does the x264 LAVF/FFMS version offer any advantage over my mencoder+x264 combination?
JoeMiller is offline   Reply With Quote
Old 19th January 2010, 23:42   #104  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by JoeMiller View Post
currently, I compile x264 into mencoder. mencoder eats almost any input, no matter which codec or container. Does the x264 LAVF/FFMS version offer any advantage over my mencoder+x264 combination?
Mencoder doesn't support VFR.
Dark Shikari is offline   Reply With Quote
Old 20th January 2010, 03:01   #105  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by Dark Shikari View Post
Mencoder doesn't support VFR.
Mencoder does support VFR input and output, but its lavf muxer is crappy. Remember to set -ofps to maximum possible fps of the input video, otherwise it may unnecessarily drop frames.
roozhou is offline   Reply With Quote
Old 23rd January 2010, 06:05   #106  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Quote:
ffms [info]: 640x480p 0:1 @ 30/1 fps (vfr)
Kind of weird that FFMS thinks Fraps videos are VFR. Oh well, glad you can force CFR.
Snowknight26 is online now   Reply With Quote
Old 23rd January 2010, 06:26   #107  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by Snowknight26 View Post
Kind of weird that FFMS thinks Fraps videos are VFR. Oh well, glad you can force CFR.
http://doom10.org/index.php?topic=133.msg1151#msg1151
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 23rd January 2010, 06:31   #108  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Having ffmpeg pipe to x264:

Quote:
ffmpeg -i "%%A" -vcodec rawvideo -f yuv4mpegpipe -an -pix_fmt yuv420p - | x264.x64 - --stdin y4m --crf 19 --bframes 5 --b-adapt 2 --ref 4 --mixed-refs --no-fast-pskip --direct auto --deblock -3:-3 --subme 10 --trellis 2 --analyse all --8x8dct --me umh --output "%%~nA.noaudio.mkv"
Having x264 open a file directly:

Quote:
x264.x64 --crf 19 --bframes 5 --b-adapt 2 --ref 4 --mixed-refs --no-fast-pskip --direct auto --deblock -3:-3 --subme 10 --trellis 2 --analyse all --8x8dct --me umh --output "%%~nA.noaudio.mkv" "%%A"
Standard Fraps video (force lossless RGB unchecked). Haven't checked further but it might be an issue with the colorspace conversion (BGR24 -> YV12) that FFMS is doing. Check the window edges/reds if you can't see it.

Last edited by Snowknight26; 23rd January 2010 at 06:39.
Snowknight26 is online now   Reply With Quote
Old 23rd January 2010, 07:40   #109  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
yeah the chroma looks totally dead
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004
CruNcher is offline   Reply With Quote
Old 23rd January 2010, 21:23   #110  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Snowknight26 View Post
Standard Fraps video (force lossless RGB unchecked). Haven't checked further but it might be an issue with the colorspace conversion (BGR24 -> YV12) that FFMS is doing. Check the window edges/reds if you can't see it.
I can't see any difference at all. If there is one, it's because swscale uses different algorithms from Avisynth. I trust swscale more.
Dark Shikari is offline   Reply With Quote
Old 23rd January 2010, 23:29   #111  |  Link
Mr VacBob
Registered User
 
Join Date: Feb 2005
Posts: 140
I can see it. But I'd recommend turning off subpixel rendering for a screen recording anyway…
Mr VacBob is offline   Reply With Quote
Old 24th January 2010, 01:13   #112  |  Link
Snowknight26
Registered User
 
Join Date: Aug 2007
Posts: 1,430
Quote:
Originally Posted by Dark Shikari View Post
I can't see any difference at all.


Quote:
Originally Posted by Dark Shikari View Post
If there is one, it's because swscale uses different algorithms from Avisynth. I trust swscale more.
The first screenshot is identical to how the Fraps decoder decodes the video.. unlike the 2nd screenshot. Granted, the colors are more accurate in the 2nd, but the chroma is messed up as CruNcher noted.

Quote:
Originally Posted by Mr VacBob View Post
I can see it. But I'd recommend turning off subpixel rendering for a screen recording anyway…
How would I go about achieving that?

Last edited by Snowknight26; 24th January 2010 at 01:16.
Snowknight26 is online now   Reply With Quote
Old 25th January 2010, 20:07   #113  |  Link
me7
Registered User
 
Join Date: Mar 2007
Posts: 217
I just started encoding a 24/1.001 fps BluRay rip where Avisynth apparently reports a wrong framerate:
Code:
avs [info]: 1280x692p 0:0 @ 250000/10427 fps (cfr)
Input file is AVC in mkv container, read via FFVideoSource.

Should I be worried? Will the encoded file have a wrong framerate in it's metadata? Will x264 alter the quality-per-frame in order to get a desired quality-per-second?
me7 is offline   Reply With Quote
Old 25th January 2010, 20:12   #114  |  Link
kemuri-_9
Compiling Encoder
 
kemuri-_9's Avatar
 
Join Date: Jan 2007
Posts: 1,348
Quote:
Originally Posted by me7 View Post
Should I be worried? Will the encoded file have a wrong framerate in it's metadata? Will x264 alter the quality-per-frame in order to get a desired quality-per-second?
A) yes, the encoded file will have the wrong framerate.
B) if using bitrate mode, this will have an extremely slight difference as 250000/10427 is extremely slightly different from 24000/1001.

and this issue has actually already been addressed and fixed in ffmpegsource so update to a newer version.
__________________
custom x264 builds & patches | F@H | My Specs
kemuri-_9 is offline   Reply With Quote
Old 25th January 2010, 20:33   #115  |  Link
me7
Registered User
 
Join Date: Mar 2007
Posts: 217
Quote:
Originally Posted by kemuri-_9 View Post
and this issue has actually already been addressed and fixed in ffmpegsource so update to a newer version.
I tried the latest version available here, but it doesn't fix the problem.
me7 is offline   Reply With Quote
Old 25th January 2010, 20:43   #116  |  Link
rack04
Registered User
 
Join Date: Mar 2006
Posts: 1,538
Quote:
Originally Posted by me7 View Post
I tried the latest version available here, but it doesn't fix the problem.
The latest version is r263.
rack04 is offline   Reply With Quote
Old 25th January 2010, 20:48   #117  |  Link
me7
Registered User
 
Join Date: Mar 2007
Posts: 217
Quote:
Originally Posted by rack04 View Post
The latest version is r263.
Where can I get it?
me7 is offline   Reply With Quote
Old 25th January 2010, 23:40   #118  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by me7 View Post
Where can I get it?
http://code.google.com/p/ffmpegsource/source/checkout
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 26th January 2010, 00:38   #119  |  Link
me7
Registered User
 
Join Date: Mar 2007
Posts: 217
Quote:
Originally Posted by LoRd_MuldeR View Post
Now I really regret not knowing anything about C++
Still, thanks for the info.
me7 is offline   Reply With Quote
Old 26th January 2010, 00:44   #120  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by me7 View Post
Now I really regret not knowing anything about C++
Still, thanks for the info.
Actually most of the time you can compile stuff without having to understand the code. You don't even need to look at the code.

Once you have set up the build environment, you only need to know how to use SVN and Make
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 26th January 2010 at 00:49.
LoRd_MuldeR is offline   Reply With Quote
Reply

Tags
beta, ffmpegsource, libavformat, test, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.