[FFmpeg-user] Converting Interlaced MPEG-2 video in MKV container to MP4 container

Gary Cattelino gcattelino at roadrunner.com
Mon Jan 26 05:07:00 CET 2015


Right, I suppose that mediainfo could be reporting incorrect information. 
Not sure how to verify mediainfo. The video seems to play okay, so maybe my 
frame rate concerns aren't valid.

Here's the console output of my ffmpeg command. The only thing that jumps 
out at me that might be a concern is:
[mp4 @ 0000000000334bc0] track 1: codec frame size is not set

>ffmpeg -i input.mkv -vcodec copy -acodec copy out.mp4
ffmpeg version N-68826-g504267f Copyright (c) 2000-2014 the FFmpeg 
developers
  built on Jan  2 2015 22:12:34 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca 
 --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib
modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw
b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame  
--en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enab
le-zlib
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 19.100 / 56. 19.100
  libavformat    56. 16.102 / 56. 16.102
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  6.100 /  5.  6.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'input.mkv':
  Metadata:
    title           : input.mkv
    encoder         : libmakemkv v1.9.0 (1.3.0/1.4.1) win(x64-release)
    creation_time   : 2015-01-18 22:22:50
  Duration: 00:15:25.99, start: 0.000000, bitrate: 4924 kb/s
    Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 
32:27
DAR 16:9], max. 8000 kb/s, SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k 
tbn
, 59.94 tbc
    Stream #0:1(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      title           : Stereo
[mp4 @ 0000000000334bc0] track 1: codec frame size is not set
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : out.mp4
    encoder         : Lavf56.16.102
    Stream #0:0(eng): Video: mpeg2video (a[0][0][0] / 0x0061), yuv420p, 
720x480
[SAR 186:157 DAR 279:157], q=2-31, max. 8000 kb/s, 29.97 fps, 29.97 tbr, 16k 
tbn
, 1k tbc
    Stream #0:1(eng): Audio: ac3 ([165][0][0][0] / 0x00A5), 48000 Hz, 
stereo, 19
2 kb/s (default)
    Metadata:
      title           : Stereo
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 6332 fps=0.0 q=-1.0 size=  153144kB time=00:04:22.20 
bitrate=4784.6kbits/
frame=14715 fps=14714 q=-1.0 size=  360056kB time=00:10:11.45 
bitrate=4823.9kbit
frame=18744 fps=12495 q=-1.0 size=  462148kB time=00:12:59.55 
bitrate=4856.5kbit
frame=22295 fps=11242 q=-1.0 Lsize=  556796kB time=00:15:25.98 
bitrate=4925.9kbi
ts/s
video:534379kB audio:21703kB subtitle:0kB other streams:0kB global 
headers:0kB m
uxing overhead: 0.128580%


-----Original Message----- 
From: Lou
Sent: Sunday, January 25, 2015 10:22 AM
To: ffmpeg-user at ffmpeg.org
Cc: Gary Cattelino
Subject: Re: [FFmpeg-user] Converting Interlaced MPEG-2 video in MKV 
container to MP4 container

On Mon, 19 Jan 2015 21:26:54 -0800
"Gary Cattelino" <gcattelino at roadrunner.com> wrote:

> I'm using the latest windows ffmpeg build. To change interlaced MPEG-2
> video from a mkv to mp4 container, the command I'm using is "ffmpeg -i
> input.mkv -vcodec copy -acodec copy out.mp4".  I'm concerned that the
> out.mp4 file has a variable frame rate, while the input.mkv file has a
> constant frame rate of 29.970:

The complete ffmpeg console output from your command is missing.

How do you know that mediainfo isn't the problem?
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

I'm using the latest windows ffmpeg build. To change interlaced MPEG-2 video 
from a mkv to mp4 container, the command I'm using is "ffmpeg -i 
input.mkv -vcodec copy -acodec copy out.mp4".  I'm concerned that the 
out.mp4 file has a variable frame rate, while the input.mkv file has a 
constant frame rate of 29.970:

input.mkv:

Width: 720 pixels
Height: 480 pixels
Display aspect ratio: 16:9
Frame rate mode: Constant
Frame rate: 29.970 fps
Standard: NTSC
Color space: YUV
Chroma subsampling: 4:2:0
Bit depth: 8 bits
Scan type: Interlaced
Scan order: Top Field First

out.mp4:

Width: 720 pixels
Height: 480 pixels
Display aspect ratio: 16:9
Original display aspect ratio: 16:9
Frame rate mode: Variable
Frame rate: 24.077 fps
Original frame rate: 29.970 fps
Minimum frame rate: 20.000 fps
Maximum frame rate: 30.303 fps
Standard: NTSC
Color space: YUV
Chroma subsampling: 4:2:0
Bit depth: 8 bits
Scan type: Interlaced
Scan order: Top Field First

What's the best way to change this video to a MP4 container and maintain a 
constant frame rate without transcoding? I tried to force interlace support 
(-ilme), but the windows build doesn't seem to support that.

Thanks.



More information about the ffmpeg-user mailing list