[FFmpeg-user] QSV Hevc to HLS not segmenting?

Markku Vainio Markku.Vainio at craft.fi
Thu Feb 16 11:23:02 EET 2017




-----Original Message-----
From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Steven Liu
Sent: 16. helmikuutata 2017 8:53
To: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
Subject: Re: [FFmpeg-user] QSV Hevc to HLS not segmenting?

2017-02-15 18:42 GMT+08:00 Markku Vainio <Markku.Vainio at craft.fi>:

>
>
> Console output says:
>
> > GopPicSize: 25; GopRefDist: 9; GopOptFlag: closed ; IdrInterval: 0
>
> Should this be enough for getting closed GOP or do I need to add 
> something more in my command sequence?
>
> Thanks!
>
>
>
>
> -----Original Message-----
> From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of 
> Steven Liu
> Sent: 15. helmikuutata 2017 11:32
> To: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> Subject: Re: [FFmpeg-user] QSV Hevc to HLS not segmenting?
>
> 2017-02-14 20:15 GMT+08:00 Markku Vainio <Markku.Vainio at craft.fi>:
>
> >
> > When creating long segments with libx264 and compare result in 
> > hevcesbrowser I can see that before I-Slice:
> >
> > x265:
> >
> > NAL_AUD
> > NAL_VPS
> > NAL_SPS
> > NAL_PPS
> > NAL_SEI_PREFIX
> > NAL_CRA_NUT = I Slice
> > NAL_VPS
> >
> >
> > But in QSV encoded its just:
> >
> > NAL_AUD
> > NAL_CRA_NUT = I Slice
> > NAL_VPS
> >
> > Are VPS, SPS, PPS and SEI needed for segmenting? If this is the 
> > problem is there a workaround?
> >
> >
> > OpenGOP?
> maybe closegop will be ok.
>
> >
> >
> > -----Original Message-----
> > From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf 
> > Of Markku Vainio
> > Sent: 13. helmikuutata 2017 16:06
> > To: FFmpeg user questions <ffmpeg-user at ffmpeg.org>
> > Subject: [FFmpeg-user] QSV Hevc to HLS not segmenting?
> >
> > Hello,
> >
> >
> > Encoding with  hevc_qsv results only one large 00000.ts. It seems to 
> > me that ffmpeg is unable to split QSV encoded HEVC stream. (Intel 
> > Core i7-6770HQ, Iris Pro 580, W10)
> >
> > ffmpeg -y -i alasin.mp4 -vf yadif=0 -c:v hevc_qsv -load_plugin 
> > hevc_hw -g
> > 25 -q 20 -preset slow -pix_fmt nv12 -c:a aac -ac 2 -hls_time 2 
> > -hls_wrap
> > 10000 -hls_segment_filename "%%05d.ts" index.m3u8
> >
> >
> >
> > With libx265 splitting works fine. I also successfully tested h264_qsv.
> >
> > ffmpeg -y -i masteri.mov -vf yadif=0 -c:v libx265 -g 25 -q 20 
> > -preset slow -c:a aac -ac 2 -hls_time 2 -hls_wrap 10000 
> > -hls_segment_filename
> "%%05d.ts"
> > index.m3u8
> >
> >
> > Am I doing something wrong here or is the HEVC stream coming from 
> > QSV missing some information that is needed for splitting at GOP boundary?
> >
> >
> > C:\!!>ffmpeg -y -i alasin.mp4 -vf yadif=0 -c:v hevc_qsv -load_plugin 
> > hevc_hw -g 25 -q 20 -preset slow -pix_fmt nv12 -c:a aac -ac 2 
> > -hls_time 2 -hls_wrap 10000 -hls_segment_filename "%05d.ts" 
> > index.m3u8 -loglevel verbose ffmpeg version N-83410-gb1e2192 
> > Copyright (c)
> > 2000-2017 the FFmpeg developers
> >   built with gcc 5.4.0 (GCC)
> >   configuration: --enable-gpl --enable-version3 --enable-cuda 
> > --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx 
> > --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig 
> > --enable-frei0r --enable-gnutls --enable-iconv --enable-libass 
> > --enable-libbluray --enable-libbs2b --enable-libcaca 
> > --enable-libfreetype --enable-libgme --enable-libgsm 
> > --enable-libilbc --enable-libmodplug --enable-libmp3lame 
> > --enable-libopencore-amrnb --enable-libopencore-amrwb
> > --enable-libopenh264 --enable-libopenjpeg --enable-libopus 
> > --enable-librtmp --enable-libsnappy --enable-libsoxr 
> > --enable-libspeex --enable-libtheora --enable-libtwolame 
> > --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis 
> > --enable-libvpx --enable-libwavpack --enable-libwebp
> > --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid 
> > --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
> >   libavutil      55. 46.100 / 55. 46.100
> >   libavcodec     57. 75.100 / 57. 75.100
> >   libavformat    57. 66.101 / 57. 66.101
> >   libavdevice    57.  2.100 / 57.  2.100
> >   libavfilter     6. 72.100 /  6. 72.100
> >   libswscale      4.  3.101 /  4.  3.101
> >   libswresample   2.  4.100 /  2.  4.100
> >   libpostproc    54.  2.100 / 54.  2.100
> > [h264 @ 0000000000dd46e0] Reinit context to 3840x2176, pix_fmt:
> > yuv420p Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'alasin.mp4':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     encoder         : Lavf57.58.102
> >   Duration: 00:02:15.06, start: 0.000000, bitrate: 89980 kb/s
> >     Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 
> > 0x31637661), yuv420p(left), 3840x2160 (3840x2176) [SAR 1:1 DAR 
> > 16:9],
> > 89529 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >       timecode        : 00:00:00:00
> >     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 
> > stereo, fltp, 460 kb/s (default)
> >     Metadata:
> >       handler_name    : SoundHandler
> >     Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
> >     Metadata:
> >       handler_name    : TimeCodeHandler
> >       timecode        : 00:00:00:00
> > [graph 0 input from stream 0:0 @ 0000000000e0f080] w:3840 h:2160 
> > pixfmt:yuv420p tb:1/12800 fr:25/1 sar:1/1 sws_param:flags=2
> > [auto_scaler_0 @ 0000000000e5c4e0] w:iw h:ih flags:'bicubic' 
> > interl:0 [format @ 0000000000e0f600] auto-inserting filter 'auto_scaler_0'
> > between the filter 'Parsed_yadif_0' and the filter 'format'
> > [auto_scaler_0 @ 0000000000e5c4e0] w:3840 h:2160 fmt:yuv420p sar:1/1
> > ->
> > w:3840 h:2160 fmt:nv12 sar:1/1 flags:0x4 [hevc_qsv @ 
> > 0000000000ea7be0] Initialized an internal MFX session using hardware 
> > accelerated implementation [hevc_qsv @ 0000000000ea7be0] Using the 
> > constant quantization parameter (CQP) ratecontrol method [hevc_qsv @ 
> > 0000000000ea7be0] profile: simple; level: 306 [hevc_qsv @ 
> > 0000000000ea7be0]
> > GopPicSize: 25; GopRefDist: 9; GopOptFlag: closed ; IdrInterval: 0 
> > [hevc_qsv @ 0000000000ea7be0] TargetUsage: 4; RateControlMethod: CQP 
> > [hevc_qsv @ 0000000000ea7be0] QPI: 16; QPP: 20; QPB: 26 [hevc_qsv @ 
> > 0000000000ea7be0] NumSlice: 1; NumRefFrame: 5 [hevc_qsv @ 
> > 0000000000ea7be0]
> > RateDistortionOpt: unknown [hevc_qsv @ 0000000000ea7be0]
> RecoveryPointSEI:
> > unknown IntRefType: 0; IntRefCycleSize: 0; IntRefQPDelta: 0 
> > [hevc_qsv @ 0000000000ea7be0] MaxFrameSize: 0; MaxSliceSize: 0; 
> > [hevc_qsv @ 0000000000ea7be0] BitrateLimit: unknown; MBBRC: OFF; 
> > ExtBRC: unknown [hevc_qsv @ 0000000000ea7be0] Trellis: auto 
> > [hevc_qsv @ 0000000000ea7be0]
> > RepeatPPS: OFF; NumMbPerSlice: 0; LookAheadDS: unknown [hevc_qsv @ 
> > 0000000000ea7be0] AdaptiveI: unknown; AdaptiveB: unknown; BRefType:
> > pyramid [hevc_qsv @ 0000000000ea7be0] MinQPI: 0; MaxQPI: 0; MinQPP: 
> > 0;
> > MaxQPP: 0;
> > MinQPB: 0; MaxQPB: 0
> > [graph_1_in_0_1 @ 0000000000e5c5a0] tb:1/48000 samplefmt:fltp
> > samplerate:48000 chlayout:0x3 [mpegts @ 0000000002a294e0] muxrate 
> > VBR, pcr every 2 pkts, sdt every 2147483647, pat/pmt every 
> > 2147483647 pkts Output #0, hls, to 'index.m3u8':
> >   Metadata:
> >     major_brand     : isom
> >     minor_version   : 512
> >     compatible_brands: isomiso2avc1mp41
> >     encoder         : Lavf57.66.101
> >     Stream #0:0(und): Video: hevc (hevc_qsv), 1 reference frame, 
> > nv12(left), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 1000 kb/s, 25 fps, 
> > 90k tbn, 25 tbc (default)
> >     Metadata:
> >       handler_name    : VideoHandler
> >       timecode        : 00:00:00:00
> >       encoder         : Lavc57.75.100 hevc_qsv
> >     Side data:
> >       cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
> >     Stream #0:1(und): Audio: aac (LC), 48000 Hz, stereo, fltp, delay 
> > 1024,
> > 128 kb/s (default)
> >     Metadata:
> >       handler_name    : SoundHandler
> >       encoder         : Lavc57.75.100 aac
> > Stream mapping:
> >   Stream #0:0 -> #0:0 (h264 (native) -> hevc (hevc_qsv))
> >   Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Press [q] to 
> > stop, [?] for help
> > [h264 @ 0000000000eaa8e0] Reinit context to 3840x2176, pix_fmt:
> > yuv420p frame=  846 fps= 35 q=-0.0 size=N/A time=00:00:34.15 
> > bitrate=N/A speed=1.43x 
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email 
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email 
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email 
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email 
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>



you can save the stream to a mpegts file, and let's analyze the file.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


Here you go. I made these by "-f mpegts" not hls. Is this ok? 
https://www.wetransfer.com/downloads/42543ffaa4f5ace96aa4b74b2a04469e20170216091929/1ed0997d31664eb2c9a7b9b4b625aabb20170216091929/bacf51




More information about the ffmpeg-user mailing list