I need to transcode an input stream to 25 fps H264, with closed GOPs each 1 second-long (=25 frames), and then stream this using HLS protocol, with 5 second segments each of them containing 5 GOPs. Here's is the command-line I thought of :
Code: Select all
cvlc -vvv <my-input-stream> --no-sout-audio --sout='#transcode{width=854,height=480,fps=25,vcodec=h264,vb=800,venc=x264{profile=main,level=30,keyint=25,min-keyint=25,opengop=false}}:std{access=livehttp{seglen=5,delsegs=false,numsegs=0,index=/home/www/test/mystream.m3u8,index-url=http://<my-IP>/test/mystream-########.ts},mux=ts{use-key-frames},dst=/home/www/test/mystream-########.ts}'
- I disabled audio for debugging purposes
- I set min-keyint an keyint to 25 to force the GOP size to exactly 25 frames
However the output does not fulfill my requirements. The major issue is that my HLS segments have a variable duration, which is always less than the expected 5 seconds. Can anyone help me with this issue ?