Answers.Body: <p>The final processed stream has to be cloned and mapped, so for the given command,</p>
  
  <pre><code>ffmpeg.exe -re -t 00:00:35.000 -i input.mp4 -i overlay.png -filter_complex "[0:v]scale=1200:720[scaled];[1:v]scale=150:-1[overl];[scaled][overl]overlay=main_w-overlay_w-10:10,split=2[logo][preview];[preview]fps=4,scale=320x240[preview]" -map "[logo]" -map 0:a -c:a copy  -c:v libx264 -f mpegts udp://224.2.2.1:1234 -map "[preview]" -update 1 -y preview.jpg
  </code></pre>
  
  <p>(The issue corrected here has nothing to do with the updating of a single image).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-07T16:59:58.840Z
Answers.LastActivityDate: 2018-06-07T16:59:58.840Z
Answers.UserDisplayName: Gyan
Body: <p>I am using ffmpeg to stream first 35 seconds of a movie over udp ..
  in the process of showing a preview of this movie while streaming i reached this command</p>
  
  <pre><code>ffmpeg.exe -re -t 00:00:35.000 -i input.mp4 -i overlay.png -filter_complex "[0:v]scale=1200:720[scaled];[1:v]scale=150:-1[overl],[scaled][overl]overlay=main_w-overlay_w-10:10[logo]" -map "[logo]" -map 0:a -c:a copy  -c:v libx264 -f mpegts udp://224.2.2.1:1234 -vf fps=4 -s 320x240 -update 1 -y preview.jpg
  </code></pre>
  
  <p>the problem is .. if i don't use the overlay i get my preview.jpg perfectly, but when i do .. ffmpeg streams ok but without creating the jpg image ..</p>
  
  <p>any idea ?? please.</p>
  
  <p>thank you.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-07T16:44:06.827Z
Comments.Text: Do you want the preview with the overlay?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-07T16:54:15.650Z
Comments.Text: Yes and with all the applied filters like subtitle and banner and so...
Comments.UserDisplayName: Tony Hanna
Tags: <ffmpeg><preview>
Title: ffmpeg stops exporting images when using overlay
UserDisplayName: Tony Hanna
ThreadText: # ffmpeg stops exporting images when using overlay
  
  (Asked by: username_0 on 2018-06-07)
  
  I am using ffmpeg to stream first 35 seconds of a movie over udp ..
  in the process of showing a preview of this movie while streaming i reached this command
  
  ```
  ffmpeg.exe -re -t 00:00:35.000 -i input.mp4 -i overlay.png -filter_complex "[0:v]scale=1200:720[scaled];[1:v]scale=150:-1[overl],[scaled][overl]overlay=main_w-overlay_w-10:10[logo]" -map "[logo]" -map 0:a -c:a copy  -c:v libx264 -f mpegts udp://224.2.2.1:1234 -vf fps=4 -s 320x240 -update 1 -y preview.jpg
  
  ```
  
  the problem is .. if i don't use the overlay i get my preview.jpg perfectly, but when i do .. ffmpeg streams ok but without creating the jpg image ..
  
  any idea ?? please.
  
  thank you.
  
  **Tags:** ffmpeg, preview
  
  > **Comments:**
  > **username_1**: Do you want the preview with the overlay?  
  > **username_0**: Yes and with all the applied filters like subtitle and banner and so...  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-06-07. Score: 1 | Accepted answer
  
  The final processed stream has to be cloned and mapped, so for the given command,
  
  ```
  ffmpeg.exe -re -t 00:00:35.000 -i input.mp4 -i overlay.png -filter_complex "[0:v]scale=1200:720[scaled];[1:v]scale=150:-1[overl];[scaled][overl]overlay=main_w-overlay_w-10:10,split=2[logo][preview];[preview]fps=4,scale=320x240[preview]" -map "[logo]" -map 0:a -c:a copy  -c:v libx264 -f mpegts udp://224.2.2.1:1234 -map "[preview]" -update 1 -y preview.jpg
  
  ```
  
  (The issue corrected here has nothing to do with the updating of a single image).
  
  
  ---
  
  