Jump to content

2 years later still not hdr when transcoding or remuxing


mata7

Recommended Posts

vdatanet

It will need to do a full transcode to write it.

 

Video tag is not correct. It's hev1 instead of hvc1. Apple TV native player transcodes because tag hvc1 is missing.

Link to comment
Share on other sites

Video tag is not correct. It's hev1 instead of hvc1. Apple TV native player transcodes because tag hvc1 is missing.

 

can you post the media info from the web app?

Link to comment
Share on other sites

vdatanet

can you post the media info from the web app?

@@softworkz Codec tag is hev1, then Apple TV transcodes video because it requires hvc1. Doing this, it direct plays:

ffmpeg -i input.mkv -map 0:0 -map 0:1 -c:v copy -c:a copy -tag:v hvc1 output.mp4
5e438d5e0cbb2_Anotacin20200212062622.jpg
Link to comment
Share on other sites

@@vdatanet - I'm not sure about what situation you're talking here.

 

Could you please show an ffmpeg log from Emby to which you think your suggestion should be applied to?

Link to comment
Share on other sites

vdatanet

@@vdatanet - I'm not sure about what situation you're talking here.

 

Could you please show an ffmpeg log from Emby to which you think your suggestion should be applied to?

 

@@softworkz

 

I will try to summarize it:

 

1. As Apple TV does not support direct MKV playback, I want to repack all my HEVC HDR MKVs to MP4, to avoid H265 to H264 transcoding

2. There are many tools that do the job, but my server is headless and I prefer to run commands on the server side

3. I use a command similar to this one, depending on audio tracks:

ffmpeg -i input.mkv -map 0:0 -map 0:1 -c:v copy -c:a copy -tag:v hvc1 output.mp4

This way Apple TV can direct play those MP4s, the key is: -tag:v hvc1, without that tag, video is transcoded when played on Apple TV

 

4. As I'm a bit lazy, I don't want to write those commands and I want to use Emby built-in conversion utility.

5. The problem is that tag is not written:

6. This is the command:

>>>>>  Legacy Command

/opt/emby-server/bin/ffmpeg -re  -f matroska -i file:"/media/4k/Star Wars Episodio 4 [4K UHDrip][2160p][HDR][AC3 5.1-DTS 5.1 Castellano-DTS 5.1-Ingles+Subs][ES-EN]/Star Wars Episodio 4 4Krip2160.www.pctnew.org.mkv" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -sn -c:v:0 copy -vsync -1 -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 aac -metadata:s:a:0 language=spa -disposition:a:0 default -ac:a:0 6 -ab:a:0 384000  -codec:a:1 copy -metadata:s:a:1 language=spa -disposition:a:1 none -codec:a:2 aac -metadata:s:a:2 language=eng -disposition:a:2 none -ac:a:2 6 -ab:a:2 384000  -y "/var/lib/emby/sync/6/14/04e7fd2e-258f-4108-ab47-8d942dfcef91.mp4"

>>>>>  Actual Command

/opt/emby-server/bin/ffmpeg -loglevel +timing -y -print_graphs_file /var/lib/emby/logs/ffmpeg-remux-04e7fd2e-258f-4108-ab47-8d942dfcef91_1graph.txt -copyts -start_at_zero -f matroska,webm -re -c:v:0 hevc -i "/media/4k/Star Wars Episodio 4 [4K UHDrip][2160p][HDR][AC3 5.1-DTS 5.1 Castellano-DTS 5.1-Ingles+Subs][ES-EN]/Star Wars Episodio 4 4Krip2160.www.pctnew.org.mkv" -map 0:0 -map 0:1 -map 0:2 -map 0:3 -sn -c:v:0 copy -c:a:0 aac -ab:a:0 384000 -ac:a:0 6 -metadata:s:a:0 language=spa -disposition:a:0 default -c:a:1 copy -metadata:s:a:1 language=spa -disposition:a:1 0 -c:a:2 aac -ab:a:2 384000 -ac:a:2 6 -metadata:s:a:2 language=eng -disposition:a:2 0 -avoid_negative_ts disabled -f mp4 -map_metadata -1 -map_chapters -1 "/var/lib/emby/sync/6/14/04e7fd2e-258f-4108-ab47-8d942dfcef91.mp4"

7. Since version 4.4.0.13, a video tag is written, but it writes hev1 instead of hvc1.

8. Videos tagged as hev1 are transcoded when played on Apple TV

 

My suggestion is to write hvc1 tag instead of hev1, if possible.

 

Thanks!  

Edited by vdatanet
  • Like 1
Link to comment
Share on other sites

@@vdatanet - Thanks for explaining. I wasn't sure whether this is about playback or conversion and mkv or mp4.

 

HEV1 and HVC1 are so-called FourCC tags. These are supported by MP4 containers but not MKV containers (these have their own 'Codec IDs').

 

I have already made a change in the latest beta to write an HVC1 tag instead of HEV1, when...

  • ..the conversion feature is used and...
  • ...the target container is MP4 and...
  • ...the codec is HEVC

I have tested and verified that this is working.

 

But using the convert feature on 10bit HEVC normally causes transcoding and not remuxing, so I wonder how you managed to end up with the (remuxing) command line above?

  • Like 2
Link to comment
Share on other sites

vdatanet

@@vdatanet - Thanks for explaining. I wasn't sure whether this is about playback or conversion and mkv or mp4.

 

HEV1 and HVC1 are so-called FourCC tags. These are supported by MP4 containers but not MKV containers (these have their own 'Codec IDs').

 

I have already made a change in the latest beta to write an HVC1 tag instead of HEV1, when...

  • ..the conversion feature is used and...
  • ...the target container is MP4 and...
  • ...the codec is HEVC

I have tested and verified that this is working.

 

But using the convert feature on 10bit HEVC normally causes transcoding and not remuxing, so I wonder how you managed to end up with the (remuxing) command line above?

 

@@softworkz - With server version .14 tag hev1 is still written instead of hvc1.

 

5e47b9b2b8f74_Anotacin20200215102708.jpg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...