[FFmpeg-user] libavformat/segment.c duration min time always 10s
Steven Liu
lingjiujianke at gmail.com
Sun Oct 28 07:57:19 CET 2012
2012/10/27 Roger Pack <rogerdpack2 at gmail.com>:
>> When i use the command bellow:
>> ffmpeg -i input.mkv -strict experimental -acodec aac -vcodec
>> libx264 -map 0:0 -map 0:1 -b:v 2000k -r 25 -b:a 88k -ar 44100 -preset
>> ultrafast -vprofile main -vlevel 2.0 -f segment -segment_time 3
>> -segment_format mpegts -segment_list a.m3u8 -segment_list_flags live
>> -async 1 -bsf:v h264_mp4toannexb -v debug -s 1280x720 test-%d.ts
>>
>> the duration time of m3u8 file and the ts file always 10s
>
> It should probably be 3, is that what you're guessing?
Hi Roger,
Yep, I want to set the duration time to 3s.
when i use -vcodec mpeg4, it can do this operation, but use
libx264, it cannot.
I have saw it in libavformat/segment.c if the "pkt->flags &
AV_PKT_FLAG_KEY" and "codec_type == AVMEDIA_TYPE_VIDEO" it can split
for 3s, perhaps this is set in encode process, do you know how to set
it in every 3s, or set it looks like mpeg4 encode process?
Thanks
More information about the ffmpeg-user
mailing list