


It could be ignored since we have one input. Regarding the option/value: '-var_stream_map' and 'v:0', I just missed it. In fact, the solution is to keep the same command and only add '\' before the ':' in the remote server url. Also, it generates one output instead of two outputs (one locally and the other to the remote server). So, it considers the list of parameters as the segment/playlist file name. "f=hls:hls_time=1:hls_playlist_type=event:strftime=1:hls_flags=independent_segments+program_date_time+second_level_segment_index:hls_segment_filename=segment_%%06d_%Y%m11%H%M%S.ts]playlist11.ts

"f=hls:hls_time=1:hls_playlist_type=event:strftime=1:hls_flags=independent_segments+program_date_time+second_level_segment_index:hls_segment_filename=segment_%%06d_%Y%m0%H%M%S.ts]playlist0.ts I have tried the triple quotes as suggested, but it generates another problem consisting of video segments/playlist with the following file names: "f=hls:hls_time=1:hls_playlist_type=event:strftime=1:hls_flags=independent_segments+program_date_time+second_level_segment_index:hls_segment_filename=segment_%%06d_%Y%m%d%H%M%S.ts]playlist.m3u8 Thank you guys for your suggestions and help. It considers the ':' after the 'http' as option separator when it is executed from python code (the escape doesn't work) while when executed directly from the shell the escape works fine. The error is the following: No option found near "//X.X.X.X:pppp/ABCD/segment_%%06d_%Y%m%d%H%M%S.ts":method=PUT]"

The following command works fine from the command line: ffmpeg -y -threads 4 -i /dev/video0 -filter_complex "scale=-2:720:force_original_aspect_ratio=decrease" -c:v libx264 -b:v 2800k -maxrate:v 2996k -bufsize:v 4200k -c:a aac -b:a 128k -ac 2 -ar 48000 -preset veryfast -x264opts keyint=25:min-keyint=25:no-scenecut -sc_threshold 0 -r 25 -pix_fmt yuv420p -segment_list_flags +live -map -f tee -var_stream_map 'v:0' "playlist.m3u8|"
