VideoHelp Forum
+ Reply to Thread
Results 1 to 27 of 27
Thread
  1. it gives me variable framerate...??? And the source has constant framerate... any help appreciated...
    Quote Quote  
  2. Complete name : C:\Users\Balema\VidCoder Files\kew - 0.00.00-0.00.20.mp4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 14.2 MiB
    Duration : 20s 11ms
    Overall bit rate mode : Variable
    Overall bit rate : 5 932 Kbps
    Encoded date : UTC 2014-02-22 12:01:18
    Tagged date : UTC 2014-02-22 12:02:08
    Writing application : HandBrake 0.9.9 2013051800

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 8 frames
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 19s 978ms
    Bit rate mode : Variable
    Bit rate : 5 403 Kbps
    Maximum bit rate : 14.7 Mbps
    Width : 1 280 pixels
    Height : 720 pixels
    Display aspect ratio : 16:9
    Frame rate mode : Variable
    Frame rate : 23.976 fps
    Minimum frame rate : 23.974 fps
    Maximum frame rate : 23.981 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.245
    Stream size : 13.1 MiB (92%)
    Writing library : x264 core 130 r2273 b3065e6
    Encoding settings : cabac=1 / ref=8 / deblock=1:1:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.15 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-1 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=1 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=5403 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=14700 / vbv_bufsize=35000 / nal_hrd=vbr / ip_ratio=1.40 / aq=1:1.10
    Encoded date : UTC 2014-02-22 12:01:18
    Tagged date : UTC 2014-02-22 12:02:08
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 20s 11ms
    Bit rate mode : Variable
    Bit rate : 452 Kbps
    Maximum bit rate : 714 Kbps
    Channel(s) : 6 channels
    Channel positions : Front: L C R, Side: L R, LFE
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 1.08 MiB (8%)
    Language : English
    Encoded date : UTC 2014-02-22 12:01:18
    Tagged date : UTC 2014-02-22 12:02:07
    Last edited by Balema; 22nd Feb 2014 at 06:03.
    Quote Quote  
  3. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Don't know why, but when ever I select .mp4 it gives variable FPS, when I select mkv it gives Constant FPS. Maybe it's a bug........
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  4. help for command line says this:
    Code:
        -r, --rate              Set video framerate (5/10/12/15/23.976/24/25/29.97)
                                Be aware that not specifying a framerate lets
                                HandBrake preserve a source's time stamps,
                                potentially creating variable framerate video
        --vfr, --cfr, --pfr     Select variable, constant or peak-limited
                                frame rate control. VFR preserves the source
                                timing. CFR makes the output constant rate at
                                the rate given by the -r flag (or the source's
                                average rate if no -r is given). PFR doesn't
                                allow the rate to go over the rate specified
                                with the -r flag but won't change the source
                                timing if it's below that rate.
                                If none of these flags are given, the default
                                is --cfr when -r is given and --vfr otherwise
    so try to add something like this for 25fps: -r 25 -crf , there should be a line where to put it, based on threads I read, or it could be put with correct syntax
    Quote Quote  
  5. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    That's nice and all, but why does the output vary between .mp4 and mkv when the framerate is 23.976. When the framerate is 29.976, all is well with both .mp4 and mkv outputs................

    Sounds like a bug to me, but what do I know...............

    For the record.......no such issues when encoding with ffmpeg the same input videos without the "-r 24000/1001" command.
    Last edited by racer-x; 22nd Feb 2014 at 16:39.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  6. Originally Posted by racer-x View Post
    Sounds like a bug to me, but what do I know...............
    maybe, but well nobody is perfect, but that Handbrake command line seems to be some powerful tool otherwise, wandering why it did not catch here more, it deals with DVD's, mp4's, x264 settings, it just will not load avisynth script, that is why perhaps
    Quote Quote  
  7. In addition to selecting "Constant Framerate", set framerate (FPS) to be 25 FPS or whatever the original file is,
    don't leave it as "Same as Source".
    Even if you put constant framerate it'll output variable for some sources.
    This has always been a problem with Handbrake / Vidcoder, which is one reason I avoid it mostly.
    Quote Quote  
  8. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Yes, I agree. If it would just load Avisynth scripts, it would be darn near perfect.....

    It's still pretty good and I use it quite a bit just the same. It's great for converting dvd or BD into mkv file I can play on my Samsung TV via usb or my Tablet.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  9. I put 23976 to framerate then set to constant and still it gives me variable framerates... I can't understand...
    Quote Quote  
  10. I even put and the -r 25 -crf to see if it will give me constant framerate but nothing...
    Quote Quote  
  11. Originally Posted by Balema View Post
    I put 23976 to framerate then set to constant and still it gives me variable framerates... I can't understand...
    Read this:
    Originally Posted by blud7 View Post
    This has always been a problem with Handbrake / Vidcoder
    Output to MKV if you want constant frame rate.
    Quote Quote  
  12. Originally Posted by Balema View Post
    but nothing...
    What is your source?
    Quote Quote  
  13. Originally Posted by _al_ View Post
    Originally Posted by balema View Post
    but nothing...
    what is your source?
    mkv
    Quote Quote  
  14. Originally Posted by jagabo View Post
    Output to MKV if you want constant frame rate.
    Or don't use Handbrake/Vidcoder. I have no trouble getting CFR MP4s.

    PHP Code:
    Complete name                  E:\Basant\Basant.mp4
    Format                         
    MPEG-4
    Format profile                 
    Base Media
    Codec ID                       
    isom
    File size                      
    2.26 GiB
    Duration                       
    2h 25mn
    Overall bit rate mode          
    Variable
    Overall bit rate               
    2 227 Kbps
    Encoded date                   
    UTC 2014-02-17 04:11:04
    Tagged date                    
    UTC 2014-02-17 04:11:04

    Video
    ID                             
    1
    Format                         
    AVC
    Format
    /Info                    Advanced Video Codec
    Format profile                 
    High@L4.0
    Format settings
    CABAC         Yes
    Format settings
    ReFrames      3 frames
    Codec ID                       
    avc1
    Codec ID
    /Info                  Advanced Video Coding
    Duration                       
    2h 25mn
    Bit rate mode                  
    Variable
    Bit rate                       
    1 999 Kbps
    Maximum bit rate               
    25.0 Mbps
    Width                          
    640 pixels
    Height                         
    480 pixels
    Display aspect ratio           
    4:3
    Frame rate mode                
    Constant
    Frame rate                     
    23.976 fps
    Color space                    
    YUV
    Chroma subsampling             
    4:2:0
    Bit depth                      
    8 bits
    Scan type                      
    Progressive
    Bits
    /(Pixel*Frame)             : 0.271
    Stream size                    
    2.03 GiB (90%)
    Writing library                x264 core 129 r2245 bc13772
    Encoding settings              
    cabac=ref=deblock=1:-1:-analyse=0x3:0x113 me=hex subme=psy=psy_rd=1.00:0.15 mixed_ref=me_range=16 chroma_me=trellis=8x8dct=cqm=deadzone=21,11 fast_pskip=chroma_qp_offset=-threads=12 lookahead_threads=sliced_threads=nr=decimate=interlaced=bluray_compat=constrained_intra=bframes=b_pyramid=b_adapt=b_bias=direct=weightb=open_gop=weightp=keyint=240 keyint_min=24 scenecut=40 intra_refresh=rc_lookahead=40 rc=crf mbtree=crf=20.0 qcomp=0.60 qpmin=qpmax=69 qpstep=vbv_maxrate=25000 vbv_bufsize=25000 crf_max=0.0 nal_hrd=vbr ip_ratio=1.40 aq=1:1.00
    Encoded date                   
    UTC 2014-02-17 04:11:04
    Tagged date                    
    UTC 2014-02-17 04:13:50 
    Quote Quote  
  15. The problem has something to do with handbrake's muxing to MP4, not the encoding itself. You can demux the h.264 stream to an elementary stream and see that it is indeed CFR.
    Quote Quote  
  16. Originally Posted by Balema View Post
    mkv
    That is just container, I was thinking about format of video,.... to try command line, if there is a difference between GUI or just command line for couple of samples.
    But never mind , probably that is not it, by now, somebody would know a solution for that.
    Quote Quote  
  17. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Most s/w have little bugs like this. AviDemux is a great tool, but doesn't correctly interpret my 60p MTS clips. It thinks they are 120 fps. When ever I use AviDemux to cut my 60p MTS files, I have to run the output files through TsMuxeR to straighten them back to 59.94 fps. It's a pain, but I rarely do those things anyway.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  18. I tried with a mp4 file for source but the same thing... I give up...

    PS. I noticed that it gives me encoded files with Format profile : Base Media / Version 2 and Codec ID : mp42 but I want to have Format profile : Base Media and Codec ID : isom, does anyone knows what to change?
    Quote Quote  
  19. Originally Posted by manono View Post
    Originally Posted by jagabo View Post
    Output to MKV if you want constant frame rate.
    Or don't use Handbrake/Vidcoder. I have no trouble getting CFR MP4s.

    PHP Code:
    Complete name                  E:\Basant\Basant.mp4
    Format                         
    MPEG-4
    Format profile                 
    Base Media
    Codec ID                       
    isom
    File size                      
    2.26 GiB
    Duration                       
    2h 25mn
    Overall bit rate mode          
    Variable
    Overall bit rate               
    2 227 Kbps
    Encoded date                   
    UTC 2014-02-17 04:11:04
    Tagged date                    
    UTC 2014-02-17 04:11:04

    Video
    ID                             
    1
    Format                         
    AVC
    Format
    /Info                    Advanced Video Codec
    Format profile                 
    High@L4.0
    Format settings
    CABAC         Yes
    Format settings
    ReFrames      3 frames
    Codec ID                       
    avc1
    Codec ID
    /Info                  Advanced Video Coding
    Duration                       
    2h 25mn
    Bit rate mode                  
    Variable
    Bit rate                       
    1 999 Kbps
    Maximum bit rate               
    25.0 Mbps
    Width                          
    640 pixels
    Height                         
    480 pixels
    Display aspect ratio           
    4:3
    Frame rate mode                
    Constant
    Frame rate                     
    23.976 fps
    Color space                    
    YUV
    Chroma subsampling             
    4:2:0
    Bit depth                      
    8 bits
    Scan type                      
    Progressive
    Bits
    /(Pixel*Frame)             : 0.271
    Stream size                    
    2.03 GiB (90%)
    Writing library                x264 core 129 r2245 bc13772
    Encoding settings              
    cabac=ref=deblock=1:-1:-analyse=0x3:0x113 me=hex subme=psy=psy_rd=1.00:0.15 mixed_ref=me_range=16 chroma_me=trellis=8x8dct=cqm=deadzone=21,11 fast_pskip=chroma_qp_offset=-threads=12 lookahead_threads=sliced_threads=nr=decimate=interlaced=bluray_compat=constrained_intra=bframes=b_pyramid=b_adapt=b_bias=direct=weightb=open_gop=weightp=keyint=240 keyint_min=24 scenecut=40 intra_refresh=rc_lookahead=40 rc=crf mbtree=crf=20.0 qcomp=0.60 qpmin=qpmax=69 qpstep=vbv_maxrate=25000 vbv_bufsize=25000 crf_max=0.0 nal_hrd=vbr ip_ratio=1.40 aq=1:1.00
    Encoded date                   
    UTC 2014-02-17 04:11:04
    Tagged date                    
    UTC 2014-02-17 04:13:50 
    with which prog?
    Quote Quote  
  20. [QUOTE=Balema;2304127]
    Originally Posted by manono View Post
    Or don't use Handbrake/Vidcoder. I have no trouble getting CFR MP4s.with which prog?
    I don't know what manono uses but I use the x264 command line encoder.

    But why do you care so much? The h.264 video is encoded CFR, it's just the MP4 container that says it's VFR. If you have some device that freaks out with VFR MP4 encode as MKV then remux with MkvToMp4.
    Last edited by jagabo; 24th Feb 2014 at 12:43.
    Quote Quote  
  21. [QUOTE=jagabo;2304128]
    Originally Posted by Balema View Post
    Originally Posted by manono View Post
    Or don't use Handbrake/Vidcoder. I have no trouble getting CFR MP4s.with which prog?
    I don't know what manono uses but I use the x264 command line encoder.

    But why do you care so much? The h.264 video is encoded CFR, it's just the MP4 container that says it's VFR.
    I'm newbie so forgive me if I don't understand everything, you are saying that even it tells me it is variable it is actually constant?
    Quote Quote  
  22. Originally Posted by Balema View Post
    you are saying that even it tells me it is variable it is actually constant?
    Yes.
    Quote Quote  
  23. Originally Posted by Balema View Post
    with which prog?
    AviSynth scripts fed into XviD4PSP. The scripts aren't strictly necessary as it'll take the video input directly. But it creates and uses AviSynth scripts itself and you can do some filtering within the program, if you wish. Because it doesn't accept AviSynth input I find Handbrake and Vidcoder less than useless. Try deinterlacing with QTGMC or unblending something within Handbrake. It can't be done.
    Quote Quote  
  24. By the way, there's some speculation that the problem isn't in the MP4 file but rather it's a bug in MediaInfo. Ie, the h.264 video stream is CFR, the MP4 file is marked CFR, but MediaInfo is reporting it as VFR.
    Quote Quote  
  25. Originally Posted by jagabo View Post
    By the way, there's some speculation that the problem isn't in the MP4 file but rather it's a bug in MediaInfo. Ie, the h.264 video stream is CFR, the MP4 file is marked CFR, but MediaInfo is reporting it as VFR.
    Something like this I've been told from Vidcoder page...
    Quote Quote  
  26. Try Mp4boxgui to demux streams and remux it again into mp4. You seem to have mp4 file with VFR encoded by Handbrake , why not to try it?
    Quote Quote  
  27. If you check the Handbrake log file for one of those "variable" constant frame rate encodes, you'll find it says it's encoding using a constant frame rate.

    Here's something I noticed while playing around. I don't know if it means anything but maybe it'll help someone more clever than myself understand.

    This is the first 5 frames of "original" video, courtesy of ffdshow's on screen display. I ran a test encode using MeGUI and the result was the same:

    Name:  o1.gif
Views: 3052
Size:  10.6 KB
    Name:  o2.gif
Views: 3021
Size:  11.1 KB
    Name:  o3.gif
Views: 3091
Size:  11.1 KB
    Name:  o4.gif
Views: 3078
Size:  11.2 KB
    Name:  o5.gif
Views: 3023
Size:  11.3 KB

    Here's the first 5 frames again after encoding with Handbrake:

    Name:  h1.gif
Views: 3083
Size:  10.5 KB
    Name:  h2.gif
Views: 3078
Size:  11.0 KB
    Name:  h3.gif
Views: 3017
Size:  11.0 KB
    Name:  h4.gif
Views: 3076
Size:  11.2 KB
    Name:  o5.gif
Views: 3023
Size:  11.3 KB

    Note the overlapping raw frame timestamps and also the gaps. By the 5th frame the raw frame timestamps match the original video. That pattern seems to keep repeating. So then.....

    Here's some math which makes sense according to what MediaInfo is reporting. Take the second "Handbrake" frame (current frame 1):
    834083 - 417000 = 417083
    1000/41.7083 = 23.976
    Same again, but this time (because the timestamps from the previous frame overlap):
    834083 - 417083 = 417000
    1000/41.7000 = 23.980815 (very close to the maximum frame rate reported by MediaInfo - 23.981)

    Apply the same logic to frame three (current frame 2) while accounting for the "gap":
    1251194 - 834083 = 417111
    1000/41.7111 = 23.97443 (very close to the minimum frame rate reported by MediaInfo - 23.974)

    I don't really understand any of that, but at least the math makes sense to me.
    Oddly enough, I ran the same encode using Handbrake again, this time with MKV as the output, and while the raw frame timestamps were exactly the same, MediaInfo reported a constant 23.976fps. Maybe I'm completely on the wrong track......

    Here's a bit of the Handbrake logfile from the above encode:

    frame rate: 23.976 fps -> constant 23.976 fps
    + filters
    + Framerate Shaper (1:27000000:1126125)
    + frame rate: 23.976 fps -> constant 23.976 fps

    I'd be interested to learn more about the framerate shaper line. ie how it shapes the frame rate.
    1/27 x 1126125 = 41708.333333333 or
    27000000/1126125 = 23.976023976

    Originally Posted by _Al_ View Post
    Try Mp4boxgui to demux streams and remux it again into mp4. You seem to have mp4 file with VFR encoded by Handbrake , why not to try it?
    I did. After remuxing the extracted h264 stream, MediaInfo reports a constant frame rate and ffdshow reports the same "Raw frame timestamps" as the original video.
    Last edited by hello_hello; 27th Feb 2014 at 10:05.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!