WyattBlue / auto-editor

Auto-Editor: Efficient media analysis and rendering
https://auto-editor.com
The Unlicense
2.81k stars 411 forks source link

Why not libx265 in mp4? #377

Closed Aplietexe closed 11 months ago

Aplietexe commented 11 months ago

Bug description

Currently, the command

auto-editor "in.mp4" --my-ffmpeg -c:v libx265

Throws Error! 'libx265' codec is not supported in 'mp4' container.. The same happens if I include -o "out.mp4". However, ffmpeg does support libx265 in a mp4 container, and hevc is in the allowed vcodecs for mp4:

https://github.com/WyattBlue/auto-editor/blob/00d036c880247d07b0dda83579219c93a6efed6d/auto_editor/utils/container.py#L74-L74

I think libx265 should be added to the list, as that is the name of the encoder used by ffmpeg, not hevc.

What's your platform?

Python Version: 3.11.5 64-bit
Platform: Windows 10 amd64
FFmpeg Version: N-110322-g0c25da5a28-g1440bf15e2+1
FFmpeg Path: C:\Users\pietr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\ae_ffmpeg\Windows\ffmpeg.exe
Auto-Editor Version: 23w35a

What command did you use

auto-editor "in.mp4" --my-ffmpeg -c:v libx265

What properties does your input video have?

It happens with any video.

Update: I modified the code in my local installation to add libx265 to the list, and it seems to work fine.

WyattBlue commented 11 months ago

I fixed this in master. I added all the h264 and hevc encoders in the list.