[FFmpeg-user] problem with min-keyint and dash

negin tebyani negin.tebyani at gmail.com
Sun Apr 16 08:59:53 EEST 2017


I have encoded myu videos using ffmpeg with this command:

ffmpeg -i input.mp4 -movflags faststart -c:v libx264 -x264opts
'keyint=100:min-keyint=25:no-scenecut:8x8dct:sliced-threads=0' -deblock 1:1
-flags +loop -b:v 850k -maxrate 850k -bufsize 2000k -nal-hrd cbr -vf
"scale=-1280:720:flags=spline+full_chroma_inp+full_chroma_int+accurate_rnd+bitexact"
-acodec libfdk_aac -b:a 320k -coder 1 -me_range 16 -bf 10 -q:v 1 -qmin 0
-qmax 69 -trellis 2 -mbtree 1 -mixed-refs 1 -preset veryslow output.mp4

videos mediainfo:

Complete name                            : high.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 555 MiB
Duration                                 : 1h 8mn
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 127 Kbps
Writing application                      : Lavf56.25.101

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High at L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1h 8mn
Bit rate                                 : 802 Kbps
Nominal bit rate                         : 850 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 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                                : Progressive
Bits/(Pixel*Frame)                       : 0.035
Stream size                              : 395 MiB (71%)
Writing library                          : x264 core 142 r2495 6a301b6
Encoding settings                        : cabac=1 / ref=1 / deblock=1:1:1
/ analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 /
mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 /
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 /
lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 /
bluray_compat=0 / constrained_intra=0 / bframes=10 / b_pyramid=2 /
b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 /
keyint=100 / keyint_min=51 / scenecut=0 / intra_refresh=0 / rc_lookahead=10
/ rc=cbr / mbtree=1 / bitrate=850 / ratetol=1.0 / qcomp=0.60 / qpmin=0 /
qpmax=69 / qpstep=4 / vbv_maxrate=850 / vbv_bufsize=4000 / nal_hrd=none /
filler=0 / ip_ratio=1.40 / aq=1:1.00
Language                                 : English

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 1h 8mn
Bit rate mode                            : Variable
Bit rate                                 : 320 Kbps
Maximum bit rate                         : 850 Kbps
Channel count                            : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Delay relative to video                  : 80ms
Stream size                              : 158 MiB (28%)
Language                                 : English


I have created three bitrates.

I am using MP4Box to make a dash video out of these three bitrates. so I
have to use a fixed gop. the MP4box team advises to set keyint equal to
min-key int. here when I try to do that (set both to 100), mediainfo on
output video shows a min-keyint=51

this is my first issue that I need to fix.

and the second is related to dash.

this is my mp4box command:

MP4Box -dash 4000 -rap -segment-name %s_ -bs-switching no  -out
Dash/manifest.mpd low.mp4#video med.mp4#video high.mp4#video low.mp4#audio
med.mp4#audio high.mp4#audio

the dash works fine on players, but when I seek in the video, after jumping
to that segment, the video freezes for a few seconds and then starts to
play. the delay in NOT before jumping there, it happens afer that.

can anyone help me with it??


More information about the ffmpeg-user mailing list