PGTS PGTS Pty. Ltd.   ACN: 007 008 568

point Site Navigation

point Other Blog Threads

  Valid HTML 4.01 Transitional

   Give Windows The Boot!
   And Say Goodbye To Viruses!


   If you own a netbook/laptop~
   Download Ubuntu Netbook!

PGTS Humble Blog

Thread: Tips/Tricks For Programming etc

Author Image Gerry Patterson. The world's most humble blogger
Some folks are born, silver spoon in hand ... Creedence Clearwater

Transcode Matroska X265 to MP4 X264

Chronogical Blog Entries:

Date: Fri, 31 Mar 2017 23:00:00 +1100

As X265 becomes the standard, we are still left with devices that only support X264. It is possible to transcode.

X265 delivers superior quality and offers much better compression than X264

However, X265 only works with newer TV sets. I have a Samsung Series 8 60 inch F8000 LED TV, only 5 years old. There is a command on the Ask Ubuntu Forum that illustrates how to transcode X265 MKV to X264 MP4 using ffmpeg. I have it modified slightly and saved it as an executable script, as below:

# transcode all x256 .mkv to X264 .mp4 with ffmeg
for i in *.mkv ; do
    ffmpeg -i "$i" -bsf:v h264_mp4toannexb -sn -map 0:0 -map 0:1 -vcodec libx264 "$i.ts"
    mv "$i.ts" "$i.mp4"
    sleep 3

To use it, I "cd" to the folder that contains the X265 data and call the script ...

The item on the Ask Ubuntu forum also contains details of the ffmpeg options in the above command.

Other Blog Posts In This Thread:

Copyright     2017, Gerry Patterson. All Rights Reserved.