title: Youtube-dl downlaod from terminal but stop from java program (same command)
body: <p>I manage to download embedded video from terminal but when I call it from java program is not working.</p>
  <p>This is the code I use from java:</p>
  <pre><code>for(String url: referrerSet) {
          String command = &quot;youtube-dl &quot; + url;
          System.out.println(command);
          Process proc = Runtime.getRuntime().exec(command);
  
          BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
          String line = &quot;&quot;;
          while((line = reader.readLine()) != null) {
              System.out.print(line + &quot;\n&quot;);
          }
      }
  </code></pre>
  <p><code>youtube-dl https://player.vimeo.com/video/2352345 --referer  'https://referrerUrl.html'</code></p>
  <p>When I execute from terminal</p>
  <pre><code>[vimeo] 2352345: Downloading webpage
  [vimeo] 2352345: Extracting information
  [vimeo] 2352345: Downloading JSON metadata
  WARNING: Unable to download JSON metadata: HTTP Error 404: Not Found
  </code></pre>
  <p>and start to download the video when I run from java I see only this output:</p>
  <pre><code>[vimeo] 2352345: Downloading webpage
  </code></pre>
  <p>And skip to next link without downloading the video</p>