Video Codec Analysis, Quality Scoring & HEVC Transcoding Tool โ built with FFmpeg/FFprobe, Python and Streamlit.
CodecInspector inspects any video file, extracts detailed codec/container metadata, computes an Overall Quality Score, gives an actionable recommendation, and can transcode the file to H.265 (HEVC) while reporting exactly how much bitrate and file size were saved. It also ships a Batch Analyzer for scanning an entire folder of videos at once.
โญ If you find this useful, consider starring the repo.
| Category | Feature |
|---|---|
| Metadata | Codec, profile, level, resolution, FPS, duration, frame count, container, file size, bitrate |
| Advanced Metadata | Pixel format, chroma subsampling, bit depth, aspect ratio, color space, encoder tag, B-frames, audio stream info |
| Quality Scoring | 0โ100 Overall Score based on codec modernity, bits-per-pixel efficiency and file size, with good/warning/bad badges |
| Recommendation Engine | Actionable, codec- and score-aware suggestions (e.g. "Convert to HEVC to cut bitrate further") |
| Transcoding | One-click H.264 โ H.265 (HEVC) conversion via FFmpeg, with adjustable CRF |
| Comparison | Before/after codec, bitrate and size comparison with automatic savings % |
| Batch Analyzer | Scan an entire folder, analyze every video, and bulk-convert the whole batch to H.265 with aggregate savings |
| Reports | Styled HTML report, professional PDF report, and CSV export |
| Raw Data | One-click download of the raw FFprobe JSON metadata |
| Dashboard | Clean Streamlit UI with drag & drop upload, thumbnails, metrics and downloads |
Video analysis & Overall Score

Advanced metadata, audio stream & export

H.265 conversion & comparison report

CodecInspector/
โ
โโโ dashboard.py # Main Streamlit UI (single-video analysis + conversion)
โโโ batch_dashboard.py # Streamlit UI for batch folder analysis + bulk conversion
โโโ app.py # Terminal / CLI demo of the full pipeline
โโโ config.py # Cross-platform FFmpeg/FFprobe path resolution & directories
โโโ requirements.txt
โ
โโโ models/
โ โโโ media_info.py # MediaInfo dataclass โ normalized video metadata
โ
โโโ utils/
โ โโโ ffprobe_utils.py # FFprobe subprocess wrapper
โ โโโ metadata.py # Raw ffprobe JSON -> MediaInfo (advanced field extraction)
โ โโโ formatter.py # Human-readable size / bitrate / duration formatting
โ
โโโ services/
โ โโโ analyzer.py # Facade: ffprobe + metadata + score + recommendation in one call
โ โโโ score.py # Overall Score engine (codec / bitrate / size weighting)
โ โโโ recommendation.py # Recommendation engine
โ โโโ thumbnail.py # Thumbnail extraction (FFmpeg)
โ โโโ transcoder.py # H.264 -> H.265 transcoding (FFmpeg)
โ โโโ compare.py # Before/after comparison + savings calculation
โ โโโ batch_analyzer.py # Folder scanning + batch analysis + batch transcoding
โ โโโ report.py # Styled HTML report generator
โ โโโ pdf_report.py # PDF report generator (ReportLab)
โ โโโ csv_export.py # CSV export
โ โโโ json_export.py # Raw FFprobe JSON export
โ
โโโ sample_videos/ # Small sample clip for demos/tests
โโโ thumbnails/ # Generated thumbnails
โโโ reports/ # Generated HTML/PDF/CSV reports & converted videos (gitignored)
โโโ temp/ # Uploaded-file scratch space (gitignored)
โโโ screenshots/ # README screenshots
Design principle: ffprobe/ffmpeg calls, metadata parsing, scoring, and reporting are each isolated in their own service, so dashboard.py and batch_dashboard.py stay thin and only handle UI/state.
- Python 3.9+
- FFmpeg & FFprobe installed and available on your system:
- Windows: download from ffmpeg.org, add
ffmpeg\binto PATH (or setCODECINSPECTOR_FFMPEG/CODECINSPECTOR_FFPROBEenv vars to the full.exepaths). - macOS:
brew install ffmpeg - Linux:
sudo apt install ffmpeg
- Windows: download from ffmpeg.org, add
git clone https://github.com/fatmanurylmaaaz/CodecInspector.git
cd CodecInspector
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtstreamlit run dashboard.pyUpload a video (drag & drop supported) to see:
- Full metadata + advanced metadata
- Overall Score + recommendation
- One-click H.265 conversion with before/after comparison
- JSON / CSV / HTML / PDF export buttons
streamlit run batch_dashboard.pyPoint it at any folder to analyze every video inside, export the results to CSV, and optionally bulk-convert the entire batch to H.265 with aggregate size/bitrate savings.
python app.pyRuns the full pipeline (metadata โ score โ recommendation โ thumbnail โ H.265 conversion โ comparison) against the bundled sample video and prints the results to the terminal.
The score is a weighted combination of three factors:
| Factor | Weight | What it measures |
|---|---|---|
| Codec modernity | 45% | AV1/HEVC score highest, H.264 mid-high, legacy codecs (MPEG-2, MJPEG) score low |
| Bitrate efficiency | 35% | Bits-per-pixel (bitrate / (width ร height ร fps)) โ rewards efficient encoding |
| File size efficiency | 20% | MB per minute of runtime โ rewards compact files |
Each factor also produces a โ good / โ warning / โ bad badge, plus a Streaming Ready check (codec + container combination suitable for web/streaming delivery).
- Python 3
- Streamlit โ dashboard UI
- FFmpeg / FFprobe โ video analysis & transcoding
- Pandas โ tabular data (batch analyzer, comparisons)
- ReportLab โ PDF report generation
Planned for future versions:
- AV1 transcoding support
- Configurable target bitrate/resolution presets
- Drag & drop batch folder upload (zip) for environments without local file access
- Dockerfile for one-command deployment
Released under the MIT License.

