Opened 4 months ago

Closed 7 weeks ago

#6599 closed defect (fixed)

FFmpeg git build does not make working fMP4 HLS files

Reported by: SeventhCycle Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary:

Within a relatively new build of FFmpeg, I'm no longer able to make fragmented MP4 / HLS files. I'm currently testing on FFmpeg N-86995-g28e9ba951d-static.

How to reproduce:

H.264 version:

ffmpeg -y -loop 1 -f image2 -i out/480p-h264.jpg -vcodec h264 -r 30 -t 30 \\n   -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" \\n   -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p   "out/480p-h264.m3u8"

H.264 output:

ffmpeg version N-86995-g28e9ba951d-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.0 (Debian 6.4.0-2) 20170724
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.102.100 / 57.102.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 99.100 /  6. 99.100
  libswscale      4.  7.102 /  4.  7.102
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, image2, from 'out/480p-h264.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 864x480 [SAR 96:96 DAR 9:5], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[swscaler @ 0x55df620] deprecated pixel format used, make sure you did set range correctly
[libx264 @ 0x514eb40] using SAR=1/1
[libx264 @ 0x514eb40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x514eb40] profile High 4:2:2, level 3.1, 4:2:2 8-bit
[libx264 @ 0x514eb40] 264 - core 152 r19 ba24899 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[hls @ 0x514c340] Opening 'out/init.mp4' for writing
Output #0, hls, to 'out/480p-h264.m3u8':
  Metadata:
    encoder         : Lavf57.76.100
    Stream #0:0: Video: h264 (libx264), yuvj422p(pc), 864x480 [SAR 1:1 DAR 9:5], q=-1--1, 500 kb/s, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.102.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/500000 buffer size: 0 vbv_delay: -1
[hls @ 0x514c340] Opening 'out/480p-h2640.m4s' for writing
[hls @ 0x514c340] Opening 'out/480p-h264.m3u8.tmp' for writing
[hls @ 0x514c340] Opening 'out/480p-h2641.m4s' for writinge=N/A dup=43 drop=0 speed=2.82x     
[hls @ 0x514c340] Opening 'out/480p-h264.m3u8.tmp' for writing
[hls @ 0x514c340] Opening 'out/480p-h2642.m4s' for writinge=N/A dup=83 drop=0 speed=3.02x    
[hls @ 0x514c340] Opening 'out/480p-h264.m3u8.tmp' for writing
[hls @ 0x514c340] Opening 'out/480p-h2643.m4s' for writinge=N/A dup=130 drop=0 speed=3.05x    
[hls @ 0x514c340] Opening 'out/480p-h264.m3u8.tmp' for writing
[hls @ 0x514c340] Opening 'out/480p-h264.m3u8.tmp' for writingA dup=147 drop=0 speed=3.07x    
frame=  900 fps= 95 q=0.0 Lsize=N/A time=00:00:29.90 bitrate=N/A dup=150 drop=0 speed=3.15x    
video:820kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x514eb40] frame I:4     Avg QP: 6.10  size: 22216
[libx264 @ 0x514eb40] frame P:300   Avg QP: 4.17  size:  1407
[libx264 @ 0x514eb40] frame B:596   Avg QP: 8.97  size:   550
[libx264 @ 0x514eb40] consecutive B-frames:  0.7% 16.9% 48.7% 33.8%
[libx264 @ 0x514eb40] mb I  I16..4: 81.0%  3.1% 15.9%
[libx264 @ 0x514eb40] mb P  I16..4:  0.1%  0.0%  0.2%  P16..4:  1.2%  0.3%  0.4%  0.0%  0.0%    skip:97.7%
[libx264 @ 0x514eb40] mb B  I16..4:  0.1%  0.0%  0.1%  B16..8:  0.9%  0.1%  0.2%  direct: 0.0%  skip:98.6%  L0:50.3% L1:44.8% BI: 4.9%
[libx264 @ 0x514eb40] final ratefactor: -3.60
[libx264 @ 0x514eb40] 8x8 transform intra:5.9% inter:23.3%
[libx264 @ 0x514eb40] coded y,uvDC,uvAC intra: 18.7% 0.0% 0.0% inter: 0.4% 0.0% 0.0%
[libx264 @ 0x514eb40] i16 v,h,dc,p: 87% 12%  1%  0%
[libx264 @ 0x514eb40] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 20% 60%  1%  0%  0%  0%  0%  0%
[libx264 @ 0x514eb40] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 36% 17% 23%  9%  3%  3%  3%  3%  2%
[libx264 @ 0x514eb40] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0x514eb40] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x514eb40] ref P L0: 75.7%  6.6% 15.1%  2.7%
[libx264 @ 0x514eb40] ref B L0: 59.3% 31.6%  9.1%
[libx264 @ 0x514eb40] ref B L1: 96.5%  3.5%
[libx264 @ 0x514eb40] kb/s:223.61

H.265 version:

ffmpeg -y -loop 1 -f image2 -i out/480p-h265.jpg -vcodec hevc -r 30 -t 30 \\n   -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" \\n   -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p  -tag:v hvc1 "out/480p-h265.m3u8"

H.265 output:

ffmpeg version N-86995-g28e9ba951d-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.4.0 (Debian 6.4.0-2) 20170724
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg
  libavutil      55. 74.100 / 55. 74.100
  libavcodec     57.102.100 / 57.102.100
  libavformat    57. 76.100 / 57. 76.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 99.100 /  6. 99.100
  libswscale      4.  7.102 /  4.  7.102
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
Input #0, image2, from 'out/480p-h265.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 864x480 [SAR 96:96 DAR 9:5], 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> hevc (libx265))
Press [q] to stop, [?] for help
Incompatible pixel format 'yuvj422p' for codec 'libx265', auto-selecting format 'yuv422p'
[swscaler @ 0x52427a0] deprecated pixel format used, make sure you did set range correctly
x265 [info]: HEVC encoder version 2.5+9-fdf39a97ecb8
x265 [info]: build info [Linux][GCC 6.4.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main 4:2:2 10 profile, Level-3 (Main tier)
x265 [info]: Thread pool created using 1 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 1 / wpp(8 rows)
x265 [warning]: Source height < 720p; disabling lookahead-slices
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-500 kbps / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: deblock sao
[hls @ 0x4b94780] Opening 'out/init.mp4' for writing
Output #0, hls, to 'out/480p-h265.m3u8':
  Metadata:
    encoder         : Lavf57.76.100
    Stream #0:0: Video: hevc (libx265) (hvc1 / 0x31637668), yuv422p, 864x480 [SAR 1:1 DAR 9:5], q=2-31, 500 kb/s, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.102.100 libx265
[hls @ 0x4b94780] Opening 'out/480p-h2650.m4s' for writing
[hls @ 0x4b94780] Opening 'out/480p-h265.m3u8.tmp' for writing
[hls @ 0x4b94780] Opening 'out/480p-h2651.m4s' for writingte=N/A dup=46 drop=0 speed=0.659x     
[hls @ 0x4b94780] Opening 'out/480p-h265.m3u8.tmp' for writing
[hls @ 0x4b94780] Opening 'out/480p-h2652.m4s' for writingte=N/A dup=87 drop=0 speed=0.676x    
[hls @ 0x4b94780] Opening 'out/480p-h265.m3u8.tmp' for writing
[hls @ 0x4b94780] Opening 'out/480p-h2653.m4s' for writingte=N/A dup=128 drop=0 speed=0.697x    
[hls @ 0x4b94780] Opening 'out/480p-h265.m3u8.tmp' for writing
[hls @ 0x4b94780] Opening 'out/480p-h265.m3u8.tmp' for writing/A dup=149 drop=0 speed=0.701x    
frame=  900 fps= 21 q=-0.0 Lsize=N/A time=00:00:29.90 bitrate=N/A dup=150 drop=0 speed=0.706x    
video:1164kB audio:0kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: unknown
x265 [info]: frame I:      4, Avg QP:8.80  kb/s: 5415.36 
x265 [info]: frame P:    223, Avg QP:3.82  kb/s: 440.64  
x265 [info]: frame B:    673, Avg QP:5.74  kb/s: 245.55  
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 1.8% 31.3% 0.0% 2.6% 64.3% 

encoded 900 frames in 42.35s (21.25 fps), 316.87 kb/s, Avg QP:5.28

You can see the video fail to load on these pages respectively:
http://seventhcycle.net/ffmpeg/hls_h264/
http://seventhcycle.net/ffmpeg/hls_hevc/

I'm not quite sure how to assign a bounty on this one, but I'd be willing to assign one to get FFmpeg to the point that it will make both H.264 and HEVC HLS fragments that playback on MacOS High Sierra and iOS 11.

Attachments (1)

hevc1.png (41.4 KB) - added by stevenliu 4 months ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 4 months ago by SeventhCycle

My apologies. Looks like it pasted the FFmpeg command line in wrong.

H.264

ffmpeg -y -loop 1 -f image2 -i out/480p-h264.jpg -vcodec h264 -r 30 -t 30 \
   -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" \
   -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p   "out/480p-h264.m3u8"

H.265

ffmpeg -y -loop 1 -f image2 -i out/480p-h265.jpg -vcodec hevc -r 30 -t 30 \
   -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" \
   -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p  -tag:v hvc1 "out/480p-h265.m3u8"

comment:2 Changed 4 months ago by stevenliu

can you leave your m3u8 files here, and let me try play it on quicktime?

comment:4 Changed 4 months ago by stevenliu

localhost:dash StevenLiu$ wget http://seventhcycle.net/ffmpeg/hls_h264/out/480p-h264.m3u8
--2017-08-20 19:09:28--  http://seventhcycle.net/ffmpeg/hls_h264/out/480p-h264.m3u8
Resolving seventhcycle.net... 50.116.11.11
Connecting to seventhcycle.net|50.116.11.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 211 [application/x-mpegURL]
Saving to: ‘480p-h264.m3u8’

100%[======================================================================================================================================================================================================================================>] 211         --.-K/s   in 0s

2017-08-20 19:09:43 (9.58 MB/s) - ‘480p-h264.m3u8’ saved [211/211]

localhost:dash StevenLiu$ cat 480p-h264.m3u8
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:9
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="(null)"
#EXTINF:8.333333,
480p-h2641.m4s
#EXTINF:8.333333,
480p-h2642.m4s
#EXTINF:5.000000,
480p-h2643.m4s
#EXT-X-ENDLIST

I saw the context:
#EXT-X-MAP:URI="(null)"

let me check the command here

comment:5 Changed 4 months ago by stevenliu

https://patchwork.ffmpeg.org/patch/4759/

i have upload a patch to fix this ticket, try the patch please :)

comment:6 Changed 4 months ago by stevenliu

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 follow-up: Changed 4 months ago by SeventhCycle

Hello,

Sorry, I had to wait on an updated static build since I don't have a script set up to do full FFmpeg builds.

While this works:
http://seventhcycle.net/ffmpeg/hls_h264/

This does not:
http://seventhcycle.net/ffmpeg/hls_hevc/

We're using:

ffmpeg -y -loop 1 -f image2 -i out/480p-h265.jpg -vcodec hevc -r 30 -t 30 -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p  -tag:v hvc1 "out/480p-h265.m3u8"

Build is:
ffmpeg version N-87043-gf0f48884b0-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2017 the FFmpeg developers

I am testing this on High Sierra, which has HEVC support for HLS FMP4 fragments.

Thanks!

comment:8 Changed 4 months ago by SeventhCycle

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changed 4 months ago by stevenliu

comment:9 Changed 4 months ago by stevenliu

comment:10 follow-up: Changed 4 months ago by SeventhCycle

@stevenliu That looks right. m3u8 file is here:
http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8

Player is here:
http://seventhcycle.net/ffmpeg/hls_hevc/

The movie looks right here. How are you getting it to play? When I try playing it in Safari, I'm getting a "Missing Plug-in" error. That doesn't quite make sense to me, since HLS and fMP4 should be built-in.

comment:11 in reply to: ↑ 10 ; follow-up: Changed 4 months ago by stevenliu

Replying to SeventhCycle:

@stevenliu That looks right. m3u8 file is here:
http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8

Player is here:
http://seventhcycle.net/ffmpeg/hls_hevc/

The movie looks right here. How are you getting it to play? When I try playing it in Safari, I'm getting a "Missing Plug-in" error. That doesn't quite make sense to me, since HLS and fMP4 should be built-in.

https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v270p_fmp4.m3u8
can this link be played?

Last edited 4 months ago by stevenliu (previous) (diff)

comment:12 in reply to: ↑ 11 Changed 4 months ago by SeventhCycle

Replying to stevenliu:

Replying to SeventhCycle:

@stevenliu That looks right. m3u8 file is here:
http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8

Player is here:
http://seventhcycle.net/ffmpeg/hls_hevc/

The movie looks right here. How are you getting it to play? When I try playing it in Safari, I'm getting a "Missing Plug-in" error. That doesn't quite make sense to me, since HLS and fMP4 should be built-in.

https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v270p_fmp4.m3u8
can this link be played?

I get video at that link, but no audio.

comment:13 Changed 4 months ago by SeventhCycle

  • Keywords bounty added

I went ahead and updated to High Sierra Beta 8.

Looks like the same problem is present.

https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v270p_fmp4.m3u8
Plays (no audio)

http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8
Says missing plug-in.

Adding bounty of $50 to get this squared away.

comment:14 Changed 3 months ago by SeventhCycle

Hello,

I tested this on the final release of High Sierra and updated FFmpeg to N-87394-g89a2472ec5-static.

Same problem is present:

http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8
Says missing plug-in.

Is there any other information I can provide to identify the problem and get this working?

Thanks!

comment:15 follow-up: Changed 2 months ago by digitaltvguy

I noticed that ffmpeg does not create an m3u8 that sets the CODECS tag that is required by Apple. Was this an oversight?

This is example of the line that should be contained with the CODECS tag for HEVC

#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=287207,BANDWIDTH=328352,CODECS="hvc1.2.4.L123.B0",RESOLUTION=3840x2160,URI="localhost/index.m3u8"

Please examine this document:
https://devstreaming-cdn.apple.com/videos/wwdc/2017/504op4c3001w2f222/504/504_advances_in_http_live_streaming.pdf

Last edited 2 months ago by digitaltvguy (previous) (diff)

comment:16 in reply to: ↑ 15 Changed 2 months ago by SeventhCycle

Replying to digitaltvguy:

I noticed that ffmpeg does not create an m3u8 that sets the CODECS tag that is required by Apple. Was this an oversight?

This is example of the line that should be contained with the CODECS tag for HEVC

#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=287207,BANDWIDTH=328352,CODECS="hvc1.2.4.L123.B0",RESOLUTION=3840x2160,URI="localhost/index.m3u8"

So in the case of this file:
I went ahead and took this example:
http://seventhcycle.net/ffmpeg/hls_hevc/out/test.m3u8

And manually adding this line on the bottom:
#EXT-X-I-FRAME-STREAM-INF:AVERAGE-BANDWIDTH=287207,BANDWIDTH=328352,CODECS="hvc1.2.4.L123.B0",RESOLUTION=3840x2160,URI="test.m3u8"

And saved it here:
http://seventhcycle.net/ffmpeg/hls_hevc/out/test.m3u8

I'm still seeing text saying there's a missing plugin here. Does the contents of this file look right on your side, or should the placement / URL be different?

Just looking to eliminate factors that would prevent the FFmpeg-made HLS files from playing.

Thanks.

comment:17 Changed 2 months ago by SeventhCycle

https://bitmovin-a.akamaihd.net/content/dataset/multi-codec/hevc/v270p_fmp4.m3u8

#EXTM3U

#EXT-X-VERSION:7
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:4

#EXT-X-MAP:URI="video/270p/fmp4/init.mp4"
#EXTINF:4.0,
video/270p/fmp4/segment_0.m4s

...

#EXTINF:2.280000000000001,
video/270p/fmp4/segment_52.m4s
#EXT-X-ENDLIST

Compared to:
http://seventhcycle.net/ffmpeg/hls_hevc/out/480p-h265.m3u8

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-TARGETDURATION:9
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-MAP:URI="init.mp4"
#EXTINF:8.233333,
480p-h2651.m4s
#EXTINF:8.300000,
480p-h2652.m4s
#EXTINF:5.133333,
480p-h2653.m4s
#EXT-X-ENDLIST


From what I see here, this doesn't look like a header issue. Both of these files have pretty much the same header. One plays, and one doesn't, though.

comment:18 Changed 8 weeks ago by SeventhCycle

Looks like this is still happening with FFmpeg 3.4.

I'm increasing the bounty on this to $100. Please either message me or provide information in the ticket if you want any information or if there's anything I can do on my end.

comment:19 Changed 8 weeks ago by tbucher

Do you need to use YUV 4:2:2 format? If you replace -pix_fmt yuvj422p with -pix_fmt yuv420p, in your HEVC command line, it should be more compatible and should work. It does in my test.

comment:20 Changed 7 weeks ago by SeventhCycle

@tbucher That looks like it works within the test you provided.

YUV420 seems to work here, but not YUV422.

Any idea if this is a bug in the implementation of FFmpeg, or Safari doesn't have support for 4:2:2?

comment:21 in reply to: ↑ 7 Changed 7 weeks ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords hls added; bounty removed
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Version changed from unspecified to git-master

Replying to SeventhCycle:

ffmpeg -y -loop 1 -f image2 -i out/480p-h265.jpg -vcodec hevc -r 30 -t 30 -vf drawtext="fontsize=3:fontfile=VERDANA.TTF:timecode='00\:00\:00\:00':rate=30:text='TCR\:':fontsize=72:fontcolor='white':boxcolor=0x000000AA:box=1:x=10:y=10" -b:v 500k -hls_segment_type fmp4 -pix_fmt yuvj422p  -tag:v hvc1 "out/480p-h265.m3u8"

It is unlikely that Safari supports yuv422p (and even more unlikely that full-scale is supported).

Note: See TracTickets for help on using tickets.