Body: <p>I am using ffmpeg to convert videos to mp4 format in my application I have used JAVE and Xuggler for the same. My issue is that, video conversions are taking way too much of time. For example, a 50MB video takes almost 2 hrs to complete the video conversion and upload the same. Also, when i play a video, it takes a longer time to play on safari on mac OS than chrome/firefox.</p>
  
  <p>What are the possible solutions for this? How to optimize the conversion time/video buffering for playing the video faster</p>
  
  <p>I am using the it.sauronsoftware.jave.VideoAttributes and EncodingAttributes classes to do this</p>
  
  <pre><code>VideoAttributes video = new VideoAttributes();
  video.setCodec("libx264");
  EncodingAttributes attributes = new EncodingAttributes();
  attributes.setFormat("mp4");
  attributes.setVideoAttributes(video);
  Encoder encoder = new Encoder(new FFMPEGLocator() {
                  @Override
                  protected String getFFMPEGExecutablePath() {
          String ffmpegPath = PropertiesUtil
              .getProperty("location.ffmpeg");
          return ffmpegPath;
       }
  });
  encoder.encode(sourceFile, destFile, attributes);
  </code></pre>
  
  <p>sourceFile and destFile are the source and destination files respectively</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-19T07:01:52.073Z
Comments.Text: Please paste the ffmpeg command as well as the console output.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-20T05:34:29.087Z
Comments.Text: @Mulvya, I have included the java code used to do the conversion
Comments.UserDisplayName: Deepak
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-20T05:43:15.490Z
Comments.Text: Unfortunately, that doesn't help much. Need to know the actual syntax that ffmpeg is being invoked with.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-23T06:35:38.250Z
Comments.Text: @Mulvya, In my case the java code invokes the FFMPEG instance installed in the system for the conversion process. How will i get to know the exact command that ffmpeg invokes?
Comments.UserDisplayName: Deepak
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-11-23T06:53:52.523Z
Comments.Text: Not familiar with JAVE. Perhaps you can ask the developer Carlo Pelliccia at cpelliccia@sauronsoftware.it
Comments.UserDisplayName: Gyan
Tags: <video><ffmpeg><conversion><transcoding><performance>
Title: ffmpeg based JAVE video conversion taking a long time
UserDisplayName: Deepak
ThreadText: # ffmpeg based JAVE video conversion taking a long time
  
  (Asked by: username_0 on 2015-11-19)
  
  I am using ffmpeg to convert videos to mp4 format in my application I have used JAVE and Xuggler for the same. My issue is that, video conversions are taking way too much of time. For example, a 50MB video takes almost 2 hrs to complete the video conversion and upload the same. Also, when i play a video, it takes a longer time to play on safari on mac OS than chrome/firefox.
  
  What are the possible solutions for this? How to optimize the conversion time/video buffering for playing the video faster
  
  I am using the it.sauronsoftware.jave.VideoAttributes and EncodingAttributes classes to do this
  
  ```
  VideoAttributes video = new VideoAttributes();
  video.setCodec("libx264");
  EncodingAttributes attributes = new EncodingAttributes();
  attributes.setFormat("mp4");
  attributes.setVideoAttributes(video);
  Encoder encoder = new Encoder(new FFMPEGLocator() {
                  @Override
                  protected String getFFMPEGExecutablePath() {
          String ffmpegPath = PropertiesUtil
              .getProperty("location.ffmpeg");
          return ffmpegPath;
       }
  });
  encoder.encode(sourceFile, destFile, attributes);
  
  ```
  
  sourceFile and destFile are the source and destination files respectively
  
  **Tags:** video, ffmpeg, conversion, transcoding, performance
  
  > **Comments:**
  > **username_1**: Please paste the ffmpeg command as well as the console output.  
  > **username_0**: @Mulvya, I have included the java code used to do the conversion  
  > **username_1**: Unfortunately, that doesn't help much. Need to know the actual syntax that ffmpeg is being invoked with.  
  > **username_0**: @Mulvya, In my case the java code invokes the FFMPEG instance installed in the system for the conversion process. How will i get to know the exact command that ffmpeg invokes?  
  > **username_1**: Not familiar with JAVE. Perhaps you can ask the developer Carlo Pelliccia at cpelliccia@sauronsoftware.it  
  
  ---
  
  ## 0 answers
  
  