VideoHelp Forum
+ Reply to Thread
Results 1 to 14 of 14
Thread
  1. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  2. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by joecass View Post
    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
    Hello! I use XMedia Recode.
    Quote Quote  
  3. 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 04:42.
    Quote Quote  
  4. 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
    Quote Quote  
  5. 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 13:47.
    Quote Quote  
  6. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    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
    Quote Quote  
  7. 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
    Quote Quote  
  8. 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.
    Quote Quote  
  9. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    Originally Posted by ezcapper View Post
    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
    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
    Quote Quote  
  10. any video converter is probably using x264. Try handbrake and use mpeg2 as the video codec
    Quote Quote  
  11. Member
    Join Date
    Dec 2012
    Location
    Germany
    Search Comp PM
    just play it with your smartphone and use Miracast to throw it on your screen
    Quote Quote  
  12. Originally Posted by joecass View Post
    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
    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.
    Quote Quote  
  13. Try Handbrake. Especially if you have an Intel CPU with QuickSync.
    Quote Quote  
  14. Member
    Join Date
    Jul 2007
    Location
    United States
    Search Comp PM
    THANK YOU for all the suggestions !
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!