diff mbox

[FFmpeg-devel] avformat/dashenc: Disable writing CODECS tag for HEVC streams

Message ID 1540111248-30000-1-git-send-email-kjeyapal@akamai.com
State Accepted
Commit d6d407d2d758b404af0ce6a8ff46bf164db020a1
Headers show

Commit Message

Jeyapal, Karthick Oct. 21, 2018, 8:40 a.m. UTC
For HEVC streams, only the FourCC tag is written without profile, level etc.,
This is breaking playout support in native Safari.
Native Safari playout expects the full info in CODECS tag or None at all.
---
 libavformat/dashenc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Hendrik Leppkes Oct. 21, 2018, 8:58 a.m. UTC | #1
On Sun, Oct 21, 2018 at 10:41 AM Karthick J <kjeyapal@akamai.com> wrote:
>
> For HEVC streams, only the FourCC tag is written without profile, level etc.,
> This is breaking playout support in native Safari.
> Native Safari playout expects the full info in CODECS tag or None at all.

Generating the full string shouldn't be that impossible for HEVC
either, why not go that more complete route?

- Hendrik
Jeyapal, Karthick Oct. 21, 2018, 11:15 a.m. UTC | #2
On 10/21/18 2:28 PM, Hendrik Leppkes wrote:
> On Sun, Oct 21, 2018 at 10:41 AM Karthick J <kjeyapal@akamai.com> wrote:

>>

>> For HEVC streams, only the FourCC tag is written without profile, level etc.,

>> This is breaking playout support in native Safari.

>> Native Safari playout expects the full info in CODECS tag or None at all.

>

> Generating the full string shouldn't be that impossible for HEVC

> either, why not go that more complete route?

Two reasons:
1. I was not sure what is the right format of that string. I saw some examples, like hvc1.2.4.L123.B0. But I didn't know what that meant.
If somebody here could provide some explanation or the relevant spec, I will hold off this patch and would definitely try implementing it.

2. I heard recently in a demuxed talk that for 2K and 4K resolution Apple clients don't playout properly even when properly constructed CODEC tag is there(hvc1.2.4.L153).
But they played properly without a CODEC tag. https://www.twitch.tv/videos/323919819 , Seek to 42:30 for the relevant info.

For the above two reasons, I assumed it is going to be a time-consuming job. Hence, I decided to atleast restore the earlier status for HEVC, so that we don't break anything that was working properly earlier.
>

> - Hendrik

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Jeyapal, Karthick Oct. 26, 2018, 8:22 a.m. UTC | #3
On 10/21/18 4:45 PM, Jeyapal, Karthick wrote:
>

> On 10/21/18 2:28 PM, Hendrik Leppkes wrote:

>> On Sun, Oct 21, 2018 at 10:41 AM Karthick J <kjeyapal@akamai.com> wrote:

>>>

>>> For HEVC streams, only the FourCC tag is written without profile, level etc.,

>>> This is breaking playout support in native Safari.

>>> Native Safari playout expects the full info in CODECS tag or None at all.

>>

>> Generating the full string shouldn't be that impossible for HEVC

>> either, why not go that more complete route?

> Two reasons:

> 1. I was not sure what is the right format of that string. I saw some examples, like hvc1.2.4.L123.B0. But I didn't know what that meant.

> If somebody here could provide some explanation or the relevant spec, I will hold off this patch and would definitely try implementing it.

>

> 2. I heard recently in a demuxed talk that for 2K and 4K resolution Apple clients don't playout properly even when properly constructed CODEC tag is there(hvc1.2.4.L153).

> But they played properly without a CODEC tag. https://www.twitch.tv/videos/323919819 , Seek to 42:30 for the relevant info.

>

> For the above two reasons, I assumed it is going to be a time-consuming job. Hence, I decided to atleast restore the earlier status for HEVC, so that we don't break anything that was working properly earlier.

Hi Hendrik,

Please let me know if I can proceed with the push. I am relatively new to this ffmpeg forum and hence not sure how to proceed further for such comments.
I don't see it as a strong veto from you, but I just wanted to confirm before the push.

At least for time being this patch will enable people to use HEVC, while we add support the HEVC CODECS tags later.

Regards,
Karthick
>>

>> - Hendrik

>> _______________________________________________

>> ffmpeg-devel mailing list

>> ffmpeg-devel@ffmpeg.org

>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

>

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Jeyapal, Karthick Nov. 2, 2018, 1:59 a.m. UTC | #4
On 10/21/18 4:45 PM, Jeyapal, Karthick wrote:
>

> On 10/21/18 2:28 PM, Hendrik Leppkes wrote:

>> On Sun, Oct 21, 2018 at 10:41 AM Karthick J <kjeyapal@akamai.com> wrote:

>>>

>>> For HEVC streams, only the FourCC tag is written without profile, level etc.,

>>> This is breaking playout support in native Safari.

>>> Native Safari playout expects the full info in CODECS tag or None at all.

>>

>> Generating the full string shouldn't be that impossible for HEVC

>> either, why not go that more complete route?

> Two reasons:

> 1. I was not sure what is the right format of that string. I saw some examples, like hvc1.2.4.L123.B0. But I didn't know what that meant.

> If somebody here could provide some explanation or the relevant spec, I will hold off this patch and would definitely try implementing it.

>

> 2. I heard recently in a demuxed talk that for 2K and 4K resolution Apple clients don't playout properly even when properly constructed CODEC tag is there(hvc1.2.4.L153).

> But they played properly without a CODEC tag. https://www.twitch.tv/videos/323919819 , Seek to 42:30 for the relevant info.

>

> For the above two reasons, I assumed it is going to be a time-consuming job. Hence, I decided to atleast restore the earlier status for HEVC, so that we don't break anything that was working properly earlier.

Pushed.
>>

>> - Hendrik

>> _______________________________________________

>> ffmpeg-devel mailing list

>> ffmpeg-devel@ffmpeg.org

>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

>

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 4e2ea2ebf2..f8b3d106d5 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -915,6 +915,7 @@  static int write_manifest(AVFormatContext *s, int final)
             AVStream *st = s->streams[i];
             OutputStream *os = &c->streams[i];
             char *agroup = NULL;
+            char *codec_str_ptr = NULL;
             int stream_bitrate = st->codecpar->bit_rate + os->muxer_overhead;
             if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO)
                 continue;
@@ -925,10 +926,13 @@  static int write_manifest(AVFormatContext *s, int final)
                 av_strlcat(codec_str, ",", sizeof(codec_str));
                 av_strlcat(codec_str, audio_codec_str, sizeof(codec_str));
             }
+            if (st->codecpar->codec_id != AV_CODEC_ID_HEVC) {
+                codec_str_ptr = codec_str;
+            }
             get_hls_playlist_name(playlist_file, sizeof(playlist_file), NULL, i);
             ff_hls_write_stream_info(st, c->m3u8_out, stream_bitrate,
                                      playlist_file, agroup,
-                                     codec_str, NULL);
+                                     codec_str_ptr, NULL);
         }
         dashenc_io_close(s, &c->m3u8_out, temp_filename);
         if (use_rename)