[FFmpeg-user] what is wrong with my fragment command please ?

hanguofu hanguofu at 163.com
Thu Mar 19 18:40:20 EET 2020


I tried to slice a local video with the latest ffmpeg . It did fragment the expected video clips with the following command. But the video clips has a serious problem : 
some of them just has a few seconds play time , the picture just freezes for the rest time . For example , a fragmented  video clip lasts 15 seconds or so , but it just has a video last 8 seconds and the video freezes at the rest seconds .


 C:\ffmpeg\ffmpeg-20200315-c467328-win64-static\bin\ffmpeg.exe   -re  -ss 120 -t 450 -i F:\music\sora_resample.mp4   -c:v libx264  -b:v 1000k    -c:a aac -ac 2 -b:a 64k -s 800x480  -map 0 -f segment  -force_key_frames "expr:gte(t,n_forced*15)"   -segment_list playlist.m3u8  -segment_list_flags +live -segment_time 15 -segment_format_options movflags=+faststart -segment_time_delta 0.5  out%03d.mp4
ffmpeg version git-2020-03-15-c467328 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.100 / 56. 42.100
  libavcodec     58. 75.100 / 58. 75.100
  libavformat    58. 41.100 / 58. 41.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.100 /  7. 77.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\music\sora_resample.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
  Duration: 02:14:56.13, start: 0.000000, bitrate: 1273 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1200 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0000019237dcbbc0] using SAR=16/15
[libx264 @ 0000019237dcbbc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0000019237dcbbc0] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 0000019237dcbbc0] 264 - core 159 - H.264/MPEG-4 AVC codec - Copyleft 2003-2019 - http://www.videolan.org/x264.html - 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=6 lookahead_threads=1 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=1000 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[segment @ 0000019237dd2fc0] Opening 'out000.mp4' for writing
Output #0, segment, to 'out%03d.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.41.100
    Stream #0:0(und): Video: h264 (libx264), yuv420p, 800x480 [SAR 16:15 DAR 16:9], q=-1--1, 1000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.75.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: N/A
    Stream #0:1(und): Audio: aac (LC), 48000 Hz, stereo, fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.75.100 aac
[mp4 @ 000001923be4d680] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out001.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out002.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out003.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out004.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out005.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out006.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out007.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out008.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out009.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out010.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out011.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out012.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out013.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out014.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out015.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out016.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out017.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out018.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out019.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out020.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out021.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out022.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out023.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out024.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out025.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out026.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out027.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out028.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out029.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
[segment @ 0000019237dd2fc0] Opening 'out030.mp4' for writing
[mp4 @ 000001923be91880] Starting second pass: moving the moov atom to the beginning of the file
[segment @ 0000019237dd2fc0] Opening 'playlist.m3u8.tmp' for writing
frame=13488 fps= 30 q=-1.0 Lsize=N/A time=00:07:30.00 bitrate=N/A dup=1 drop=0 speed=0.999x
video:55196kB audio:3539kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0000019237dcbbc0] frame I:74    Avg QP:17.15  size: 54862
[libx264 @ 0000019237dcbbc0] frame P:3451  Avg QP:20.41  size: 10668
[libx264 @ 0000019237dcbbc0] frame B:9963  Avg QP:26.09  size:  1570
[libx264 @ 0000019237dcbbc0] consecutive B-frames:  0.9%  1.4%  1.2% 96.5%
[libx264 @ 0000019237dcbbc0] mb I  I16..4:  5.6% 62.2% 32.3%
[libx264 @ 0000019237dcbbc0] mb P  I16..4:  1.0%  3.1%  0.9%  P16..4: 37.0% 25.7% 17.6%  0.0%  0.0%    skip:14.8%
[libx264 @ 0000019237dcbbc0] mb B  I16..4:  0.0%  0.2%  0.1%  B16..8: 38.9%  4.5%  0.9%  direct: 0.9%  skip:54.5%  L0:40.0% L1:51.1% BI: 8.9%
[libx264 @ 0000019237dcbbc0] final ratefactor: 20.64
[libx264 @ 0000019237dcbbc0] 8x8 transform intra:62.2% inter:66.0%
[libx264 @ 0000019237dcbbc0] coded y,uvDC,uvAC intra: 66.1% 82.6% 53.9% inter: 11.9% 13.4% 1.2%
[libx264 @ 0000019237dcbbc0] i16 v,h,dc,p: 22% 35%  8% 35%
[libx264 @ 0000019237dcbbc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 18% 17%  5%  7%  8%  8%  8%  7%
[libx264 @ 0000019237dcbbc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 19% 10%  5%  9% 10%  9%  7%  6%
[libx264 @ 0000019237dcbbc0] i8c dc,h,v,p: 43% 22% 24% 11%
[libx264 @ 0000019237dcbbc0] Weighted P-Frames: Y:0.2% UV:0.0%
[libx264 @ 0000019237dcbbc0] ref P L0: 63.6% 15.1% 15.1%  6.2%  0.0%
[libx264 @ 0000019237dcbbc0] ref B L0: 91.1%  7.2%  1.7%
[libx264 @ 0000019237dcbbc0] ref B L1: 94.7%  5.3%
[libx264 @ 0000019237dcbbc0] kb/s:1004.69
[aac @ 0000019237dcd680] Qavg: 160.171


  


More information about the ffmpeg-user mailing list