Jump to content


Photo

Post Processing Script - Working Example - Powershell


  • Please log in to reply
44 replies to this topic

#41 Kramerika OFFLINE  

Kramerika

    Advanced Member

  • Members
  • 178 posts
  • Local time: 02:19 AM
  • LocationPA, US of A

Posted 22 June 2019 - 04:07 PM

That worked!  Thanks!



#42 rbjtech OFFLINE  

rbjtech

    Advanced Member

  • Members
  • 420 posts
  • Local time: 07:19 AM
  • LocationLondon, UK

Posted 31 August 2019 - 04:44 AM

NOTE - 11/9/2018

 

To be clearer the script above does not do any error checking to see if the ffmpeg process failed to convert the ts file and if you have the -DelFile option enabled it will just delete the ts file.

 

Error checking could be added by the user although from reading a few threads on ffmpeg - getting a valid exit code of 0 (zero) does not always mean the conversion worked! - sigh

 

So use the -DelFile with caution as recorded LiveTV is prone to errors in the ts stream - some of which may cause ffmpeg to abort.

 

Hi - Agree that ffmpeg errorlevel is not reliable - you more than likely know this, but if you dump the output via the report function and then parse for 'failed' to determine if it's safe to delete the source file...

 

ie

 

set ffreport=file=ffreport.log:level=32

ffmpeg.exe -report blah blah

findstr /c:"failed" ffreport.log
if !errorlevel!==0 (
echo Failed
) else (
echo OK
)


#43 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3366 posts
  • Local time: 07:19 AM
  • LocationWarrington,UK

Posted 31 August 2019 - 09:02 AM

yuk! bat files :)

 

the script is an example and not fully featured thats for people to work out for themselves

 

 

A Hint on how to do it

 

its actually a lot better to check the converted file for errors using ffprobe, capture the output and parse that to see if you have errors/warnings that you can then decide if the ts file can be deleted



#44 rbjtech OFFLINE  

rbjtech

    Advanced Member

  • Members
  • 420 posts
  • Local time: 07:19 AM
  • LocationLondon, UK

Posted 31 August 2019 - 06:07 PM

ffprobe does not integrity check the file - it just reads the metadata - hence it being better to read the source conversion report file - but however you want to do it ..  :)



#45 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3366 posts
  • Local time: 07:19 AM
  • LocationWarrington,UK

Posted 01 September 2019 - 02:26 AM

you need to look a ffprobe again its doing more than you think






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users