ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 11326|回复: 0

[Linux] 将视频从隔行扫描转为逐行扫描

[复制链接]
发表于 2014-8-20 16:28:42 | 显示全部楼层 |阅读模式
其实主要是这个参数: -deinterlace
隔行扫描的视频一般在播放的时候,会有横条感,逐行扫描的视频播放的时候感觉会好很多,会感觉清晰很多
命令行如下:
[AppleScript] 纯文本查看 复制代码
ffmpeg -i 1.mts -strict -2 -vcodec libx264 -vb 2000k -deinterlace -r 30 -vprofile high -vlevel 5.1 -acodec aac -ar 44100 -ab 128k a.mp4


输出内容如下:
[AppleScript] 纯文本查看 复制代码
[root@localhost qi.liu]# ./ccmediasystem/trunk/3rdparty/ffmpeg/_release/bin/ffmpeg -i 2.mts -strict -2 -vcodec libx264 -vb 2000k -deinterlace -r 30 -vprofile high -vlevel 5.1 -acodec aac -ar 44100 -ab 128k b.mp4
ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 28 2014 14:16:31 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-54)
  configuration: --enable-gpl --enable-nonfree --yasmexe=/data/cache1/qi.liu/ccmediasystem/trunk/3rdparty/ffmpeg/_release/bin/yasm --prefix=/data/cache1/qi.liu/ccmediasystem/trunk/3rdparty/ffmpeg/_release --cc= --enable-static --disable-shared --disable-debug --extra-cflags='-I${ffmpeg_exported_release_dir}/include' --extra-ldflags='-L${ffmpeg_exported_release_dir}/lib -lm -ldl' --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --enable-postproc --enable-bzlib --enable-zlib --enable-parsers --enable-libfreetype --enable-libx264 --enable-libmp3lame --enable-libfaac --enable-pthreads --extra-libs=-lpthread --enable-encoders --enable-decoders --enable-avfilter --enable-muxers --enable-demuxers
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from '2.mts':
  Duration: 00:07:46.16, start: 1.433333, bitrate: 11571 kb/s
  Program 1
    Metadata: bbs.chinaffmpeg.com 孙悟空
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 256 kb/s
File 'b.mp4' already exists. Overwrite ? [y/N] y
[libx264 @ 0x16a1fd40] using SAR=4/3
[libx264 @ 0x16a1fd40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x16a1fd40] profile High, level 5.1
[libx264 @ 0x16a1fd40] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - [url]http://www.videolan.org/x264.html[/url] - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'b.mp4':
  Metadata:
    encoder         : ChinaCache Encoder (By GMP) bbs.chinaffmpeg.com 孙悟空
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1440x1080 [SAR 4:3 DAR 16:9], q=-1--1, 2000 kb/s, 15360 tbn, 30 tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (ac3 -> aac)
Press [q] to stop, [?] for help
frame=13985 fps= 29 q=-1.0 Lsize=  121231kB time=00:07:46.21 bitrate=2130.2kbits/s dup=29 drop=0
video:113456kB audio:7295kB subtitle:0 global headers:0kB muxing overhead 0.397247%
[libx264 @ 0x16a1fd40] frame I:72    Avg QP:27.53  size: 36793
[libx264 @ 0x16a1fd40] frame P:7947  Avg QP:30.67  size: 11377
[libx264 @ 0x16a1fd40] frame B:5966  Avg QP:33.28  size:  3875
[libx264 @ 0x16a1fd40] consecutive B-frames: 18.2% 71.8%  8.8%  1.2%
[libx264 @ 0x16a1fd40] mb I  I16..4: 25.8% 64.5%  9.6%
[libx264 @ 0x16a1fd40] mb P  I16..4:  4.4%  5.5%  0.3%  P16..4: 39.9%  5.1%  2.1%  0.0%  0.0%    skip:42.7%
[libx264 @ 0x16a1fd40] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 37.6%  1.2%  0.1%  direct: 0.2%  skip:60.7%  L0:33.0% L1:66.2% BI: 0.8%
[libx264 @ 0x16a1fd40] final ratefactor: 28.66
[libx264 @ 0x16a1fd40] 8x8 transform intra:54.8% inter:88.6%
[libx264 @ 0x16a1fd40] coded y,uvDC,uvAC intra: 22.1% 31.5% 2.1% inter: 7.4% 7.1% 0.0%
[libx264 @ 0x16a1fd40] i16 v,h,dc,p: 44% 21% 11% 24%
[libx264 @ 0x16a1fd40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26%  9% 39%  3%  4%  7%  4%  5%  3%
[libx264 @ 0x16a1fd40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 33% 15% 19%  4%  7%  9%  5%  5%  3%
[libx264 @ 0x16a1fd40] i8c dc,h,v,p: 70% 10% 17%  3%
[libx264 @ 0x16a1fd40] Weighted P-Frames: Y:7.1% UV:2.3%
[libx264 @ 0x16a1fd40] ref P L0: 68.2% 19.9%  9.3%  2.6%  0.1%
[libx264 @ 0x16a1fd40] ref B L0: 91.1%  8.6%  0.2%
[libx264 @ 0x16a1fd40] ref B L1: 98.7%  1.3%
[libx264 @ 0x16a1fd40] kb/s:1993.76
[root@localhost qi.liu]#



隔行行扫描的图像如下:

逐行扫描的图像如下



本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-12-27 13:28 , Processed in 0.051722 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表