16
9
I have a movie (m4v/h.264/AAC) which plays fine on my Mac but I recently discovered that it wont play on my Apple TV3. After looking at the properties of this movie file I see that it has a profile High@4.1 but Apple TV3's only suport up to High@4.0. I think the only property that is making this video incompatible is the max video bit rate, all of the other properties look like they are supported in High@4.0.
How can I use ffmpeg to downgrade this video to High@4.0?
Or do I have to instead change the actual property (max bit rate) that makes this video 4.1 instead of 4.0? I am worried that if I just change the bit rate, although the file would then be compatible with High@4.0 it would still be 'tagged' as High@4.1 and therefore still wouldn't play on my Apple TV3.
To avoid losing metadata (and additionally don't lose the other tracks, audio or subtitles), add
-map 0
. – cdlvcdlv – 2018-04-17T10:55:15.493This works well for libx264. How about for h264_omx encoder? This doesn't work (yields an error). – Ryan Griggs – 2018-09-25T15:35:55.787
@RyanGriggs The OMX encoder should support that, could you please post a new question and include the full command and command line output? Thanks – slhck – 2018-09-26T07:46:41.370
It was just an old version. Upgrading to 3.3+ fixes it. – Ryan Griggs – 2018-09-26T13:43:41.710
1That worked well. Unfortunately it lost some of the metadata but the actual video didn't have any noticeable change in quality. Out of interest, would the following command have achieved the same thing?
ffmpeg -i input.mp4 -vcodec x264 -vprofile high -vlevel 4.0 -acodec copy output.mp4
– Sam – 2013-03-13T06:47:21.970Yes, the
-v
options are aliases of the:v
ones. What metadata did you lose? – slhck – 2013-03-13T19:47:20.517I think it might have just been the artwork that was lost. I don't know if that is technically considered metadata... Is the artwork actually contained within the file? I didn't check everything else before I added the whole to it again. – Sam – 2013-03-14T06:10:33.217
I now have a different file with a similar problem. It is the wrong profile level but the rest of the specs seem to be compatible with my required level (4.0). If I use the commands you gave above, will it leave the data untouched unless it is incompatible with the entered profile level? Basically, I don't want ffmpeg to touch any of the data other than the tag that says what profile and level it is. Is that possible or is it going to set all of the values (nitrate, framerate etc) to preset values? – Sam – 2013-07-24T10:38:55.290
If you use the above commands it will re-encode the video. If you wanted to just change the level information, you would have to modify the bitstream, which no program I know of can do, unless you write it yourself. The level is stored as raw bytes in the Sequence Parameter Set of the bitstream (you'd need to look up the ISO/IEC 14496-10 standard, sections 7.3.2.1 and Annex A for details). – slhck – 2013-07-25T19:00:31.693
2I just stumbled upon a way to achieve this. Subler actually has an option, when you select the video stream, to change the profile and level to make it compatible with certain devices. It tells you to make sure that the video is compatible wit the profile you are setting so I don't think it does any re-encoding, it must just change the metadata. – Sam – 2013-07-30T10:04:00.103