In FFMpeg i can put a dynamic directory ? for example :

ffmpeg -rtsp_transport tcp -stimeout 5000000 -i "rtsp:website" -vf scale=640:360 -c:v libx264 -crf 21 -preset veryfast -g 25 -sc_threshold 0 -c:a aac -b:a 128k -ac 2 -hls_flags append_list -f hls -hls_time 4 -hls_playlist_type event "C:\teste\videos%Y_%M_%d\stream.m3u8"

Already try with strftime and dont work

1 Answer 1


This can not work and is not expected to work.

The reason behind it ist, that for a valid HLS stream, the URL of the playlist (i.e. the M3U8 file) is defined to be constant, an assumption that obviously breaks with what you try to do.

The correct way to deal with this is to switch the input between two ffmpeg processes, one for each day. An easy way to do this is to use the -t output flag of ffmpeg and start the processes in a loop.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .