Skip to content

Instantly share code, notes, and snippets.

View PHDPeter's full-sized avatar

Dr Peter Overbury PHDPeter

View GitHub Profile
@PHDPeter
PHDPeter / audible-goodreads-import.py
Last active February 5, 2020 14:21 — forked from lovettbarron/audible-goodreads-import.py
Audible Goodreads Importer
# So this is a somewhat manual but not nearly as manual as it could be process.
# First, follow the instructions here: https://www.themodernnomad.com/audible-statistics-extractor/
# Depending on how many pages, copy and paste the results into Excel
# (it will auto format, though you will need to remove the header)
# Before running
# Install the required libraries: pandas and isbntools
# Modify the read_excel argument to point at your file.
# Then point the to_csv argument to wherever you want to export to.
@PHDPeter
PHDPeter / Lossless cutting of videos to small clips by OpenCv and FFMPG (PYTHON)
Last active October 31, 2019 16:35
Lossless cutting of videos to small clips by OpenCv and FFMPG (PYTHON)
Ok this is my first time realy playing with vidos so here it is.
FFMPG (Try)
SO the first issue I had here was getting the cuts to be lossless, i.e. cut on the fram you want not the nearsed key frame.
I started by trying to do this with FFMPG (and I am sure smarter pepole then me can get this to work) but this tended to be not quite lossless in that the number of total fmaes for each vido varired from video to vidoe.
For my needs I had to have tight control over the total number of frames so this would not work for me.
That said below is the FFMPG code that Iwas using:
stri = "ffmpeg -ss " +str(start_in_sec)+" -i " + str(input)+" -vcodec "+str(codec) +" -c:a libmp3lame "+ " -to " +str(end_in_sec) + " -c copy " +str(output)
As the code I am doing is in python I this call will need to be used with os.system(command) .
Thhere is a issue with getting the new dell PC's we have to update to the right ubuntu libarys. I tures out it was that the sorece list for the dell is not quite uptodate so you just need to add the mrror that you can find at the below link.
You wll also need to do a restart after that to take effect as well btw.
https://launchpad.net/ubuntu/+mirror/ubuntu.unc.edu.ar-archive