most of my acquired video files are x.264 or .mkv. however, some are encoded HEVC x.265.... which my media player won't accept. What's the easiest way to convert HEVC to MP4 or equivalent, so I can put the video file on a USB stick and play it on my TV ? I've used Any Video Converter, it works, but the conversion takes like forever, almost real-time
+ Reply to Thread
Results 1 to 14 of 14
-
-
Try this in file *.bat. Video size must be standard HD, Full HD, 4K. TV doesn't accept forced commands aspect ratio 16:9.
Code:for %%f in ("%~dp1*.mkv,%~dp1*.h264") do ffmpeg.exe -loglevel quiet -y -i %%f -f mp4 -c:v copy -c:a aac -c:s mov_text -ab 192k -ac 2 -ar 48000 %%~nf.mp4
Last edited by Jamaika; 30th Dec 2016 at 03:42.
-
That command line does not re-encode HEVC. Just re-encodes audio, which is perhaps not needed and it just puts it in new mp4 container. Even if it just copied audio and encoded video, there should be some lines to find out if codec is HEVC or H.264 (mediainfo or ffprobe) and re-encode just HEVC.
some code from here for example: https://forum.videohelp.com/threads/377677-Video-batch-files?p=2470418&viewfull=1#post2470418 -
you can try this, copy/paste as something.BAT,
download ffmpeg and mediainfoCLI, correct paths for those in the script
drop your files onto this BAT file
script would ignore non HEVC files re-encoding only HEVC into H.264, audio is kept, you can change settings in ffmpeg so it is faster if still slow:
Code:@echo off echo re-encoding HEVC videos only echo. if "%~1"=="" echo you need to DRAG and DROP videos on this batch script&echo press any key to exit&pause>nul&goto :eof SETLOCAL set "mediainfo=C:\tools\Mediainfo CLI\Mediainfo.exe" set "ffmpeg=C:\tools\ffmpeg\ffmpeg-3.2.2-win32-static\bin\ffmpeg.exe" set "temp_folder=%temp%" set "log_name=%~dp1%~n0.log" break>"%log_name%" :load_file if "%~1"=="" echo DONE&type "%log_name%"&ENDLOCAL&echo press any key to exit&pause>nul&goto :eof "%Mediainfo%" --Inform=Video;%%CodecID%% "%~1" > "%temp_folder%\temp.tmp" set /p codec=<"%temp_folder%\temp.tmp" if /i "%codec%" == "hvc1" call :re-encode "%~1" if /i not "%codec%" == "hvc1" echo ignored: %~nx1 >> "%log_name%" shift goto :load_file :re-encode <videofile> "%ffmpeg%" -y -i "%~1" -f mp4 -c:v libx264 -preset medium -level 4.1 -crf 19 -c:a copy -c:s mov_text "%~dpn1__new.mp4" if %errorlevel% == 0 if exist "%~dpn1__new.mp4" echo re-encoded: %~n1__new.mp4 >> "%log_name%"& goto :eof echo re-encoded,fail: %~n1__new.mp4 >> "%log_name%" goto :eof
Last edited by _Al_; 31st Dec 2016 at 12:47.
-
thank you very much.... however, this is way beyond my skill set.... was just looking for something faster than Any Video Converter.... like in a simple one-click operation
-
what computer setup do you have (processor name and model, graphics card if any)? you can check by going to "My PC" or "My Computer" and right clicking on a blank space in the window and clicking properties
-
yes this works on Windows only,
this is actually better than one click operation, you just drop your videos on that created batch file,
the setup for it is pretty simple, just download those two exe files to your PC, then you copy that text into notepad, you correct those paths in that txt so it matches where you have those exe files in your computer, then you Save it AS my_encoder.BAT.
Then you just drop your videos on that created my_encoder.BAT file in your windows explorer. From one windows explorer to the other etc. You have a converter set up, that you do not even start up, conversion just starts by dropping video files on it. -
I have about 4 different desktops and four laptops that I use... the fastest one is a Win 7 Ultimate 32 bit with an Intel Quad-Core processor. Since I download stuff on various machines, I don't just use one particular machine to do a conversion.... mostly on older laptops running Windows 7. Probably if I had a machine with an i5 or i7 cpu then it would go faster, but I like older machines better than newer ones, especially 'cause I HATE Windows 10
-
any video converter is probably using x264. Try handbrake and use mpeg2 as the video codec
-
just play it with your smartphone and use Miracast to throw it on your screen
-
Ok, but you are not satisfied with speed, there is a conflict then, you could accelerate trans-coding having latest stuff. Even very user friendly encoder Handbrake uses Intel QuickSync hardware acceleration (latest release even HEVC and VP9).
Or using simple command lines and x264 or lib264 library in ffmpeg you might add --preset veryfast to check if that is acceptable. Or use handbrake anyway and put preset slide to veryfast position, or any other x264 encoder basically doing the same.
Today there is lots of cheap media player around that can feed your TV if your database is solid, or even perhaps that phone solution if it is going to work, if it is only couple of titles.
Similar Threads
-
Zond 265, the first professional HEVC / H.265 Analyzer from SolveigMM
By DmitryV in forum Latest Video NewsReplies: 5Last Post: 13th May 2024, 09:02 -
h.265 (HEVC) to m2ts conversion?
By coolshubhs in forum Video ConversionReplies: 1Last Post: 24th Aug 2014, 02:24 -
how to download hevc or h.265?
By maria kalatha in forum Video Streaming DownloadingReplies: 1Last Post: 3rd Oct 2013, 16:59 -
theX.265 (a free HEVC) codec. Have you ever tried that HEVC encoder? (HELP)
By Stears555 in forum Video ConversionReplies: 41Last Post: 16th Sep 2013, 11:15 -
H.265 HEVC Is Approved
By FulciLives in forum Latest Video NewsReplies: 1Last Post: 26th Jan 2013, 04:14