Closed mifi closed 9 months ago
@mifi
Not sure why that's a problem. the hevc decoder is only used for previewing. When exporting, the decoder will not be used
And when you save a frame as .jpeg?
That’s a point. We could have a setting for whether to use <video>
tag or ffmpeg to capture frame.
I'm not a programmer, so I wouldn't know. As long as the image colors are correct in a export whether it is a .jpeg or a movie file.
I'm not sure how to detect if the player shows black screen. Could someone who sees a black screen with a HEVC file, please try to
onVideoError
next version will allow choosing ffmpeg or video-tag for capturing frame, as well as captured image quality
next version will allow disabling the hevc support (for people who have problem with blank screen) it will also include a basic check for hevc support
In my case, my hardware can not read H265. So if the support option is enabled, I have sound but blank screen. But if I disable the option, I have image but no sound.
I have no problem to read H265 in other players.
I'm having a strange issue with HEVC. My graphics chip support decoding it, and most HEVC videos play fine on LosslessCut, however videos specifically recorded from OBS then converted into HEVC with ffmpeg (either with libx265 or hevc_amf) into an mp4 container will turn into a black screen on LosslessCut. They play fine everywhere else including chrome.
I've attached a problematic mp4 file so you can play around with it:
https://github.com/mifi/lossless-cut/assets/5883538/b6510ffb-b154-4b4a-9752-4c7b1fe5c41a
A workaround for now is converting to HEVC into an mkv container instead then remuxing into an mp4, or if I already have a problematic mp4, remux into mkv then back into mp4.
hmm, this video doesn't play in chrome for me. audio only
@mifi In my chrome version the file of Delphox plays fine. Chrome version: 114.0.5735.199 However, i don't hear any audio, nor in Chrome, nor in VLC, but it has a audio track. It shows indeed a black screen in LosslessCut v3.54. When I multiplex the file to MKV with mkvtoolnix, it opens in LosslessCut fine.
Screenshot of Chrome:
It has an empty audio track yea, as I recorded it in OBS with no audio playing (the sample video had no audio track at all). Removing the audio track makes it play on LosslessCut, which is strange, and why I left the audio track on.
Ok I just upgraded my chrome from 111 to 114 and now I can also play the video. So it seems like it was a bug in chrome(chromium). Some time in the future once we upgrade electron to the latest version in LosslessCut, the video will probably just start working in losslesscut too.
coming up in a pr #1844 an improved playback of unsupported files, using the MediaSource API. this allows playback of virtually all formats/codecs with audio as well
Due to losslesscut using chromium's html5 video tag which only supports certain container formats and codecs, we currently need to "convert to supported format" when trying to open exotic formats or codecs. This could be improved with the help of ffmpeg.
Workarounds
Compile custom electron
Convert to supported format
Currently it's possible to cut those files by first using the
File
->Convert to supported format (slow)
function, however this is a re-encoding (although fast) of the whole file, just to be able to view it in the HTML5 video player (note that the original and cut versions will not be re-encoded and are still lossless.)Improve current proxy/dummy code
Currently a
<canvas>
element is used, and ffmpeg will stream low-resolution jpeg images to that canvas.Drawbacks:
This could be improved:
Related
Electron (Chromium) might never support h265~~It seems like Chrome and most other browsers are not going to be supporting H265 as it stands now, and since we are using Chromium (Electron), this will be a problem. It might be possible to enable a flag to enable H265 decoding, but it requires some modding of electron.~~
Update: Chromium now supports h265 (hardware decoding only)