[FFmpeg-user] ffmpeg h.264 long gop encoding and interlaced encoding

Henk Schoneveld belcampo at zonnet.nl
Mon Mar 4 23:25:30 CET 2013



Sent from my iPod

On 4 mrt. 2013, at 09:40, Filippo Righi <filippo.righi at me.com> wrote:

> Hi there,
> this is my message i sent 10 days ago to ffmpeg.org
> 
> I am trying to convert a MOV video into a MP4 (progressive).
> I would like to maintain the same GOP settings codification.
> This are metadata of my video:
Basically you're asking for an all I-frame/keyframe format, which will compress very badly because of this.
The -g 1 option will do what you want. Because of the all i-frame what do you want to achieve?
Henk
> 
>   fil at fil-ubuntu:~/Scrivania$ mediainfo 720p_50p_full.MOV
>   General
>   Complete name : 720p_50p_full.MOV
>   Format : MPEG-4
>   Format profile : QuickTime
>   Codec ID : qt
>   File size : 81.3 MiB
>   Duration : 8s 560ms
>   Overall bit rate mode : Variable
>   Overall bit rate : 79.7 Mbps
>   Encoded date : UTC 2013-02-15 13:08:12
>   Tagged date : UTC 2013-02-15 13:08:12
>   Copyright : http://www.technophil.sm
>   com.apple.quicktime.make : Canon
>   com.apple.quicktime.model : Canon EOS 6D
>   com.apple.quicktime.author : TechnoPhil
> 
>   Video
>   ID : 1
>   Format : AVC
>   Format/Info : Advanced Video Codec
>   Format profile : High at L5.1
>   Format settings, CABAC : No
>   Format settings, ReFrames : 1 frame
>   Format settings, GOP : N=1
>   Codec ID : avc1
>   Codec ID/Info : Advanced Video Coding
>   Duration : 8s 560ms
>   Bit rate mode : Variable
>   Bit rate : 78.0 Mbps
>   Width : 1 280 pixels
>   Height : 720 pixels
>   Display aspect ratio : 16:9
>   Frame rate mode : Constant
>   Frame rate : 50.000 fps
>   Color space : YUV
>   Chroma subsampling : 4:2:0
>   Bit depth : 8 bits
>   Scan type : Progressive
>   Bits/(Pixel*Frame) : 1.693
>   Stream size : 79.6 MiB (98%)
>   Language : English
>   Encoded date : UTC 2013-02-15 13:08:12
>   Tagged date : UTC 2013-02-15 13:08:12
>   Color primaries : BT.709
>   Transfer characteristics : BT.709
>   Matrix coefficients : BT.709
> 
> 
> I am using this script:
> 
> for i in *.MOV; do newname=`basename $i .MOV`.mp4; ffmpeg -i $i -s 1280x720 -b 5000k -bt 10000k -aspect 16:9 -r 50 -vcodec libx264 -ac 2 -ar 48000 -ab 256k -threads 4 $newname; done
> 
> The result is:
> 
>   fil at fil-ubuntu:~/Scrivania$ mediainfo 720p_50p_full.mp4
>   General
>   Complete name : 720p_50p_full.mp4
>   Format : MPEG-4
>   Format profile : Base Media
>   Codec ID : isom
>   File size : 5.29 MiB
>   Duration : 8s 576ms
>   Overall bit rate : 5 170 Kbps
>   Encoded date : UTC 2013-02-15 13:08:12
>   Tagged date : UTC 2013-02-15 13:08:12
>   Writing application : Lavf53.21.1
> 
>   Video
>   ID : 1
>   Format : AVC
>   Format/Info : Advanced Video Codec
>   Format profile : Main at L3.2
>   Format settings, CABAC : Yes
>   Format settings, ReFrames : 3 frames
>   Codec ID : avc1
>   Codec ID/Info : Advanced Video Coding
>   Duration : 8s 560ms
>   Bit rate : 5 000 Kbps
>   Width : 1 280 pixels
>   Height : 720 pixels
>   Display aspect ratio : 16:9
>   Frame rate mode : Constant
>   Frame rate : 50.000 fps
>   Color space : YUV
>   Chroma subsampling : 4:2:0
>   Bit depth : 8 bits
>   Scan type : Progressive
>   Bits/(Pixel*Frame) : 0.109
>   Stream size : 5.01 MiB (95%)
>   Writing library : x264 core 123 r2189 35cf912
>   Encoding settings : 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=4 / 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=abr / mbtree=1 / bitrate=5000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.25 / aq=1:1.00
>   Language : English
>   Encoded date : UTC 2013-02-15 13:08:12
>   Tagged date : UTC 2013-02-15 13:08:12
> 
> How can i maintain the same GOP settings codification for both progressive and interlaced video files?
> And how can i change the "scan type" into interlaced?
> How can i change the "scan order" (Bottom Field First - Top Field First) fot interlaced encoding?
> 
>   ...
>   Complete name : 109G0135_01_1080i.MP4
>   Format : MPEG-4
>   Commercial name : XDCAM EX 35
>   Format profile : Base Media / Version 2
>   Codec ID : mp42
>   File size : 59.2 MiB
>   Duration : 13s 920ms
>   Overall bit rate mode : Variable
>   Overall bit rate : 35.7 Mbps
>   Encoded date : UTC 2012-01-21 23:51:10
>   Tagged date : UTC 2012-01-21 23:51:10
> 
>   Video
>   ID : 1
>   Format : MPEG Video
>   Commercial name : XDCAM EX 35
>   Format version : Version 2
>   Format profile : Main at High
>   Format settings, BVOP : Yes
>   Format settings, Matrix : Custom
>   Format settings, GOP : M=3, N=12
>   Codec ID : 61
>   Duration : 13s 920ms
>   Bit rate mode : Variable
>   Bit rate : 34.0 Mbps
>   Maximum bit rate : 35.0 Mbps
>   Width : 1 920 pixels
>   Height : 1 080 pixels
>   Display aspect ratio : 16:9
>   Frame rate mode : Constant
>   Frame rate : 25.000 fps
>   Color space : YUV
>   Chroma subsampling : 4:2:0
>   Bit depth : 8 bits
>   Scan type : Interlaced
>   Scan order : Top Field First
>   Compression mode : Lossy
>   ...
> 
> 
> Best regards.
> 
> Filippo
> 
> --
> Dr. Filippo Righi
> www.technophil.sm
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list