[root@myserver ~]# fdisk /dev/sdb Welcome to fdisk(util-linux 2.32.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table. Created a new DOS disklabel with disk identifier 0x1fb209a3. Command (m forhelp): n 创建分区 Partition type p primary (0 primary, 0 extended, 4free) 主分区 e extended (container for logical partitions) 扩展分区 Select (default p): p 主分区 Partition number (1-4, default 1): 1 分区号 First sector (2048-41943039, default 2048): 起始位置默认 Last sector, +sectors or +size{K,M,G,T,P}(2048-41943039, default 41943039): +5G 分配5G空间 Created a new partition 1 of type'Linux' and of size 5 GiB. Command (m forhelp): p 打印当前的分区表 Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors Units: sectors of 1 * 512=512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1fb209a3 Device Boot Start End Sectors Size Id Type /dev/sdb1 20481048780710485760 5G 83 Linux ################################################ ############### 创建第二个分区 ##################### Command (m forhelp): n Partition type p primary (1 primary, 0 extended, 3free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): First sector (10487808-41943039, default 10487808): Last sector, +sectors or +size{K,M,G,T,P}(10487808-41943039, default 41943039): +6G Created a new partition 2 of type'Linux' and of size 6 GiB. Command (m forhelp): p Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors Units: sectors of 1 * 512=512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x1fb209a3 Device Boot Start End Sectors Size Id Type /dev/sdb1 20481048780710485760 5G 83 Linux /dev/sdb2 104878082307071912582912 6G 83 Linux Command (m forhelp): wq 保存分区表信息并退出
在视频传输领域,MP4虽然常见,但在直播场景中直接使用MP4格式存在诸多问题。例如,MP4文件的头部信息(如ftyp、moov)较大,导致初始加载时间较长,影响用户体验。相比之下,HLS(HTTP Live Streaming)协议及其M3U8格式更具优势。HLS通过将视频切分成多个小片段,并生成一个M3U8播放列表文件,实现低延迟和高稳定性。本文详细介绍了如何将TS文件转换为M3U8直播流,包括技术原理和具体操作步骤,帮助读者更好地理解和应用这一技术。 ...
[详细]