You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge branch 'OpenShot:develop' into develop
This commit is contained in:
@@ -841,7 +841,7 @@ std::string Clip::PropertiesJSON(int64_t requested_frame) const {
|
||||
root["wave_color"]["red"] = add_property_json("Red", wave_color.red.GetValue(requested_frame), "float", "", &wave_color.red, 0, 255, false, requested_frame);
|
||||
root["wave_color"]["blue"] = add_property_json("Blue", wave_color.blue.GetValue(requested_frame), "float", "", &wave_color.blue, 0, 255, false, requested_frame);
|
||||
root["wave_color"]["green"] = add_property_json("Green", wave_color.green.GetValue(requested_frame), "float", "", &wave_color.green, 0, 255, false, requested_frame);
|
||||
|
||||
root["wave_color"]["alpha"] = add_property_json("Alpha", wave_color.alpha.GetValue(requested_frame), "float", "", &wave_color.alpha, 0, 255, false, requested_frame);
|
||||
|
||||
// Return formatted string
|
||||
return root.toStyledString();
|
||||
|
||||
@@ -647,11 +647,6 @@ void FFmpegWriter::WriteHeader() {
|
||||
av_dict_set(&oc->metadata, iter->first.c_str(), iter->second.c_str(), 0);
|
||||
}
|
||||
|
||||
// For HEVC (H265) to playback on Apple devices: https://github.com/OpenShot/libopenshot/issues/990
|
||||
if (info.has_video && video_codec_ctx && video_codec_ctx->codec_id == AV_CODEC_ID_HEVC) {
|
||||
av_dict_set(&mux_dict, "tag:v", "hvc1", 0);
|
||||
}
|
||||
|
||||
// Set multiplexing parameters (only for MP4/MOV containers)
|
||||
AVDictionary *dict = NULL;
|
||||
if (mux_dict) {
|
||||
@@ -1544,6 +1539,17 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st) {
|
||||
}
|
||||
#endif // USE_HW_ACCEL
|
||||
|
||||
// Set libx265 hvc1 tag (for Apple playback compatibility).
|
||||
#if USE_HW_ACCEL
|
||||
if (!(hw_en_on && hw_en_supported) && video_codec_ctx->codec_id == AV_CODEC_ID_HEVC) {
|
||||
video_codec_ctx->codec_tag = MKTAG('h', 'v', 'c', '1');
|
||||
}
|
||||
#else
|
||||
if (video_codec_ctx->codec_id == AV_CODEC_ID_HEVC) {
|
||||
video_codec_ctx->codec_tag = MKTAG('h', 'v', 'c', '1');
|
||||
}
|
||||
#endif
|
||||
|
||||
/* open the codec */
|
||||
if (avcodec_open2(video_codec_ctx, codec, &opts) < 0)
|
||||
throw InvalidCodec("Could not open video codec", path);
|
||||
|
||||
Reference in New Issue
Block a user