diary icon indicating copy to clipboard operation
diary copied to clipboard

Video is recognized as Audio if H.265 codec is used

Open 7ie7an opened this issue 1 year ago • 2 comments

Hello and thank you for this great app,

recently I tried to find ways to reduce the storage my diary needs on my phone. Therefor I came up with the solution to compress videos or to be more exact convert them via ffmpeg (termux) to the H.265 codec (still .mp4 format). This is very effectiv as the new file size of the video is around 1/3 to 1/4 of the original (sometimes even more). I simply follow the code snippet of this link

Command-line - Compress and Convert H.264 to H.265 for Higher Compression ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

As my other apps recognize this as still the same video (quality on smartphone screen almost no difference visible), the diary app suddenly only recognizes the media file as an audio snippet.

I don't know the reason but I would love to be able to have a in app view of the video even though it is compressed and has another codec.

Thanks in advance

If there is any additional info I may provide, please feel free to mention it or contact me.

7ie7an avatar Sep 09 '22 08:09 7ie7an

Diary uses the android WebView to display rendered markdown. What codecs are supported by any particular implementation on any particular device is not under the control of developers. There is an Android System WebView which may be installed. I don't know if that will make any difference.

billthefarmer avatar Sep 09 '22 14:09 billthefarmer

The best way to achieve this, if installing the WebView doesn't work is to take a short test video, use FFMpeg to create a selection of copies with different codecs, and create a test entry to see which one works with the best compression. also the display size of the video could possibly be reduced so the web view isn't resizing it.

billthefarmer avatar Sep 11 '22 13:09 billthefarmer