[mythtv-users] H264 conversion of interlaced MPEG2?

dennis deg at outlook.com
Tue May 5 02:12:06 UTC 2015


>
> But a frame rate conversion is going to have a negative impact on 
> picture quality.   Everything else in Mike Stucky's script is 
> optimized for quality ('slow' preset and crf of 18), so I doubt he 
> would want to do that. If broken seektables are the problem, I would 
> think it would be a far better solution to just rebuild the 
> seektable(s) if necessary after the conversion as part of the script...
>
> - Dave
>

A seektable is not used for h264 videos.   After conversion,  you need 
to clear the entries in the seektable  ( rebuilding it will clear it ).

To improve the ability to seek,  a smaller GOP can be used so the 
keyframes are closer.   By default for ffmpeg/x264 is a key every 250 
frames,  or every 8.3 seconds.   If you go lower, such as 50 frames,  
the keys are 1.6s,  this makes the seeking much more accurate.  This 
does come at the expense of higher bitrate.

You can also play with scenecut thresholds,  which also determine when 
keyframe are used.  I normally set this to 60, which also produces 
sightly more keyframes.   Increasing this value lowers the threshold of 
when keyframes are generated,  based on the frame content and how much 
of the frame is changed.

    --keyint <integer> (x264)
    *-g <integer>*(FFmpeg)
    Keyframe interval, also known as GOP length. This determines the
    maximum distance between I-frames. Very high GOP lengths will result
    in slightly more efficient compression, but will make seeking in the
    video somewhat more difficult. Recommended default: 250 

    --scenecut <integer> (x264)
    *-sc_threshold <integer>*(FFmpeg)
    Adjusts the sensitivity of x264's scenecut detection. Rarely needs
    to be adjusted. Recommended default: 40

If you plan on streaming the video to a mobile device,  you also want to 
move 'moov atom' to the beginning of the file, so it can utilize 
faststart.   This allows the video to start streaming before the entire 
file is transferred.   ( -movflags faststart ).

Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20150504/45f81387/attachment.html>


More information about the mythtv-users mailing list