Batch Video Converter

Search This thread

sergej_7

Senior Member
May 22, 2012
284
65
C:\cc_converter\bin>cc_converter -i abc.avi -o abc
Chromecast Converter - V2.1.0
Converting C:\cc_converter\bin\abc.avi into C:\cc_converter\bin\abc with slow speed and quality 18. Do not delete anything.
Exception in thread "main" java.lang.NullPointerException
at com.budius.chromecast.converter.processor.Job.<init>(Job.java:23)
at com.budius.chromecast.converter.Execution.executeFile(Execution.java:66)
at com.budius.chromecast.converter.Execution.run(Execution.java:47)
at com.budius.chromecast.converter.Main.main(Main.java:41)

anybody can help ?

windows 10, installed latest java, set java_home, added cc_converter and ffmpeg to path and tried excluding output and -d arguments then i'm getting this

C:\cc_converter\bin>cc_converter -i abc.avi
Chromecast Converter - V2.1.0
Exception in thread "main" java.lang.NullPointerException
at com.budius.chromecast.converter.Main.main(Main.java:31)
 
Last edited:

Budius

Senior Member
May 1, 2010
229
58
anybody can help ?

windows 10, installed latest java, set java_home, added cc_converter and ffmpeg to path and tried excluding output and -d arguments then i'm getting this

Hi (the developer here),

I saw this before and it should be easy to fix, but currently (between new baby and new job) I really have no time to it.
An easy way to workaround it, it seems to give full path of the files to convert. For example:

Code:
C:\cc_converter\bin>cc_converter -i C:\cc_converter\bin\abc.avi -o C:\cc_converter\bin\abc.mp4

I really want to find time to fix it soon, but meanwhile, give it a try like this.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Copy/Move feature V2.1.0
    move/copy file to output folder if the file doesn't need conversion

    Minor Bug Fix V2.0.1
    All the command line executions were being reported as seconds, but it was dividing milisecond by 100 instead of 1000

    Major Release V2.0

    Higher quality, faster conversions, more efficient checking, and super important: works with normal FFMPEG, no need to compile it yourself.

    Changes:
    - dropped GUI because aint nobody got time for that
    - major re-write, better structured code all together
    - properly checks available audio codecs and applies accordingly
    - due to the above audio changes, it works fine with FFMPEG static builds
    - yeah, normal builds you can simply download from ffmpeg.org
    - drop 2-pass video because aint nobody got time for that
    - moved code to gradle, all dependencies now come from mavenCentral(), no more downloaded **** on or folder
    - independently handle audio or video conversion or copy (greater efficiency)
    - separate warning and error log files

    Update V1.1.1 (minor crash fix)

    it's with great pleasure that I share with you guys my batch video converter for Chromecast.

    it's made to be a simple as possible, select a file or a whole folder, and Go.

    I did that to convert my terabyte of movies on my DLNA-NAS to be able to cast all of it without problems.
    Because of this main reason the application it DELETES THE ORIGINAL VIDEO FILE AFTER CONVERSION COMPLETION.
    So then the option `-d` can be used to delete the original after successful conversion.

    The app analyses the video stream of your files, compare with what Chromecast accepts and only converts what's necessary, keeping great quality, and avoiding unnecessary encoding.

    I also noticed that A LOT of apps does not play embedded subtitles, so in the process it extracts subtitle files so you can separately inject it into Chromecast.

    changelog:
    - v1.0.0 - initial release
    - v1.1.0 - re-worked FFMPEG script for better quality, new layout with settings for speed, quality, delete file, output folder.
    - v1.1.1 - Fix app not properly closing. Fix crash on subtitle stream without language tag.
    - V2.0 - check above
    - V2.1 - move/copy file to output folder if the file doesn't need conversion


    Downloads:
    - zip installation: Simply unzip the file on the location. Execute with ./cc_converter (linux/mac) or cc_converter (windows) from the command line
    - open source project: GitHub link (contribute!)

    Before starting:
    This tool is just a thin wrapper on FFMPEG, so if your PC doesn't have a working version of FFMPEG, the tool won't work.
    So make sure to download a build (recommended V3.0 or later) and have it available on your PATH
    On the official website you can find all the detailed instructions on how to compile FFMPEG on your PC https://trac.ffmpeg.org/wiki/CompilationGuide

    Yes, unfortunately you have to compile it yourself because, to keep great quality, the tool uses the non-free parts of FFMPEG.
    That means, when compiling, make sure to include libx264 and libfdk-aac and keep the enable-nonfree flag.


    Settings explanations:

    as per request a few explanations on options:

    the speed and quality options are directly related to x264 encoding options found here: https://trac.ffmpeg.org/wiki/x264EncodingGuide

    - the speed is exactly what they explain there. The faster the conversion the crappier the job.
    - the quality uses CRF (constant rate factor) and defaults to good quality for both audio and video.

    high quality = video CRF 18, audio 80kb/s per channel
    normal quality = video CRF 23, audio 64kb/s per channel
    low quality = video CRF 26, audio 48kb/s per channel

    On all my tests I ended up settling with Speed SLOW and quality HIGH as the Default because those will rarely increase the file size much and it will keep same quality.
    Those test were based on both converting 1994 Friends episode (pretty crappy quality) all the way to Full-HD 5.1 movies.

    So unless, you have a really good reason for it, I wouldn't change any of the defaults.
    1
    it's with great pleasure that I share with you guys my batch video converter for Chromecast.

    it's made to be a simple as possible, select a file or a whole folder, and click Go.

    I did that to convert my terabyte of movies on my DLNA-NAS to be able to cast all of it without problems.
    Because of this main reason the application it DELETES THE ORIGINAL VIDEO FILE AFTER CONVERSION COMPLETION.

    The app analyses the video stream of your files, compare with what Chromecast accepts and only converts what's necessary, keeping great quality.

    I also noticed that A LOT of apps does not play embedded subtitles, so in the process it extracts subtitle files so you can separately inject it into Chromecast.

    Downloads:
    - executable jar: Jar file download (execute it with java -jar chromecastconverter.jar)
    - open source project: GitHub link (for whoever feels like contributing)

    Can I run this on a headless Linux server like a Raspberry Pi running Rasbian?
    1
    Can I run this on a headless Linux server like a Raspberry Pi running Rasbian?


    It was build as a Java UI (using JavaFX), so I reckon the code it's not good for a headless server (although the objects in the code are quite modular and should be totally possible with minimum modification to do it)

    BUT,
    I urge anyone to not use it with a RaspberryPi, I have one myself and tried some FFMPEG on it and it's just so painfully slow!!! So so slow!
    Like a 20 seconds video would take 5 min to process.

    ps.: If anyone find a way to build FFMPEG on a raspPi that properly uses the GPU and makes stuff runs at proper speed, please let us know. :laugh:
    1
    First of all, I'm very happy that you got it working :highfive: . ...

    But for correctness the software converts anything that is not exactly as shown in the official website. I mean, I gotta follow the official stuff.

    .

    Well that is your feedback, make it remove re-coding that which actually works on Chromecast, it will save hours of recoding.
    1
    Dear OP,

    I tried converting a mkv file using your converter and at the end of conversion it created a mp4 file but message said that it failed. When i played the converted mp4 file on my PC, it plays video but no audio? any idea whey the audio is not playing back? I did not try on chromecast yet but i assume the audio wont play on it either.
    Thoughts? Thanks

    the conversion uses a two-pass method for best quality.
    1st pass is only processing the video and doesn't even look at the audio. On the 2nd pass the audio is added/processed.

    The video you got without audio is the result of the 1st pass, and the 2nd pass never executed because it failed.

    My guess is that your compilation of FFMPEG does not have libfdk_aac (the audio library used for conversion keeping the best quality possible).
    Unfortunately this library is tagged as "-non-free" so you can't just download from somewhere. It's illegal to do so. You have to follow the guide here https://trac.ffmpeg.org/wiki/CompilationGuide to compile the library yourself on your PC..

    As I said before, I really wished it would be more user-friendly. But that's out of my control.

    Probably in a future version I'll try to detect if this library is available and if it's not use the native one, that renders a not so great quality, but at least works in all cases.