[FFmpeg-user] how to transcode mp4 file into hls stream

Henk D. Schoneveld belcampo at zonnet.nl
Mon Apr 25 12:17:17 CEST 2016


On 25 Apr 2016, at 12:15, Henk D. Schoneveld <belcampo at zonnet.nl> wrote:

> 
> On 25 Apr 2016, at 03:39, qw <applemax82 at 163.com> wrote:
> 
>> Hi,
>> 
>> I use the following command to do transcoding from mp4 file into hls stream:
>> 
>> ffmpeg -y -i input.mp4 -vbsf h264_mp4toannexb -c:v libx264 -c:a libfdk_aac -f hls -hls_list_size 10 -hls_wrap 10 ./output.m3u8
> hls makes the files the same length, and probably the same quality, not the same size. You can omit the bitrate to get the same size, but the quality will go down by restricting.
length equals duration, limit instead of omit.
>> 
>> Then ffmpeg outputs 10 ts files, but there is big different between the size of 10 ts files.
>> 
>> -rw-r--r--. 1 root root      381 Apr 25 09:37 output.m3u8
>> -rw-r--r--. 1 root root  1217112 Apr 25 09:37 output0.ts
>> -rw-r--r--. 1 root root   306252 Apr 25 09:37 output1.ts
>> -rw-r--r--. 1 root root   469812 Apr 25 09:37 output2.ts
>> -rw-r--r--. 1 root root   308508 Apr 25 09:37 output3.ts
>> -rw-r--r--. 1 root root   477708 Apr 25 09:37 output4.ts
>> -rw-r--r--. 1 root root   128968 Apr 25 09:37 output5.ts
>> -rw-r--r--. 1 root root   140812 Apr 25 09:37 output6.ts
>> -rw-r--r--. 1 root root   211500 Apr 25 09:37 output7.ts
>> -rw-r--r--. 1 root root   220900 Apr 25 09:37 output8.ts
>> -rw-r--r--. 1 root root   192512 Apr 25 09:37 output9.ts
>> -
>> How to make 10 ts files so that each ts file has almost same size?
>> 
>> Thanks!
>> 
>> B.R.
>> 
>> Andrew
>> _______________________________________________
>> ffmpeg-user mailing list
>> ffmpeg-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 



More information about the ffmpeg-user mailing list