Skip to content

Commit 247837b

Browse files
author
amin
committed
update readme ci and add minor improvement
1 parent 07ca438 commit 247837b

File tree

3 files changed

+63
-21
lines changed

3 files changed

+63
-21
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: PHP-AV CI TEST
1+
name: AV TESTS
22

33
on:
44
push:

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@
33
[![PHP Version](https://img.shields.io/badge/php-%3E%3D8.4-blue.svg)](https://php.net/)
44
[![License](https://img.shields.io/badge/license-BSD-blue.svg)](LICENSE)
55

6-
This PHP package provides bindings to AV libraries (including AVCodec and AVFilter) for encoding, transcoding, and manipulating audio and video.
7-
6+
PHP AV Libraries provides FFI bindings to AV libraries (including AVCodec and AVFilter) for encoding, transcoding, and manipulating audio/video streams.
87

98
## Requirements
109

11-
- PHP 8.4 or higher with FFI extension enabled
10+
- PHP ≥ 8.4 with FFI extension enabled
11+
- Linux (Windows and macOS support planned for future releases)
1212
- FFmpeg/libav shared libraries (libavcodec, libavfilter, etc.)
13-
14-
13+
- Compatible with FFmpeg version 7.1.1
1514

1615
## Documentation
1716

18-
This package is a part of PHP WebRTC library. For full documentation, examples, and API reference, please visit:
19-
[PHP WebRTC Documentation](https://www.quasarstream.com/php-webrtc)
17+
This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit:
2018

19+
[PHP WebRTC Documentation](https://www.quasarstream.com/php-webrtc)
2120

2221
## Credits
2322

24-
### Author
23+
### Authors
2524

2625
- **Amin Yazdanpanah**
2726
- Website: [aminyazdanpanah.com](https://www.aminyazdanpanah.com)
28-
- Email: [github@aminyazdanpanah.com](mailto:github@aminyazdanpanah.com)
27+
- Email: [contact@aminyazdanpanah.com](mailto:contact@aminyazdanpanah.com)
2928
- **Sana Moniri**
30-
- Github: [sanamoniri](https://github.com/sanamoniri)
29+
- GitHub: [sanamoniri](https://github.com/sanamoniri)
3130

32-
## Reporting bugs
31+
## Reporting Issues
3332

34-
If you encounter any issues or bugs, please open an issue on GitHub.
33+
Found a bug? Please open an issue on our [GitHub repository](https://github.com/your-repo-here).
3534

3635
## License
3736

38-
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
37+
BSD 3-Clause License. See [LICENSE](LICENSE) for full details.

src/AVCodec.php

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ public static function init(bool $debug = false): void
8080
$os = PHP_OS_FAMILY;
8181
$installHint = match ($os) {
8282
'Windows' => <<<EOT
83-
Download and install FFmpeg (version 7.x or higher) with development files (DLLs) from https://ffmpeg.org/download.html.
83+
Download and install FFmpeg (version 7.1.1) with development files (DLLs) from https://ffmpeg.org/download.html.
8484
Make sure avcodec-*.dll is in your PATH or specify the LIB_AVCODEC_PATH environment variable.
8585
EOT,
8686
'Darwin' => <<<EOT
8787
Install FFmpeg with development headers on macOS:
8888
8989
brew install ffmpeg
9090
91-
Ensure it is version 7.x or higher. You may need to use:
91+
Ensure it is version 7.1.1. You may need to use:
9292
9393
brew upgrade ffmpeg
9494
@@ -100,15 +100,58 @@ public static function init(bool $debug = false): void
100100
For Debian/Ubuntu:
101101
102102
sudo apt update
103-
sudo apt install libavcodec-dev
103+
104+
sudo apt install -y \
105+
autoconf automake build-essential cmake git libtool \
106+
pkg-config texinfo zlib1g-dev libx264-dev libx265-dev \
107+
libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev \
108+
nasm
109+
110+
git clone https://github.com/FFmpeg/FFmpeg.git
111+
112+
cd FFmpeg
113+
114+
git checkout n7.1.1
115+
116+
./configure --enable-shared --enable-gpl --enable-nonfree \
117+
--enable-libx264 --enable-libx265 --enable-libvpx \
118+
--enable-libfdk-aac --enable-libmp3lame --enable-libopus
119+
120+
make -j$(nproc)
121+
122+
sudo make install
123+
124+
sudo ldconfig
104125
105126
For Fedora/RHEL:
106127
107-
sudo dnf install ffmpeg-devel
108-
109-
Make sure the installed version is 7.x or higher. If your package manager provides an older version, consider building FFmpeg manually from source.
128+
sudo dnf update -y
129+
130+
sudo dnf install -y \
131+
autoconf automake cmake git libtool make gcc gcc-c++ \
132+
pkgconfig texinfo zlib-devel x264-devel x265-devel \
133+
libvpx-devel fdk-aac-devel lame-devel opus-devel \
134+
nasm
135+
136+
git clone https://github.com/FFmpeg/FFmpeg.git
137+
138+
cd FFmpeg
139+
140+
git checkout n7.1.1
141+
142+
./configure --enable-shared --enable-gpl --enable-nonfree \
143+
--enable-libx264 --enable-libx265 --enable-libvpx \
144+
--enable-libfdk-aac --enable-libmp3lame --enable-libopus
145+
146+
make -j$(nproc)
147+
148+
sudo make install
149+
150+
sudo ldconfig
151+
152+
Make sure the installed version is 7.1.1. If your package manager provides an older version, consider building FFmpeg manually from source.
110153
EOT,
111-
default => "Please install FFmpeg (version 7.x or higher) and ensure the development libraries (headers and shared libs) are available on your system. See https://ffmpeg.org/download.html for instructions."
154+
default => "Please install FFmpeg (version 7.1.1) and ensure the development libraries (headers and shared libs) are available on your system. See https://ffmpeg.org/download.html for instructions."
112155
};
113156

114157
throw new AvCodecException(sprintf(

0 commit comments

Comments
 (0)