title: Including Youtube-dl in FFMPEG not working in Bash (OSX)
body: <p>I am trying to download 5 second samples for a list of youtube video. The traditional approach is to download the entire file with "youtube-dl" and then use "ffmpeg" to split it however you want it.</p>
  
  <p>I am trying to use the following method: <a href="https://github.com/ytdl-org/youtube-dl/issues/622#issuecomment-162337869" rel="nofollow noreferrer">https://github.com/ytdl-org/youtube-dl/issues/622#issuecomment-162337869</a></p>
  
  <p>It does work when I include the variables in the command, for example:</p>
  
  <pre><code>ffmpeg -ss 0 -i $(youtube-dl -f best --get-url https://www.youtube.com/watch?v=ySVi-0RS5vI&amp;t=5s) -t 10 -c:v copy -c:a copy title2.mp4
  </code></pre>
  
  <p>However, I am having issues trying to automate the system. Specifically, I would like ffmpeg and youtube-dl to read a file and use the values. I created the file "youtube.txt" which includes the following codes:</p>
  
  <pre><code>440.8,https://www.youtube.com/watch?v=0-4wOE_DNeA,661.2,881.6,0-4wOE_DNeA
  330,https://www.youtube.com/watch?v=0-AMWW6tHzw,495,660,0-AMWW6tHzw
  509.2,https://www.youtube.com/watch?v=0-Rmto2rgMw,763.8,1018.4,0-Rmto2rgMw
  427.6,https://www.youtube.com/watch?v=0-U53qm45cA,641.4,855.2,0-U53qm45cA
  320.4,https://www.youtube.com/watch?v=0-dja9Ys4Sg,480.6,640.8,0-dja9Ys4Sg
  343.6,https://www.youtube.com/watch?v=0-g_PulsqtM,515.4,687.2,0-g_PulsqtM
  415.6,https://www.youtube.com/watch?v=0-nniRyn7dU,623.4,831.2,0-nniRyn7dU
  431.2,https://www.youtube.com/watch?v=006BQU3BFxw,646.8,862.4,006BQU3BFxw
  </code></pre>
  
  <p>I am using the following command:</p>
  
  <pre><code>parallel -j 6 --colsep ',' ffmpeg -ss {1} -i $(youtube-dl -f best --get-url {2}) --t 5 -c:v copy -c:a copy {5} :::: youtube.txt
  </code></pre>
  
  <p>However, I get the following errors:</p>
  
  <pre><code>ERROR: '{2}' is not a valid URL. Set --default-search "ytsearch" (or run  youtube-dl "ytsearch:{2}" ) to search YouTube
  --t: No such file or directory
  </code></pre>
  
  <p>Would you mind helping me?</p>
  
  <p>Thanks!</p>