Skip to content

Instantly share code, notes, and snippets.

View privatezero's full-sized avatar

Andrew Weaver privatezero

View GitHub Profile
@privatezero
privatezero / test.wav_MediaTrace.xml
Last active July 21, 2022 21:51
MediaTrace output
<?xml version="1.0" encoding="UTF-8"?>
<MediaTrace
xmlns="https://mediaarea.net/mediatrace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://mediaarea.net/mediatrace https://mediaarea.net/mediatrace/mediatrace_0_1.xsd"
version="0.1">
<creatingLibrary version="22.06.20220718" url="https://mediaarea.net/MediaInfo">MediaInfoLib</creatingLibrary>
<media ref="test.wav">
<block offset="0" name="WAVE" size="12">
@privatezero
privatezero / BEXT-Check-Policy
Created July 21, 2022 21:30
MediaConch BEXT policy
<?xml version="1.0"?>
<policy type="and" name="BEXT Check" license="CC-BY-SA-4.0+">
<description>This used to work</description>
<rule name="BEXT Exist?" value="Wave/Broadcast extension/" occurrence="*" operator="exists" scope="mmt"/>
</policy>
Input files summary:
File 0: 1075 = 1.1718% of frames have errors; 22611 = 0.0173% of blocks have errors.
File 1: 39 = 0.0425% of frames have errors; 14528 = 0.0111% of blocks have errors.
Usage of input files:
130610868 = 98.8685% of blocks from file 0 used.
1494732 = 1.1315% of blocks from file 1 used.
How frames are merged:
91703 = 99.9597% of frames are recovered from full frames.
<?xml version="1.0" encoding="UTF-8"?>
<dvrescue xmlns="https://mediaarea.net/dvrescue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/dvrescue https://mediaarea.net/dvrescue/dvrescue.xsd" version="1.1">
<creator>
<program>dvrescue</program>
<version>0.20.06.20201025</version>
</creator>
<media ref="error.dv" format="DV" size="215880000">
<frames count="1799" pts="00:00:00.000000" end_pts="00:01:00.026633" size="720x480" video_rate="30000/1001" chroma_subsampling="4:1:1" aspect_ratio="4/3" audio_rate="48000" channels="2">
<frame n="0" pos="0" pts="00:00:00.000000" tc="01:09:48:11" arb="7" no_pack_aud="1"/>
<frame n="771" pos="92520000" pts="00:00:25.725700" tc="01:10:14:02" arb="A" no_pack_aud="1">
<?xml version="1.0" encoding="UTF-8"?>
<dvrescue xmlns="https://mediaarea.net/dvrescue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/dvrescue https://mediaarea.net/dvrescue/dvrescue.xsd" version="1.1">
<creator>
<program>dvrescue</program>
<version>0.20.06.20201025</version>
</creator>
<media ref="/home/weaver/Repositories/dvrescue/tools/samples/error.dv" format="DV" size="215880000">
<frames count="1799" pts="00:00:00.000000" end_pts="00:01:00.026633" size="720x480" video_rate="30000/1001" chroma_subsampling="4:1:1" aspect_ratio="4/3" audio_rate="48000" channels="2">
<frame n="0" pos="0" pts="00:00:00.000000" tc="01:09:48:11" arb="7" no_pack_aud="1"/>
<frame n="771" pos="92520000" pts="00:00:25.725700" tc="01:10:14:02" arb="A" no_pack_aud="1" full_conceal_vid="1">
@privatezero
privatezero / uw-ffv1-specs.txt
Created August 27, 2020 21:35
FFV1 settings example
These are sample FFmpeg settings for creating an FFV1/MKV file that conforms to UW Libraries' requirements.
Command assumes that the audio stream has been captured as 24 bit/48 kHz PCM.
ffmpeg -i INPUT -c:v ffv1 -level 3 -g 1 -slices 16 -slicecrc 1 -c:a copy OUTPUT.mkv
ffmpeg -f image2 -r 24 -i INPUT_%08d.dpx -c:v ffv1 -level 3 -slices 16 -slicecrc 1 -g 1 -r 24 INPUT.mkv -f framemd5 -r 24 INPUT-original.framemd5
ffmpeg -i INPUT.mkv' -i INPUT.wav -c:v libx264 -preset veryfast -crf 18 -vf scale=720x480 -movflags +faststart -map 0:v:0 -map 1:a:0 -y INPUT.mp4 -target ntsc-dvd -map 0:v:0 -map 1:a:0 INPUT-for-dvd.mpg -f framemd5 -pix_fmt rgb48be -map 0:v:0 -y INPUT-transcode.framemd5
# sometimes need -start_number number
FFmpeg commands:
* ffmpeg -i TARGET.mp4 -vf yadif,crop=CROP -target ntsc-dvd TARGET-for-dvd.mpg
* ffmpeg -i TARGET.mp4 -vf "fieldmatch,yadif,decimate,crop=[CROP-VALUES]" -target film-dvd TARGET-for-dvd.mpg
(Crop example: crop=in_w:in_h-10:0:0)
export VIDEO_FORMAT=NTSC
dvdauthor -t [TARGET-for-dvd.mpg] --video=NTSC -o DVD
dvdauthor -T -o DVD
genisoimage -dvd-video -V ['TARGET'S TITLE'] -o [TARGET.iso] DVD
wodim --devices
wodim -v dev=[DEVICE] speed=10 -eject [TARGET.iso]
@privatezero
privatezero / hash.rb
Last active June 15, 2020 16:46
Hash Check for Jacobs Waves
require 'digest'
waves = Dir["#{ARGV[0]/*.wav}"]
confirmed = []
failed = []
missing = []
waves.each do |wave|
puts "Verifying #{wave}"
md5_file = File.dirname(wave) + '/' + File.basename(wave,".wav") + '.md5'
if File.exist?(md5_file)
@privatezero
privatezero / rip.sh
Created March 17, 2020 23:47
abcde command
abcde -n -N -1 -1 -o flac -a default,cue -x