News:

--

Main Menu

HEVC to H.264 conversion issues

Started by khan123, April 22, 2019, 02:49:15 PM

Previous topic - Next topic

khan123

Hi folks. I have been using Avidemux since 2011 to do simple cutting and joining of videos recorded through mobile phones. Until recently videos from my mobile were recorded in H.264 and I would simply copy video and audio output for edited videos. Recently I bought a new phone which records HEVC (it cannot be changed in the app I use to shoot videos). So when I try to edit videos and save in the MP4v2 Muxer format I get this error message "Muxer: Cannot open".

So I am forced to save output in MP4 Muxer which has created several new issues. The edited videos do not have any thumbnails, quick look doesn't work and cannot be played in Quicktime. Also, in the edited video the transitional frames where I cut and join the segments show grey chequered marks while playing.

I apologise for the lengthy post but I do a lot of casual video editing at home and until now Avidemux has been my go-to software. I would like suggestions/advice how to mitigate these issues so I can have quality mp4 videos to play. Any help is greatly appreciated! Thanks!

eumagga0x2a

MP4v2 muxer is a zombie, to be removed sooner rather than later.

QuoteThe edited videos do not have any thumbnails, quick look doesn't work and cannot be played in Quicktime.

Thanks for raising the issue, should be fixed by [muxerMp4] Let QuickTime on macOS join the party, label HEVC as hvc1 instead of hev1, please try a future Avidemux nightly build. When saving HEVC video as MP4, it will use a different label (though the other one was completely valid and fine, it is just a QuickTime limitation that it doesn't accept the other label).

QuoteAlso, in the edited video the transitional frames where I cut and join the segments show grey chequered marks while playing.

This is probably not fixable and depends on how the stream was encoded. Cutting in copy mode may be not viable with such streams.

eumagga0x2a

A new macOS nightly (190423) has been uploaded to https://avidemux.org/nightly/osx_mojave/. This Avidemux build should produce QuickTime-compatible files when saving HEVC video using the MP4 muxer.

khan123

Quote from: eumagga0x2a on April 22, 2019, 07:27:45 PM
MP4v2 muxer is a zombie, to be removed sooner rather than later.

QuoteThe edited videos do not have any thumbnails, quick look doesn't work and cannot be played in Quicktime.

Thanks for raising the issue, should be fixed by [muxerMp4] Let QuickTime on macOS join the party, label HEVC as hvc1 instead of hev1, please try a future Avidemux nightly build. When saving HEVC video as MP4, it will use a different label (though the other one was completely valid and fine, it is just a QuickTime limitation that it doesn't accept the other label).

Quote from: eumagga0x2a on April 23, 2019, 08:02:48 PM
A new macOS nightly (190423) has been uploaded to https://avidemux.org/nightly/osx_mojave/. This Avidemux build should produce QuickTime-compatible files when saving HEVC video using the MP4 muxer.

Thank you SO MUCH for this. I will download and try it tonight and hopefully it should solve the thumbnail issue as well since I believe it is connected to Quicktime.

QuoteAlso, in the edited video the transitional frames where I cut and join the segments show grey chequered marks while playing.

This is probably not fixable and depends on how the stream was encoded. Cutting in copy mode may be not viable with such streams.

This never happened before so I am assuming it's related to the HEVC format. I am not an expert at all in various codes and formats. I simply want to be able to trim unwanted parts of my home-videos and join parts occasionally. Do you have any suggestions on how to avoid this issue? Maybe a video converter or using something else other than cutting in copy mode? The video size does not matter to me as long as there is no compromise with quality. Any help would very much appreciated. Thanks for your time!

eumagga0x2a

HEVC support was added in the "High Sierra" version of macOS, if I'm not mistaken. At least on recent Apple hardware able to decode or even encode HEVC in the GPU.

QuoteThis never happened before so I am assuming it's related to the HEVC format.

This is related to features of the HEVC encoder used to produce the video stream.

QuoteI simply want to be able to trim unwanted parts of my home-videos and join parts occasionally. Do you have any suggestions on how to avoid this issue? Maybe a video converter or using something else other than cutting in copy mode? The video size does not matter to me as long as there is no compromise with quality.

You just choose an H.264 encoder (either the purely in software implemented "Mpeg4 AVC (x264)" if quality and smaller file size is important or the hardware accelerated VideoToolbox based H.264 encoder at high bitrates if the encoding speed is more important than the size) instead of "Copy" in Avidemux when cutting. This also removes the necessity to place cut points at keyframes.

khan123

Quote from: eumagga0x2a on April 24, 2019, 06:31:19 AM
HEVC support was added in the "High Sierra" version of macOS, if I'm not mistaken. At least on recent Apple hardware able to decode or even encode HEVC in the GPU.

QuoteThis never happened before so I am assuming it's related to the HEVC format.

This is related to features of the HEVC encoder used to produce the video stream.

QuoteI simply want to be able to trim unwanted parts of my home-videos and join parts occasionally. Do you have any suggestions on how to avoid this issue? Maybe a video converter or using something else other than cutting in copy mode? The video size does not matter to me as long as there is no compromise with quality.

You just choose an H.264 encoder (either the purely in software implemented "Mpeg4 AVC (x264)" if quality and smaller file size is important or the hardware accelerated VideoToolbox based H.264 encoder at high bitrates if the encoding speed is more important than the size) instead of "Copy" in Avidemux when cutting. This also removes the necessity to place cut points at keyframes.

That sounds great. I only wish to avoid quality loss due to conversion so I suppose Mpeg4 AVC (x264) is the ideal option? I will try it tonight. I really appreciate your help :)

eumagga0x2a

Quote from: khan123 on April 24, 2019, 07:46:27 AM
I only wish to avoid quality loss due to conversion so I suppose Mpeg4 AVC (x264) is the ideal option?

I would recommend first to clarify whether your system and hardware supports HEVC (labeled in the way QuickTime is comfortable with) and re-encode only if there is no other choice.

If you have to re-encode and both quality and file size matters, use x264. If quality matters but wasting a lot of disk space is acceptable, the VideoToolbox H264 encoder becomes an option.