帮助页
切面生成索引文件
- 生成ts文件
- ffmpeg -readrate 1 -i out.mp4 -c copy output.ts
- 切割成子文件
- ffmpeg -i output.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 60 output%03d.ts
- 查看元数据(Duration/start/bitrate)
- ffprobe output001.ts
下载文件转码
``` C:\Users\Administrator\Desktop\day1>ffmpeg -i “https://vd3.bdstatic.com/mda-nd51rcbpx8u2erzj/sc/cae_h264_delogo/1649207917032387475/mda-nd51rcbpx8u2erzj.mp4?v_from_s=hkapp-haokan-hnb&auth_key=1649237231-0-0-c67215553e47aa8da021bc163e4f95a1&bcevod_channel=searchbox_feed&pd=1&cd=0&pt=3&logid=3431593477&vid=8991987012167218537&abtest=100815_2-101454_1-17451_1&klogid=3431593477“ chen.mp4 ffmpeg version 4.3.1-2021-01-01-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev5, Built by MSYS2 project) configuration: —enable-gpl —enable-version3 —enable-static —disable-w32threads —disable-autodetect —enable-fontconfig —enable-iconv —enable-gnutls —enable-libxml2 —enable-gmp —enable-lzma —enable-zlib —enable-libsrt —enable-libssh —enable-libzmq —enable-avisynth —enable-sdl2 —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxvid —enable-libaom —enable-libopenjpeg —enable-libvpx —enable-libass —enable-libfreetype —enable-libfribidi —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —enable-libmfx —enable-libgme —enable-libopenmpt —enable-libopencore-amrwb —enable-libmp3lame —enable-libtheora —enable-libvo-amrwbenc —enable-libgsm —enable-libopencore-amrnb —enable-libopus —enable-libspeex —enable-libvorbis —enable-librubberband libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘https://vd3.bdstatic.com/mda-nd51rcbpx8u2erzj/sc/cae_h264_delogo/1649207917032387475/mda-nd51rcbpx8u2erzj.mp4?v_from_s=hkapp-haokan-hnb&auth_key=1649237231-0-0-c67215553e47aa8da021bc163e4f95a1&bcevod_channel=searchbox_feed&pd=1&cd=0&pt=3&logid=3431593477&vid=8991987012167218537&abtest=100815_2-101454_1-17451_1&klogid=3431593477‘: Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Multimedia Cloud Transcode (cloud.baidu.com) comment : Content Adaptive Encoding 3.0 Duration: 00:01:39.85, start: 0.000000, bitrate: 767 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 700 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 63 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 @ 00000279cb1d3dc0] using SAR=1/1 [libx264 @ 00000279cb1d3dc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 00000279cb1d3dc0] profile High, level 3.1, 4:2:0, 8-bit [libx264 @ 00000279cb1d3dc0] 264 - core 161 r3027 4121277 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to ‘chen.mp4’: Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 comment : Content Adaptive Encoding 3.0 encoder : Lavf58.45.100 Stream #0:0(und): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1—1, 25 fps, 12800 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.91.100 libx264 Side data: cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler encoder : Lavc58.91.100 aac frame= 2495 fps= 67 q=-1.0 Lsize= 18980kB time=00:01:39.82 bitrate=1557.6kbits/s speed=2.68x video:17354kB audio:1544kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.433384% [libx264 @ 00000279cb1d3dc0] frame I:16 Avg QP:19.06 size: 75668 [libx264 @ 00000279cb1d3dc0] frame P:768 Avg QP:22.38 size: 15509 [libx264 @ 00000279cb1d3dc0] frame B:1711 Avg QP:27.05 size: 2717 [libx264 @ 00000279cb1d3dc0] consecutive B-frames: 2.9% 11.1% 17.6% 68.5% [libx264 @ 00000279cb1d3dc0] mb I I16..4: 12.8% 57.1% 30.1% [libx264 @ 00000279cb1d3dc0] mb P I16..4: 3.1% 8.3% 1.5% P16..4: 38.0% 11.3% 5.4% 0.0% 0.0% skip:32.4% [libx264 @ 00000279cb1d3dc0] mb B I16..4: 0.2% 0.4% 0.0% B16..8: 30.2% 2.8% 0.4% direct: 0.6% skip:65.3% L0:48.6% L1:46.7% BI: 4.8% [libx264 @ 00000279cb1d3dc0] 8x8 transform intra:63.3% inter:70.9% [libx264 @ 00000279cb1d3dc0] coded y,uvDC,uvAC intra: 46.1% 48.1% 15.6% inter: 7.0% 6.0% 0.3% [libx264 @ 00000279cb1d3dc0] i16 v,h,dc,p: 29% 34% 12% 25% [libx264 @ 00000279cb1d3dc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 23% 24% 4% 4% 5% 5% 4% 5% [libx264 @ 00000279cb1d3dc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 27% 13% 4% 6% 5% 5% 4% 4% [libx264 @ 00000279cb1d3dc0] i8c dc,h,v,p: 61% 18% 16% 4% [libx264 @ 00000279cb1d3dc0] Weighted P-Frames: Y:1.4% UV:0.5% [libx264 @ 00000279cb1d3dc0] ref P L0: 59.1% 13.5% 21.0% 6.4% 0.0% [libx264 @ 00000279cb1d3dc0] ref B L0: 83.6% 10.6% 5.8% [libx264 @ 00000279cb1d3dc0] ref B L1: 95.5% 4.5% [libx264 @ 00000279cb1d3dc0] kb/s:1424.44 [aac @ 00000279cb1c20c0] Qavg: 1148.932
- ffprobe output001.ts
C:\Users\Administrator\Desktop\day1>
<a name="mxeim"></a>
### 查看源数据
C:\Users\Administrator\Desktop\day1>ffprobe output002.ts -hide_banner Input #0, mpegts, from ‘output002.ts’: Duration: 00:01:04.52, start: 121.401711, bitrate: 2128 kb/s Program 1 Metadata: service_name : Service01 service_provider: FFmpeg Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:10x101: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 136 kb/s ```