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

Markku Vainio Markku.Vainio at craft.fi
Tue Apr 4 14:46:46 EEST 2017




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

2017-02-18 10:43 GMT+08:00 Steven Liu <lingjiujianke at gmail.com>:

>
>
> 2017-02-17 23:22 GMT+08:00 Markku Vainio <Markku.Vainio at craft.fi>:
>
>>
>> >
>> >
>> > -----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!
>>
>>
>> > > From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On 
>> > > Behalf Of Steven Liu
>> > > Sent: 15. helmikuutata 2017 11:32
>> > > >
>> > > > 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.
>> > >
>> > > > 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 
>> > > > <(214)%20748-3647>,
>> pat/pmt every
>> > > > 2147483647 <(214)%20748-3647> 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/42543ffaa4f5ace96aa4b74b2a0446
>> > 9e20170216091929/1ed0997d31664eb2c9a7b9b4b625aabb20170216091929/bac
>> > f51
>> >
>> >
>> > _______________________________________________
>> > 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".
>> >
>>
>>
>>
>> localhost:commit StevenLiu$ ffmpeg -v quiet -i 
>> ~/Downloads/QSV_HEVC_.ts -c copy -f hls -hls_time 5 -hls_list_size 0 
>> output_test_qsv.m3u8 localhost:commit StevenLiu$ ls output_test_qsv*
>> output_test_qsv.m3u8 output_test_qsv0.ts  output_test_qsv1.ts 
>> output_test_qsv2.ts  output_test_qsv3.ts localhost:commit StevenLiu$ 
>> cat
>> output_test_qsv.m3u8 #EXTM3U
>> #EXT-X-VERSION:3
>> #EXT-X-TARGETDURATION:5
>> #EXT-X-MEDIA-SEQUENCE:0
>> #EXTINF:5.000000,
>> output_test_qsv0.ts
>> #EXTINF:5.000000,
>> output_test_qsv1.ts
>> #EXTINF:5.000000,
>> output_test_qsv2.ts
>> #EXTINF:3.240000,
>> output_test_qsv3.ts
>> #EXT-X-ENDLIST
>> localhost:commit StevenLiu$
>>
>>
>>
>>
>>
>> localhost:commit StevenLiu$ ffmpeg
>> ffmpeg version N-82254-g75a1311 Copyright (c) 2000-2016 the FFmpeg 
>> developers
>>   built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
>>   configuration: --enable-libass --enable-opengl --enable-libx264 
>> --enable-libmp3lame --enable-gpl --enable-nonfree --prefix=/usr/local 
>> --enable-libopencv --enable-libtesseract --enable-libspeex 
>> --enable-libfreetype --enable-libfontconfig --enable-libfdk-aac
>>   libavutil      55. 35.100 / 55. 35.100
>>   libavcodec     57. 66.101 / 57. 66.101
>>   libavformat    57. 57.100 / 57. 57.100
>>   libavdevice    57.  2.100 / 57.  2.100
>>   libavfilter     6. 66.100 /  6. 66.100
>>   libswscale      4.  3.100 /  4.  3.100
>>   libswresample   2.  4.100 /  2.  4.100
>>   libpostproc    54.  2.100 / 54.  2.100
>> Hyper fast Audio and Video encoder
>> usage: ffmpeg [options] [[infile options] -i infile]... {[outfile 
>> options] outfile}...
>>
>> Use -h to get full help or, even better, run 'man ffmpeg'
>> localhost:commit StevenLiu$
>>
>>
>>
>>
>> I think you can try the newest version of ffmpeg
>>
>>
>> Now I tested with N-83507-g8fa18e0
>>
>> ffmpeg -y -i alasin.mp4 -vf yadif=0 -c:v hevc_qsv -load_plugin 
>> hevc_hw -bsf:v hevc_mp4toannexb -g:v 5 -q 20 -preset slow -pix_fmt 
>> nv12 -c:a aac -ac 2 -hls_time 2 -hls_wrap 10000 -hls_segment_filename "qsv%%05d.ts"
>> index.m3u8
>>
>> ...and still not segmenting. I am able to pipe as mpegts and do 
>> segmenting in another ffpmeg instance but the resulting files are not 
>> playable in any player I have. Did you test playing out your 
>> resulting segments?
>>
>>
>> C:\!!>ffmpeg -y -i masteri.mov -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 -f 
>> mpegts -  | ffmpeg -f mpegts -i - -c:v copy -c:a copy -hls_time 3 
>> -hls_wrap 10000 -hls_segment_filename "%05d.ts" index.m3u8 -loglevel 
>> verbose ffmpeg version N-83507-g8fa18e0 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-zlib
>>   libavutil      55. 47.100 / 55. 47.100
>>   libavcodec     57. 80.100 / 57. 80.100
>>   libavformat    57. 66.102 / 57. 66.102
>>   libavdevice    57.  2.100 / 57.  2.100
>>   libavfilter     6. 73.100 /  6. 73.100
>>   libswscale      4.  3.101 /  4.  3.101
>>   libswresample   2.  4.100 /  2.  4.100
>>   libpostproc    54.  2.100 / 54.  2.100
>> ffmpeg version N-83507-g8fa18e0 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-zlib
>>   libavutil      55. 47.100 / 55. 47.100
>>   libavcodec     57. 80.100 / 57. 80.100
>>   libavformat    57. 66.102 / 57. 66.102
>>   libavdevice    57.  2.100 / 57.  2.100
>>   libavfilter     6. 73.100 /  6. 73.100
>>   libswscale      4.  3.101 /  4.  3.101
>>   libswresample   2.  4.100 /  2.  4.100
>>   libpostproc    54.  2.100 / 54.  2.100
>> Guessed Channel Layout for Input Stream #0.0 : mono Guessed Channel 
>> Layout for Input Stream #0.1 : mono Input #0, 
>> mov,mp4,m4a,3gp,3g2,mj2, from 'masteri.mov':
>>   Metadata:
>>     major_brand     : qt
>>     minor_version   : 537199360
>>     compatible_brands: qt
>>     creation_time   : 2016-10-31T14:56:10.000000Z
>>   Duration: 00:36:09.60, start: 0.000000, bitrate: 117796 kb/s
>>     Stream #0:0(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 
>> mono, s32 (24 bit), 1152 kb/s (default)
>>     Metadata:
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Linux Alias Data Handler
>>     Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 
>> mono, s32 (24 bit), 1152 kb/s (default)
>>     Metadata:
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Linux Alias Data Handler
>>     Stream #0:2(eng): Video: prores (apcn / 0x6E637061), 
>> yuv422p10le(top coded first (swapped)), 1920x1080, 115490 kb/s, 25 
>> fps, 25 tbr, 2500 tbn,
>> 2500 tbc (default)
>>     Metadata:
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Linux Alias Data Handler
>>       encoder         : Apple ProRes 422
>>       timecode        : 14:56:10:00
>>     Stream #0:3(eng): Data: none (tmcd / 0x64636D74)
>>     Metadata:
>>       rotate          : 0
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Libquicktime Time Code Media Handler
>>       reel_name       : 1
>>       timecode        : 14:56:10:00
>> Output #0, mpegts, to 'pipe:':
>>   Metadata:
>>     major_brand     : qt
>>     minor_version   : 537199360
>>     compatible_brands: qt
>>     encoder         : Lavf57.66.102
>>     Stream #0:0(eng): Video: hevc (hevc_qsv), nv12, 1920x1080, 
>> q=2-31,
>> 1000 kb/s, 25 fps, 90k tbn, 25 tbc (default)
>>     Metadata:
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Linux Alias Data Handler
>>       timecode        : 14:56:10:00
>>       encoder         : Lavc57.80.100 hevc_qsv
>>     Side data:
>>       cpb: bitrate max/min/avg: 0/0/1000000 buffer size: 0 vbv_delay: -1
>>     Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (24 
>> bit),
>> 128 kb/s (default)
>>     Metadata:
>>       creation_time   : 2016-10-31T14:56:11.000000Z
>>       handler_name    : Linux Alias Data Handler
>>       encoder         : Lavc57.80.100 aac
>> Stream mapping:
>>   Stream #0:2 -> #0:0 (prores (native) -> hevc (hevc_qsv))
>>   Stream #0:0 -> #0:1 (pcm_s24le (native) -> aac (native)) Press [q] 
>> to stop, [?] for help [mpegts @ 0000000002552cc0] 
>> max_analyze_duration 5000000 reached at
>> 5000000 microseconds st:0
>> Input #0, mpegts, from 'pipe:':
>>   Duration: N/A, start: 1.538667, bitrate: N/A
>>   Program 1
>>     Metadata:
>>       service_name    : Service01
>>       service_provider: FFmpeg
>>     Stream #0:0[0x100]: Video: hevc (Main), 1 reference frame 
>> ([36][0][0][0] / 0x0024), yuv420p(tv), 1920x1080 (1920x1088) [SAR 1:1 
>> DAR 16:9], 25 fps, 25 tbr, 90k tbn, 25 tbc
>>     Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 
>> 0x000F),
>> 48000 Hz, stereo, fltp, 268 kb/s
>> [mpegts @ 00000000030a4860] muxrate VBR, pcr every 2 pkts, sdt every
>> 2147483647 <(214)%20748-3647>, pat/pmt every 2147483647 
>> <(214)%20748-3647> pkts Output #0, hls, to 'index.m3u8':
>>   Metadata:
>>     encoder         : Lavf57.66.102
>>     Stream #0:0: Video: hevc (Main), 1 reference frame ([36][0][0][0] 
>> / 0x0024), yuv420p(tv), 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 
>> 25 fps,
>> 25 tbr, 90k tbn, 25 tbc
>>     Stream #0:1(eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 
>> Hz, stereo, fltp, 268 kb/s Stream mapping:
>>   Stream #0:0 -> #0:0 (copy)
>>   Stream #0:1 -> #0:1 (copy)
>> [hls muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:0
>>     Last message repeated 1 times   4868kB time=00:00:05.35
>> bitrate=7447.7kbits/s speed=2.13x
>> [hls muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:0:08.93 
>> bitrate=7461.2kbits/s speed=2.22x [hls muxer @ 00000000037d7240] 
>> EXT-X-MEDIA-SEQUENCE:0:12.18 bitrate=8108.9kbits/s speed=2.21x [hls 
>> muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:0:15.14 
>> bitrate=8900.7kbits/s speed=2.16x [hls muxer @ 00000000037d7240] 
>> EXT-X-MEDIA-SEQUENCE:1:17.36 bitrate=9175.0kbits/s speed=2.16x [hls 
>> muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:2bitrate=N/A
>> speed=2.87x    s speed=2.17x
>> [hls muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:3:23.95 
>> bitrate=8895.0kbits/s speed=2.17x [hls muxer @ 00000000037d7240] 
>> EXT-X-MEDIA-SEQUENCE:4:26.94 bitrate=8869.4kbits/s speed=2.15x [hls 
>> muxer @ 00000000037d7240] EXT-X-MEDIA-SEQUENCE:5:30.54 
>> bitrate=8866.1kbits/s speed=2.18x f 
>> _______________________________________________
>> 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".
>>
>
>
> Your mpegts file have the same problem with hls, this is not hlsenc's 
> problem maybe problem happend at make format to mpegts
>
>


localhost:commit StevenLiu$ ffplay ~/Downloads/QSV_HEVC_.ts ffplay version N-81491-g7ba9882 Copyright (c) 2003-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --enable-libass --enable-opengl --enable-libx264 --enable-libmp3lame --enable-gpl --enable-libfaac --enable-nonfree --prefix=/usr/local --enable-libopencv --enable-libtesseract --enable-libspeex --enable-libfreetype --enable-libfontconfig --enable-libfdk-aac
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 54.101 / 57. 54.101
  libavformat    57. 48.101 / 57. 48.101
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 57.100 /  6. 57.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from '/Users/StevenLiu/Downloads/QSV_HEVC_.ts':
  Duration: 00:00:18.67, start: 1.458667, bitrate: 58214 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: hevc (Main) ([36][0][0][0] / 0x0024), yuv420p(tv), 3840x2160 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 25 tbc
    Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F),
48000 Hz, stereo, fltp, 506 kb/s
   9.58 A-V: -7.516 fd= 146 aq=    0KB vq=15365KB sq=    0B f=0/0


>>>A-V  not sync,  terrible.


Sorry being out for a while. So do you have suggestion how to encode QSV HEVC and successfully make HLS segmenting? 

I also successfully encoded HEVC with NVENC and hls segmenting worked fine with GTX1050.

So X265 and NVENC HEVC seems to work fine but QSV doesn't.





More information about the ffmpeg-user mailing list