[FFmpeg-trac] #9134(avfilter:new): HLS multi bitrate streaming, differ frame rate in master playlist
FFmpeg
trac at avcodec.org
Tue Mar 2 13:35:24 EET 2021
#9134: HLS multi bitrate streaming, differ frame rate in master playlist
-----------------------------------+--------------------------------------
Reporter: krs_vital | Type: defect
Status: new | Priority: normal
Component: avfilter | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-----------------------------------+--------------------------------------
how to make a master playlist with different framerate?
im using nvidia encoder GP100
im using latest ffmpeg:
ffmpeg version N-101355-gc6c82428af Copyright (c) 2000-2021 the FFmpeg
developers
how make "-vf" option for one output playlist?
noted, input stream is interlaced stream, i want to do 50p and 25p by
using option "-vf" for 50p "-vf yadif_cuda=1:-1:1", for 25p "-vf
yadif_cuda=0:-1:1", i tried to do like this "-vf:v:0 yadif_cuda=1:-1:1"
and "-vf:v:1 yadif_cuda=0:-1:1", but filter used for all output, can you
fix this?
command:
/usr/local/bin/ffmpeg -copyts -hwaccel cuda -hwaccel_output_format cuda
-err_detect ignore_err -correct_ts_overflow 0 -overrun_nonfatal 1 -i
udp://233.170.170.87:58631 -y -sn -dn -master_pl_name FB_HD.m3u8 -map v:0
-c:v:0 h264_nvenc -b:v:0 10M -map a:0 -c:a:0 aac -map v:0 -c:v:1
h264_nvenc -b:v:1 5M -map a:0 -c:a:1 aac -var_stream_map "v:0,a:0 v:1,a:1"
-ignore_unknown -strict -2 -strftime 1 -strftime_mkdir 1 -g 100 -preset p7
-vf yadif_cuda=1:-1:1 -bf:v 3 -hls_time 10 -hls_flags omit_endlist
-hls_segment_filename /store/records/FB_HD/%Y/%m/%d/%H/%s_%v.ts
/hls/tmp/FB_HD_%v.m3u8
and for using frame rate in master playlist is needed to do some changes
in "hlsplaylist.c"
diff -u ./hlsplaylist.c /var/db/pack/FFmpeg/libavformat/hlsplaylist.c
--- ./hlsplaylist.c 2021-03-02 11:29:10.080910505 +0000
+++ /var/db/pack/FFmpeg/libavformat/hlsplaylist.c 2021-03-02
08:06:59.483249236 +0000
@@ -84,6 +84,8 @@
if (st && st->codecpar->width > 0 && st->codecpar->height > 0)
avio_printf(out, ",RESOLUTION=%dx%d", st->codecpar->width,
st->codecpar->height);
+ if(st->avg_frame_rate.num > 25)
+ avio_printf(out, ",FRAME-RATE=%d", st->avg_frame_rate.num);
if (codecs && codecs[0])
avio_printf(out, ",CODECS=\"%s\"", codecs);
if (agroup && agroup[0])
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9134>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list