Skip to content

Commit 1c4ab14

Browse files
Update to FFMPEG 8.0.0 (#433)
Co-authored-by: Ian Butterworth <[email protected]>
1 parent dea1a87 commit 1c4ab14

File tree

4 files changed

+2222
-3182
lines changed

4 files changed

+2222
-3182
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Scratch = "6c6a2e73-6563-6170-7368-637461726353"
1818
ColorTypes = "0.9, 0.10, 0.11, 0.12"
1919
Downloads = "1.3"
2020
FFMPEG = "0.4.4"
21-
FFMPEG_jll = "7.1.1"
21+
FFMPEG_jll = "8.0.0"
2222
FileIO = "1.6"
2323
Glob = "1.2"
2424
ImageCore = "0.8, 0.9, 0.10"

docs/make.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ makedocs(
66
assets = ["assets/favicon.ico"],
77
analytics = "UA-143027902-2",
88
canonical = "https://juliaio.github.io/VideoIO.jl/stable/",
9+
size_threshold = 2_000_000, # 2 MB for FFmpeg reference page
910
),
1011
sitename = "VideoIO.jl",
1112
pages = Any[
@@ -14,8 +15,9 @@ makedocs(
1415
"Writing Videos"=>"writing.md",
1516
"Utilities"=>"utilities.md",
1617
"Low Level Functionality"=>"lowlevel.md",
18+
"FFmpeg Reference"=>"ffmpeg_reference.md",
1719
"Index"=>"functionindex.md",
1820
],
19-
warnonly = :missing_docs,
21+
warnonly = [:missing_docs, :cross_references],
2022
)
2123
deploydocs(repo = "github.com/JuliaIO/VideoIO.jl.git", push_preview = true)

docs/src/ffmpeg_reference.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# FFmpeg Low-Level Reference
2+
3+
This page documents low-level FFmpeg constants, types, and functions that are available through VideoIO's `libffmpeg` module.
4+
5+
```@contents
6+
Pages = ["ffmpeg_reference.md"]
7+
Depth = 2
8+
```
9+
10+
## Overview
11+
12+
VideoIO provides Julia bindings to FFmpeg through the `VideoIO.libffmpeg` module. This module contains over 1,000 functions, constants, and types from FFmpeg's C libraries. While most users will use VideoIO's high-level API (see [Reading Videos](@ref) and [Writing Videos](@ref)), advanced users may need direct access to FFmpeg functionality.
13+
14+
### FFmpeg Subpackages
15+
16+
Each FFmpeg library is exposed as a VideoIO subpackage:
17+
18+
| FFmpeg Library | VideoIO Module | Description |
19+
|----------------|----------------|-------------|
20+
| `libavcodec` | `AVCodecs` | Codec library - encoding/decoding |
21+
| `libavdevice` | `AVDevice` | Device library - camera/screen capture |
22+
| `libavfilter` | `AVFilters` | Filter library - video/audio processing |
23+
| `libavformat` | `AVFormat` | Format library - muxing/demuxing |
24+
| `libavutil` | `AVUtil` | Utility library - common functions |
25+
| `libswscale` | `SWScale` | Scaling library - pixel format conversion |
26+
| `libswresample` | `SWResample` | Resampling library - audio conversion |
27+
28+
### Usage Example
29+
30+
```julia
31+
using VideoIO
32+
33+
# Access low-level FFmpeg functionality
34+
import VideoIO.libffmpeg
35+
36+
# Check pixel format constant
37+
pix_fmt = VideoIO.libffmpeg.AV_PIX_FMT_RGB24
38+
39+
# Use AVRational for time base
40+
time_base = VideoIO.libffmpeg.AVRational(1, 30) # 1/30 second per frame
41+
42+
# Convert to Julia Rational
43+
julia_rational = Rational(time_base.num, time_base.den)
44+
```
45+
46+
### Key Concepts
47+
48+
**Pixel Formats**: FFmpeg supports numerous pixel formats via `AV_PIX_FMT_*` constants. Common ones include:
49+
50+
- `AV_PIX_FMT_RGB24` - Packed RGB 8:8:8, 24bpp
51+
- `AV_PIX_FMT_GRAY8` - Grayscale, 8bpp
52+
- `AV_PIX_FMT_YUV420P` - Planar YUV 4:2:0, 12bpp
53+
54+
**Media Types**: Stream types are identified by `AVMEDIA_TYPE_*` constants:
55+
56+
- `AVMEDIA_TYPE_VIDEO` - Video stream
57+
- `AVMEDIA_TYPE_AUDIO` - Audio stream
58+
- `AVMEDIA_TYPE_SUBTITLE` - Subtitle stream
59+
60+
**Special Values**:
61+
62+
- `AV_NOPTS_VALUE` - Indicates no presentation timestamp (0x8000000000000000)
63+
- `AVPROBE_SCORE_MAX` - Maximum probe score (100)
64+
65+
**Codec Properties**:
66+
67+
- `AV_CODEC_PROP_FIELDS` - Flag indicating field-based (interlaced) codec support
68+
69+
For detailed information on FFmpeg 8 compatibility changes, see:
70+
71+
- [FFmpeg ticks_per_frame deprecation](https://github.com/FFmpeg/FFmpeg/commit/7d1d61cc5f57708434ba720b03234b3dd93a4d1e)
72+
- [AVCodecContext.time_base documentation](https://ffmpeg.org/doxygen/trunk/structAVCodecContext.html#a17f4c12d8b7693dbbcdab8ed765ab7ce)
73+
74+
## Complete API Reference
75+
76+
The following sections provide auto-generated documentation for all exported items in `VideoIO.libffmpeg`.
77+
78+
### Functions
79+
80+
```@autodocs
81+
Modules = [VideoIO.libffmpeg]
82+
Order = [:function]
83+
```
84+
85+
### Types
86+
87+
```@autodocs
88+
Modules = [VideoIO.libffmpeg]
89+
Order = [:type]
90+
```
91+
92+
### Constants
93+
94+
```@autodocs
95+
Modules = [VideoIO.libffmpeg]
96+
Order = [:constant]
97+
```
98+
99+
## See Also
100+
101+
- [Reading Videos](@ref)
102+
- [Writing Videos](@ref)
103+
- [Low level functionality](@ref)
104+
- [FFmpeg Official Documentation](https://ffmpeg.org/documentation.html)

0 commit comments

Comments
 (0)