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.
+ Reply to Thread
Results 1 to 6 of 6
-
-
Just use AssumeFPS() to set the correct frame rate. Or a different source filter that understands your source. Try ffVideoSource() or LWlibavVideoSource().
-
as further detail,...
The 'problem' is PAFF interlacing in MP4.
Maybe interesting: https://ffmpeg.org/pipermail/ffmpeg-user/2017-January/034878.html
MediaInfo reports:
for such a remux.Code:Frame rate : 50.000 FPS Original frame rate : 25.000 FPS Scan type : Interlaced Scan order : Top Field First
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 Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
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:
Players play it correctly as 25 interlaced (woven) frames per second, unless they apply double rate deinterlacing to 50fps progressive.Code:Frame rate : 25.000 FPS Scan type: Interlaced Scan type, store method: Separated fields Scan order: Top Field First
(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.
-
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
Similar Threads
-
ffmpg MTS to MP4 - no metadata :(
By fabrizio.medici in forum Video ConversionReplies: 5Last Post: 19th Aug 2024, 14:23 -
---
By Anonymous84 in forum Video ConversionReplies: 4Last Post: 18th Jul 2023, 20:25 -
MTS remux to MP4 in Avidemux outputs to different framerate
By techmot in forum Video ConversionReplies: 0Last Post: 16th Mar 2023, 04:56 -
Mp4,mts to mpg
By chunu in forum Video ConversionReplies: 8Last Post: 22nd Dec 2022, 07:49 -
Changing Containers from MTS to MKV or MP4
By loopback in forum Video ConversionReplies: 4Last Post: 31st Jul 2022, 12:51



Quote