VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    May 2005
    Location
    PAL User
    Search Comp PM
    Hello all, I'm working with some MTS files from my Panasonic HS9 HD video camera which records interlaced HD AVC at 25fps in the MTS container.

    I am experimenting doing a "Copy" conversion to MP4 but, when I use the AVIDemux and FFMPEG simple "copy" function, the result is a doubling to 50fps.

    When I then deinterlace that with QTGMC, I get 100fps; not what I want.

    Is there a way of using AVIDemux or FFMPEG to change the container to MP4 while preserving the interlacing and fps at 25?

    I've attached a representative MTS.

    Thanks for any input.
    Image Attached Files
    Quote Quote  
  2. Just use AssumeFPS() to set the correct frame rate. Or a different source filter that understands your source. Try ffVideoSource() or LWlibavVideoSource().
    Quote Quote  
  3. as further detail,...
    The 'problem' is PAFF interlacing in MP4.
    Maybe interesting: https://ffmpeg.org/pipermail/ffmpeg-user/2017-January/034878.html

    MediaInfo reports:
    Code:
    Frame rate                  : 50.000 FPS
    Original frame rate         : 25.000 FPS
    Scan type                   : Interlaced
    Scan order                  : Top Field First
    for such a remux.

    This means:
    - The MP4 container's sample timing indicates 50 video samples per second.
    - The AVC bitstream signals an original frame rate of 25 fps.
    - The video is interlaced, with 50 fields per second (25 frames per second).

    This does not mean the video has been converted to 50p.

    For field-coded AVC (such as PAFF), this is an expected representation in an MP4 container. MediaInfo derives the reported container frame rate from the MP4 sample timing, while the original frame rate comes from the AVC stream metadata.

    Note:
    a. This is not a universal requirement for every PAFF stream. It describes how this particular stream is represented and reported.
    b. MediaPlayers should handle this correctly and properly playback the stream.


    Assuming you want to not modify the source video stream, you can:
    a. either live with it and make sure any tools you use with this use the stream frame rate instead of the container frame rate.
    b. use a container which supports this better i.e. mkv (mov is basically mp4 and will have the same 'issue')

    If you want to deinterlace later, using some automated way make sure the stream not the container frame rate is used as basis.
    If you write the script yourself, use AssumeFPS(..).

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  4. My Panasonic SD-HDC60 stores interlaced video as separated fields (25 fps, 50 tbr, 90k tbn) rather than interleaved (woven), but flags the framerate as 25 interlaced frames per second.

    MediaInfo:
    Code:
    Frame rate :	25.000 FPS
    Scan type:      Interlaced
    Scan type, store method:   Separated fields
    Scan order:      Top Field First
    Players play it correctly as 25 interlaced (woven) frames per second, unless they apply double rate deinterlacing to 50fps progressive.

    (AFAIK, field separated PAFF became the standard for interlaced HEVC, e.g. for x265)

    Edit: Not sure whether one could "fix" the .mp4 fps stream/container ambiguity without recoding, using ffmpeg's bitstream filter (-bsf) .....
    https://ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmetadata

    Edit2: After some attempts no avail with h.264 metadata manipulations . Depends on the source filter which rate (frame or field) it delivers as input to the subsequent processing.
    Last edited by Sharc; 4th Dec 2026 at 13:52.
    Quote Quote  
  5. deleted
    Last edited by Sharc; 4th Dec 2026 at 10:58.
    Quote Quote  
  6. See if this is what you want:
    It is about the simplest encode or re-encode whichever term you prefer.
    If needed you can make the h264 options more complex.
    Code:
    ffmpeg -i 00000.MTS -fps_mode cfr -r 25 -c:v libx264 -c:a copy output.mp4
    Image Attached Files
    Quote Quote  



Similar Threads