Posts

Useful Python Video Scripts

Taken from a LinkedIn post. Useful Python Scripts:  https://videonerd.website/useful-python-scripts/ Python Scripts for Computer Vision:  https://videonerd.website/python-scripts-for-computer-vision/ Python Scripts to Analyze and Process Transport Streams: https://videonerd.website/python-scripts-to-analyze-and-process-transport-streams/

Git Hell

 Git might just be the worst piece of software ever written.  I'm keeping notes for myself here. - git checkout and git switch - why git sucks so badly

10 Basic Design Patterns

Image
 

How To Use llvm-cov

How To Use llvm-cov Instrumenting your code for llvm-cov See also: https://llvm.org/docs/CommandGuide/llvm-cov.html - Build the code with code coverage turned on: Compile with the -fprofile-arcs and -ftest-coverage options to add the instrumentation. - Run your program, this creates a default.profraw file: % ./program - Run llvm-profdata to create a default.profdata file: % llvm-profdata merge -sparse default.profraw -o default.profdata - Run llvm-cov show for the module you care about: % llvm-cov show -output-dir=output --format=html -instr-profile=./default.profdata ./program /full/path/to/source/module - Now in the output directory you will find an index.txt file, the coverage numbers are in there. - If you want to get coverage for a directory like player or media, you need to specify the .cpp and .hpp files: % llvm-cov show -use-color=0 -output-dir=output -instr-profile=./default.profdata ./program /full/paht/to/source/module/*.[ch]pp

Hitchhiker's Guide To DRM

 Great series on DRM, Common Encryption, FairPlay, Widevine, Playready , etc.

FFPLAY Helpful Commands

  Overlay a frame number ffplay -i input.ts -vf "drawtext=fontfile=Arial.ttf: text='%{frame_num}': start_number=1: x=(w-tw)/2: y=h-(2*lh): fontcolor=black: fontsize=20: box=1: boxcolor=white: boxborderw=5" Show only the first frame of a video ffplay -loop 0 -t 0 -x 500 -an file.mp4

FFPROBE Helpful Commands

 A list of helpful ffprobe commands. Get time stamps, duration, and frame type (inspired from here ) ffprobe -i file.ts -select_streams v -show_frames -show_entries frame=pkt_dts_time,pkt_duration_time,pict_type -of csv=p=0 Get frame time and picture number ffprobe -i file.ts -select_streams v -show_frames -show_entries frame=pict_type,coded_picture_number -of csv=p=0