Changed license to CC0.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / encoder / converters / FFMpegVideo.java
index 3cc3da9..a2aeb81 100644 (file)
@@ -1,11 +1,8 @@
 /*
- * Meviz - Various tools collection to work with multimedia.
- * Copyright (C) 2012 -- 2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
-*/
+ * Meviz - Various tools collection to work with multimedia. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
+ */
+
 
 package eu.svjatoslav.meviz.encoder.converters;
 
@@ -62,6 +59,9 @@ public class FFMpegVideo extends AbstractConverter {
             case NONE:
                 return -1;
 
+            case LOSSLESS:
+                return -1;
+
             default:
                 throw new RuntimeException("Audio bitrate: " + bitRate
                         + " is not supported.");
@@ -93,6 +93,11 @@ public class FFMpegVideo extends AbstractConverter {
         if (options.getAudioBitrate() == Bitrate.COPY)
             audioCodec = "copy";
 
+        if (options.getAudioBitrate() == Bitrate.LOSSLESS){
+            audioCodec = "flac";
+            codecParams.append("-strict -2 ");
+        }
+
         if (options.getAudioBitrate() == Bitrate.NONE)
             audioCodec = null;