문제

I have a ffmpeg command which converts rtmp stream to http live stream:

ffmpeg.exe -loglevel info -i %stream_input% -g 250 -r 15 -sc_threshold 0 -preset slow -keyint_min 15 -c:v libx264 -ar 44100 -b:v 200k -b:a 64k -profile:v baseline -level 3.0 -s 400x224 -aspect 16:9 -maxrate 200k -bufsize 1000k -map 0 -flags -global_header -f segment -segment_time 10 -segment_wrap 3 -segment_list_flags +live -segment_list_type m3u8 -segment_list playlist.m3u8 -segment_format mpegts segment%05d.ts 1>output.txt

This command creates ts files and m3u8 playlist. What I want to do is to keep ts file names same but rename them in the playlist. For example, Segment file: segment00000.ts, in playlist: Segment.aspx?ts=00000

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:17
#EXTINF:16.692244,
segment00000.ts -> Rename it to Segment.aspx?ts=00000
#EXTINF:16.680789,
segment00001.ts

Is it possible with ffmpeg?

도움이 되었습니까?

해결책

I'm assuming you are doing this because you are running a service in front of the server to manage content rights or something. In that case, I would have the server handle the request for the .m3u8 and generate a new one with the filename you are looking for. Its a trivial file format and whatever language your using should be very easily able to do this.

다른 팁

No, it's not possible in ffmpeg. It's fairly trivial to change the way the filenames are generated and recompile it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top