4

I have a .MTS 1080i of 25fps (mediainfo) that I deinterlaced with avconv -i input.MTS -vf yadif -c:a copy output.mp4. As the wiki says, the default value for yadif is 0 which "outputs one frame for each frame".

My question is, why does output.mp4 have 50fps? Also, is it normal that it is much smaller than the input?

As requested:

wantoast@crunchbang:~/videos/video/videocamera$ avconv -i 00000.MTS
avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers
  built on Sep 16 2014 23:10:48 with gcc 4.7.2
Input #0, mpegts, from '00000.MTS':
  Duration: 00:00:37.44, start: 1.000033, bitrate: 16506 kb/s
  Program 1 
    Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
    Stream #0.2[0x1200]: Subtitle: pgssub
At least one output file must be specified
wantoast@crunchbang:~/videos/video/videocamera$ avconv -i 00000.MTS -vf yadif -c:a copy output.mp4
avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers
  built on Sep 16 2014 23:10:48 with gcc 4.7.2
Input #0, mpegts, from '00000.MTS':
  Duration: 00:00:37.44, start: 1.000033, bitrate: 16506 kb/s
  Program 1 
    Stream #0.0[0x1011]: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn, 50 tbc
    Stream #0.1[0x1100]: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
    Stream #0.2[0x1200]: Subtitle: pgssub
[buffer @ 0xa5eb40] w:1920 h:1080 pixfmt:yuv420p
[yadif @ 0xa5cba0] mode:0 parity:-1 auto_enable:0
[libx264 @ 0xa59b00] using SAR=1/1
[libx264 @ 0xa59b00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0xa59b00] profile Main, level 4.2
[libx264 @ 0xa59b00] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=0 b_adapt=1 b_bias=0 direct=1 weightb=0 open_gop=1 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.25 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf53.21.1
    Stream #0.0: Video: libx264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], q=-1--1, 50 tbn, 50 tbc
    Stream #0.1: Audio: ac3, 48000 Hz, stereo, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (copy)
Press ctrl-c to stop encoding
frame= 1870 fps= 16 q=-1.0 Lsize=   29093kB time=37.38 bitrate=6375.8kbits/s dup=935 drop=0    
video:27902kB audio:1170kB global headers:0kB muxing overhead 0.070776%
[libx264 @ 0xa59b00] frame I:122   Avg QP:22.47  size: 49023
[libx264 @ 0xa59b00] frame P:1748  Avg QP:25.43  size: 12923
[libx264 @ 0xa59b00] mb I  I16..4: 61.9%  0.0% 38.1%
[libx264 @ 0xa59b00] mb P  I16..4:  2.8%  0.0%  0.5%  P16..4: 36.5%  2.8%  1.7%  0.0%  0.0%    skip:55.7%
[libx264 @ 0xa59b00] coded y,uvDC,uvAC intra: 38.5% 80.0% 19.8% inter: 7.1% 27.2% 0.2%
[libx264 @ 0xa59b00] i16 v,h,dc,p: 35% 18% 15% 31%
[libx264 @ 0xa59b00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 18% 35%  4%  3%  3%  4%  3%  2%
[libx264 @ 0xa59b00] i8c dc,h,v,p: 50% 18% 26%  6%
[libx264 @ 0xa59b00] Weighted P-Frames: Y:1.1% UV:0.7%
[libx264 @ 0xa59b00] ref P L0: 63.3%  9.7% 13.0% 13.9%  0.1%
[libx264 @ 0xa59b00] kb/s:6111.45
wantoast@crunchbang:~/videos/video/videocamera$ avconv -i output.mp4 
avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers
  built on Sep 16 2014 23:10:48 with gcc 4.7.2
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x216e460] multiple edit list entries, a/v desync might occur, patch welcome
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf53.21.1
  Duration: 00:00:37.47, start: 0.000000, bitrate: 6358 kb/s
    Stream #0.0(und): Video: h264 (Main), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 6111 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
    Stream #0.1(und): Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
At least one output file must be specified
5
  • Please include the full command-line output of your conversion command as well as avconv -i output.mp4.
    – slhck
    Commented Oct 19, 2014 at 16:26
  • 1
    As for your second question: Yes, because it uses the default options to re-encode the video bitstream, which is likely to result in a low bitrate and consequently in low quality output.
    – slhck
    Commented Oct 19, 2014 at 16:30
  • Added. And how can I know what these defaults are exactly?
    – Wantoast
    Commented Oct 19, 2014 at 17:00
  • Hm, I don't know why it doesn't show 25. The original should be 50 fields per second, yielding 25 frames. The output should just show 25 fps. The default encoder for your build is x264, which uses a Constant Rate Factor of 23 to encode. This is a sensible default, so it's not a big issue in your case. You can use -crf 18 to force better quality, for example.
    – slhck
    Commented Oct 19, 2014 at 17:42
  • The default x264 options for some reason aren't using 8x8dct. Does avconv target the h.264 main profile (instead of the normal high profile) for .mp4 output? Use -preset slower -crf 18 (or whatever, but 18 is usually transparent). Use -profile high if it's still not using 8x8dct=1, unless you're targeting obsolete devices which don't support it. Use a lossless codec instead (huffyuv maybe?) if you're going to edit after deinterlacing, before encoding to a final file. Commented Dec 26, 2014 at 19:52

1 Answer 1

0

The original file is 25 fields per second and 50 frames per second are required to preserve correct motion. The fact of the matter even youtube uses 25 frames per second and loses half of motion. That is just wrong.

Other than that -crf 18 is needed to get good enough quality.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .