Advertisement
mimoprohodil

EasyPreview

Jul 13th, 2015
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.84 KB | None | 0 0
  1. @echo off
  2. if exist EasyPrev.txt del EasyPrev.txt
  3. echo ###### File - Path to source file
  4. echo ###### Output File - Webm with preview filename (without .webm)
  5. echo ###### Frame Time - From this time the picture for preview will be taken
  6. echo ###### Example: File: C:\video.webm, Output file: video_s_prev.webm, Frame Time: 00:05
  7. set /P f="File: "
  8. set /P o="Output File: "
  9. set /P t="FrameTime: "
  10. ffmpeg -hide_banner -ss %t% -i %f% -vframes 1 -c copy -an -y TEMP_EasyPrev_preview.webm
  11. copy /Y %f% TEMP_EasyPrev_source.webm
  12. echo file 'TEMP_EasyPrev_preview.webm'>nul>>EasyPrev.txt
  13. echo file 'TEMP_EasyPrev_source.webm'>>EasyPrev.txt
  14. ffmpeg -hide_banner -itsoffset 0.04 -i %f% -f concat -i EasyPrev.txt -map 1:v -map 0:a -c copy -y "%o%.webm"
  15. del TEMP_EasyPrev_preview.webm
  16. del TEMP_EasyPrev_source.webm
  17. del EasyPrev.txt
  18. echo ##### Script End #####
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement