Free Software To Convert H.265 To H.264

0 views
Skip to first unread message

Chanelle Glugla

unread,
Aug 5, 2024, 7:36:26 AM8/5/24
to stacevsenni
Ihave H.265 encoded files that are so resource intensive they don't play well and my conversion software (mencoder) doesn't (currently) support the H.265 format. Can I convert them to H.264 in a command line batch file to rapidly convert the files for re-compression using Devede/OGMrip? Upon searching this site I have not found it discussed so I will post what I feel is a useful question and answer to the question.

Open a terminal and direct it to the directory containing the H.265 encoded files, assuming you have ffmpeg and the appropriate libraries installed and assuming they are in MKV format copy and paste the following into the terminal window.


This is required by some streaming formats, typically the MPEG-2 transport stream format (mpegts) processing MKV h.264 (currently)requires this, if is not included you will get an error in the terminal window instructing you to use it.


-map 0:0 -map 0:1 Tells ffmpeg to only process the first two streams of the file (0:0 is the video stream, 0:1 is the first audio stream of the file). This does two things, strips the excess audio streams, usually the first audio stream is English but not always. Other streams such as embedded subtitles are removed reducing the file size. This is also an optional string. You can use ffprobe to view the streams available in the file. -map is optional and can be discarded from the command.


Adjust -crf for quality and -preset for encoding speed/efficiency. Or just remove these options and use the defaults which are fairly good and should suffice for most (the example is using the default values for these options). See FFmpeg Wiki: H.264 for more info on these options.


This one is a little more complicated. This will perform conditional encoding depending if the input audio is AAC or not. If the input audio is AAC then the audio will be stream copied (re-muxed) as is and needless re-encoding is avoided. If the input audio is not AAC then it will be re-encoded to AAC.


Here's a simple script demonstrating how to do this using ffprobe and ffmpeg. Copy and save it to the directory containing your videos to be converted, give it execute permission with chmod +x yourscriptname, then run it with ./yourscriptname.


I recently updated to MEP 2021 and when I try to output my videos in H264 the video itself goes through the time to compile but comes out without any video image. Also when I import my H.265 videos, they are just black? I have looked for updates and tried changing settings like the video renderer to VideoForWindows but am at a loss that the update is giving me grief. I have not experienced problems before with just outputting a finished product. My system has not changed, I admit to running Win10 GTX 970 older card, did I upgrade one generation too far for my system perhaps? If nothing else, it would be nice to be able to import my older mp4 Output configuration files so I could know I am using settings I am confident work.


Hi It's possible the hardware is not coping. To check, try exporting a file but do not have any hardware acceleration boxes ticked in either the export boxes or program settings. The render will take longer but may give you a video output. Also choose to use the Video for Windows option in the program settings.


1 x 250GB Evo 970 NVMe: drive for C: drive backup 1 x 1TB Sabrent NVMe drive for Operating System / Programs only. 1X WD BLACK 1TB internal SATA 7,200rpm hard drives.1 for internal projects, 1 for Library clips/sounds/music/stills./backup of working projects. 1x500GB SSD current project only drive, 2x WD RED 2TB drives for latest footage storage. Total 21TB of 8 external WD drives for backup.


Thank you Cubebase for the quick response, I had a chance to double check my system, the H.265 mp4 loaded fine into Da Vinci Resolve and ACDSee, so the codec works on my current system configuration, As you suggest I need to provide more details about my system. I have a system analysis program somewhere that I will run and perhaps we can sort this out because I way prefer Magix MEP and I have gotten to know it over these last couple decades, might try a reinstall too, it is weird the way this version 2021 Plus did not seem to take as all other versions have reliably. I am working in 360 at high resolutions like 4608 x2304 so that might not be supported by MEP. Thanks again for your suggestion.


As far as I'm aware, only the paid for Pro version of Da Vinci Resolve uses any hardware acceleration whereas the free version does not. MEP needs both the Microsoft decode HEVC codec and the Magix bought encode HEVC codec to handle H265 fully if you wish to both import and export in that format. You only need the Windows codec for importing if you are exporting to say mp4 instead.


The requirements to run MEP or VPX increases with the increased resolution of any project. Ideally for handling 4K footage you need a minimum of 8GB or ram and a 2GB video graphics card capable of handling Direct X 11 but preferably Direct X 12.1 as well as an Intel chip with an inboard HD 520 capable graphics card for a smoothest trouble free user experience.


The specs page for MEP is very sketchy to my mind on requirements for such processing and not as solid a set of information as the requirements set out on the Vegas pages for their products that seem more accurate based on my experiences.


360 4K footage is supported by MEP but not some HEVC files that are recorded at a variable frame rate by some cameras. They would first have to be converted to a constant frame rate using Handbrake or similar software first.


I ask because it may be that without a suitable Intel GPU embedded in a CPU that in this instance it is not showing an image in the monitor of MEP. The nvidia card in this instance may not being used I think all be it a very capable card in other respects for use within the program. This is pure conjecture on my part.


Last but not least you could send us a short clip via Google drive, Dropbox, or One Drive for us to test to see if we can find a problem with it. Web video hosting sites will not do as the source files will have been re-encoded.


Ray, not 3D, I am referring to 360 spherical video, equirectangular footage. Thanks for the cautionary note John, I ran an analysis and here are some configuration stats for my current system. I realize now that I have recently updated to a 4K monitor which has caused some minor overhead issues with running MEP at a larger display but


Above is a screenshot of a typical export MP4 (not HEVC) just your typical 4K export in version 2021 made up of a series of single frame captures (11400) and no video or audio is being output despite it showing in the preview to the right. The resulting video after processing = 0megs. This is the most basic settings I have never had a problem with in previous versions. I can output this same setup using HEVC @ 4608 X 2304 which is my preferred resolution for 360 video watched in a VR headset. But normal mp4 nothing. I have not done a MEP re-install yet but that may be next option. These two problems exporting basic mp4s and seeing H.265 mp4s remain elusive. Thanks for any further hints guys. Did a dxdiag, some final details.


I AM BACK IN BUSINESS!!! I thank everyone here for helping me sort through this, lots of clues of places to look was what I needed. I was starting to think I upgraded one too many times with Magix MEP 2021, that I was going to be forced to buy a new computer! But Johnebaker and Scenestealer mentioned something I had no idea about this "MainConcept" which I had no clue was selected in my settings(?), as I was looking for how to turn off Hardware Acceleration which always worked before, I saw that little dropdown to default mp4s and OMG all my .pru settings that I thought I had lost from years of customizing my output for 3D and 360 were BACK!!!! Suddenly I am able to output my 4608 X 2304 360 footage again without having to resort to HEVC h.265 which seems laggy in playback on my system -- Those HEVC265 files I have needed to create as a workaround to get the resolution I wanted, they are still coming in Black but I don't need that format anymore. The default mp4s are so nice and smooth. THANK YOU thank you thank you all. In case you are curious about the work I do in 360, here is a link (VR headset of course highly recommended) but it scrolls in 360 so you can see what I am up to.


Main concept has to be selected in MEP 2021 and is not the default setting. HEVC needs much more processing power than H264 and is normally only used for reducing file size for a given resolution due to more advance nature of the logarithms used. As John has mentioned, the HD Graphics 4600 chip in your Intel processor is not capable of processing those clips at 4K . You may want to consider not doing any future upgrades of MEP until you get a newer Intel chip with inboard graphics as processing requirements seem to go up with each new released version.

3a8082e126
Reply all
Reply to author
Forward
0 new messages