[PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Post Reply
lifeofguenter
Posts: 4
Joined: 17 Jun 2014, 23:44
Contact:

[PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Post by lifeofguenter » 18 Jun 2014, 00:07

All scripts are very simple, easy to modify and can be used as a template for different variations. You can daisy-chain all scripts, they will only run on certain file extensions. They will delete the original file after transcoding to save space.

They require a recent version of ffmpeg and will work only under linux (tested under Debian Wheezy). Additionally you will need at least NZBGet v13.

mkv2mp4
  • Transcodes: mkv to mp4
  • Copies Video (instead of re-encoding) to save CPU time
  • Encodes Audio to AAC (which is compatible with older TV models in contrary to AC3 or DTS)

xvid2mp4
  • Transcodes: xvid to mp4
  • Encodes Video with high-level 4.0 profile - should be compatible with older TV models, quality might not be best though...
  • Encodes Audio to AAC (which is compatible with older TV models in contrary to AC3 or DTS)

Z
When using the transcoders above in conjunction with NZBDrone or similar, it might happen that NZBDrone will break as it will find movie files that are still being transcoded.
This script simply, when daisy-changed AFTER all the transcoders, will move the files to yet another destination after all PP is done, so NZBDrone will only find finish transcoded files.


Changelog
Last edited by lifeofguenter on 21 Jun 2014, 17:01, edited 1 time in total.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Post by hugbug » 18 Jun 2014, 07:35

Thanks for sharing.

One thing I've noticed - it'll be better to check the exit code of ffmpeg or at least the presence of output file before deleting the original file.

lifeofguenter
Posts: 4
Joined: 17 Jun 2014, 23:44
Contact:

Re: [PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Post by lifeofguenter » 21 Jun 2014, 16:59

ok just made some changes:

* you can now specify via "Settings" the path to the ffmpeg executable - the default value should work in most cases though...
* it will check if ffmpeg exists and fail else
* ffmpeg is set to overwrite existing files (to allow automated systems not blocking) in the same folder
* ffmpeg will return error string and error code in case of an error (and then also not delete the original file)
* correctly signal "NONE" if no files were transcoded
* Z will only move files if there was no failure in any PP script before



TODO:
* make a check for new ffmpeg version
* make a check for new nzbget version

ronaldvs
Posts: 2
Joined: 19 Jul 2014, 07:04

Re: [PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Post by ronaldvs » 19 Jul 2014, 07:07

Thanks for sharing this. I have been trying to use this as post processing script on my Synology but have been unable to make it run. You mention it runs on Linux so I assume it should be possible to adapt the script for a Synology.

charleszink
Posts: 1
Joined: 10 Feb 2015, 04:17

Re: [PP-Script] Simple Transcoders (mkv2mp4, xvid2mp4)

Post by charleszink » 10 Feb 2015, 04:19

Thanks for this. It works fantastic in combination with VideoSort.

Is there any way to make ffmpeg utilize more than one CPU core with these transcoding settings?

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests