Skip to content

Commit f31f038

Browse files
Merge pull request #123 from hadronepoch/shalmor-patch-1
Update README.md
2 parents 2eb946e + 46aac49 commit f31f038

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

README.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# 📼 Python FFmpeg Video Streaming
2-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/aminyazdanpanah/python-ffmpeg-video-streaming/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/aminyazdanpanah/python-ffmpeg-video-streaming/?branch=master)
32
[![Downloads](https://pepy.tech/badge/python-ffmpeg-video-streaming)](https://pepy.tech/project/python-ffmpeg-video-streaming)
4-
[![PyPI version](https://badge.fury.io/py/python-ffmpeg-video-streaming.svg)](https://badge.fury.io/py/python-ffmpeg-video-streaming)
5-
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/LICENSE)
63

74
## Overview
85
This package uses the **[FFmpeg](https://ffmpeg.org)** to package media content for online streaming such as DASH and HLS. You can also use **[DRM](https://en.wikipedia.org/wiki/Digital_rights_management)** for HLS packaging. There are several options to open a file from a cloud and save files to clouds as well.
9-
- **[Full Documentation](https://video.aminyazdanpanah.com/python/)** is available describing all features and components.
10-
- In this version(>=v0.1.0) all codes are rewritten from scratch. If you find any bugs in the library, please **[file an issue](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/issues)**. **[Pull requests](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/pulls)** are also welcome.
11-
6+
- **[Full Documentation](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/)** is available describing all features and components.
7+
- **Your support is crucial to our ongoing work on open-source projects**. We kindly request that you consider exploring the **[available options](#support-us)** to assist us in this endeavor. Your encouragement and assistance will help us continue to deliver high-quality results in this important area. Thank you for your consideration and support.
8+
129
**Contents**
1310
- [Requirements](#requirements)
1411
- [Installation](#installation)
@@ -23,6 +20,7 @@ This package uses the **[FFmpeg](https://ffmpeg.org)** to package media content
2320
- [Conversion](#conversion)
2421
- [Several Open Source Players](#several-open-source-players)
2522
- [FAQs](#faqs)
23+
- [Support Us](#support-us)
2624
- [Contributing and Reporting Bugs](#contributing-and-reporting-bugs)
2725
- [Credits](#credits)
2826
- [License](#license)
@@ -61,7 +59,7 @@ See **[FFmpeg Protocols Documentation](https://ffmpeg.org/ffmpeg-protocols.html)
6159

6260
**For example:**
6361
```python
64-
video = ffmpeg_streaming.input('https://www.aminyazdanpanah.com/?"PATH TO A VIDEO FILE" or "PATH TO A LIVE HTTP STREAM"')
62+
video = ffmpeg_streaming.input('https://www.hadronepoch.org/?"PATH TO A VIDEO FILE" or "PATH TO A LIVE HTTP STREAM"')
6563
```
6664

6765
#### 2. From Clouds
@@ -73,7 +71,7 @@ s3 = S3(aws_access_key_id='YOUR_KEY_ID', aws_secret_access_key='YOUR_KEY_SECRET'
7371

7472
video = ffmpeg_streaming.input(s3, bucket_name="bucket-name", key="video.mp4")
7573
```
76-
Visit **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=open)** to see some examples of opening a file from **[Amazon S3](https://aws.amazon.com/s3)**, **[Google Cloud Storage](https://console.cloud.google.com/storage)**, **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**, and a custom cloud.
74+
Visit **[this page](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start/clouds?r=open)** to see some examples of opening a file from **[Amazon S3](https://aws.amazon.com/s3)**, **[Google Cloud Storage](https://console.cloud.google.com/storage)**, **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**, and a custom cloud.
7775

7876
#### 3. Capture Webcam or Screen (Live Streaming)
7977
You can pass the name of a supported, connected capture device(i.e. the name of a webcam, camera, screen and etc) to the `input` method to stream a live media over the network from your connected device.
@@ -112,7 +110,7 @@ dash = video.dash(Formats.h264())
112110
dash.representations(_144p, _240p, _360p, _480p, _720p, _1080p, _2k, _4k)
113111
dash.output('/var/media/dash.mpd')
114112
```
115-
See **[DASH section](https://video.aminyazdanpanah.com/python/start?r=dash#dash)** in the documentation, for more examples.
113+
See **[DASH section](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start?r=dash#dash)** in the documentation, for more examples.
116114
### HLS
117115
**[HTTP Live Streaming (also known as HLS)](https://developer.apple.com/streaming/)** is an HTTP-based adaptive bitrate streaming communications protocol implemented by Apple Inc. as part of its QuickTime, Safari, OS X, and iOS software. Client implementations are also available in Microsoft Edge, Firefox, and some versions of Google Chrome. Support is widespread in streaming media servers. [Learn more](https://en.wikipedia.org/wiki/HTTP_Live_Streaming)
118116

@@ -136,7 +134,7 @@ hls = video.hls(Formats.h264())
136134
hls.representations(_360p, _480p, _720p)
137135
hls.output('/var/media/hls.m3u8')
138136
```
139-
See **[HLS section](https://video.aminyazdanpanah.com/python/start?r=hls#hls)** in the documentation, for more examples such as Fragmented MP4, live from camera/screen and so on.
137+
See **[HLS section](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start?r=hls#hls)** in the documentation, for more examples such as Fragmented MP4, live from camera/screen and so on.
140138

141139
#### Encryption(DRM)
142140
The encryption process requires some kind of secret (key) together with an encryption algorithm. HLS uses AES in cipher block chaining (CBC) mode. This means each block is encrypted using the ciphertext of the preceding block. [Learn more](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)
@@ -153,7 +151,7 @@ from ffmpeg_streaming import Formats
153151
save_to = '/home/public_html/"PATH TO THE KEY DIRECTORY"/key'
154152

155153
#A URL (or a path) to access the key on your website
156-
url = 'https://www.aminyazdanpanah.com/?"PATH TO THE KEY DIRECTORY"/key'
154+
url = 'https://www.hadronepoch.org/?"PATH TO THE KEY DIRECTORY"/key'
157155
# or url = '/"PATH TO THE KEY DIRECTORY"/key';
158156

159157
hls = video.hls(Formats.h264())
@@ -165,7 +163,7 @@ hls.output('/var/media/hls.m3u8')
165163
##### Key Rotation
166164
An integer as a "key rotation period" can also be passed to the `encryption` method (i.e. `encryption(save_to, url, 10)`) to use a different key for each set of segments, rotating to a new key after this many segments. For example, if 10 segment files have been generated then it will generate a new key. If you set this value to **`1`**, each segment file will be encrypted with a new encryption key. This can improve security and allows for more flexibility.
167165

168-
See **[the example](https://video.aminyazdanpanah.com/python/start?r=enc-hls#hls-encryption)** for more information.
166+
See **[the example](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start?r=enc-hls#hls-encryption)** for more information.
169167

170168
**IMPORTANT:** It is very important to protect your key(s) on your website. For example, you can use a token(using a Get/Post HTTP method or add a token to authorization header) to check if the user is eligible to access the key or not. You can also use a session(or cookie) on your website to restrict access to the key(s)(**It is highly recommended**).
171169

@@ -275,7 +273,7 @@ A path can also be passed to save a copy of files to your local machine.
275273
hls.output('/var/media/hls.m3u8', clouds=save_to_s3)
276274
```
277275

278-
Visit **[this page](https://video.aminyazdanpanah.com/python/start/clouds?r=save)** to see some examples of saving files to **[Amazon S3](https://aws.amazon.com/s3)**, **[Google Cloud Storage](https://console.cloud.google.com/storage)**, **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**, and a custom cloud.
276+
Visit **[this page](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start/clouds?r=save)** to see some examples of saving files to **[Amazon S3](https://aws.amazon.com/s3)**, **[Google Cloud Storage](https://console.cloud.google.com/storage)**, **[Microsoft Azure Storage](https://azure.microsoft.com/en-us/features/storage-explorer/)**, and a custom cloud.
279277

280278
**NOTE:** This option is only valid for **[VOD](https://en.wikipedia.org/wiki/Video_on_demand)** (it does not support live streaming).
281279

@@ -305,7 +303,7 @@ from ffmpeg_streaming import FFProbe
305303
ffprobe = FFProbe('/var/media/video.mp4')
306304
```
307305

308-
See **[the example](https://video.aminyazdanpanah.com/python/start?r=metadata#metadata)** for more information.
306+
See **[the example](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start?r=metadata#metadata)** for more information.
309307

310308
### Conversion
311309
You can convert your stream to a file or to another stream protocol. You should pass a manifest of the stream to the `input` method:
@@ -314,7 +312,7 @@ You can convert your stream to a file or to another stream protocol. You should
314312
```python
315313
from ffmpeg_streaming import Formats, Bitrate, Representation, Size
316314

317-
video = ffmpeg_streaming.input('https://www.aminyazdanpanah.com/?PATH/TO/HLS-MANIFEST.M3U8')
315+
video = ffmpeg_streaming.input('https://www.hadronepoch.org/?PATH/TO/HLS-MANIFEST.M3U8')
318316

319317
_480p = Representation(Size(854, 480), Bitrate(750 * 1024, 192 * 1024))
320318

@@ -325,7 +323,7 @@ dash.output('/var/media/dash.mpd')
325323

326324
#### 2. DASH To HLS
327325
```python
328-
video = ffmpeg_streaming.input('https://www.aminyazdanpanah.com/?PATH/TO/DASH-MANIFEST.MPD')
326+
video = ffmpeg_streaming.input('https://www.hadronepoch.org/?PATH/TO/DASH-MANIFEST.MPD')
329327

330328
hls = video.hls(Formats.h264())
331329
hls.auto_generate_representations()
@@ -334,7 +332,7 @@ hls.output('/var/media/hls.m3u8')
334332

335333
#### 3. Stream(DASH or HLS) To File
336334
```python
337-
video = ffmpeg_streaming.input('https://www.aminyazdanpanah.com/?PATH/TO/MANIFEST.MPD or M3U8')
335+
video = ffmpeg_streaming.input('https://www.hadronepoch.org/?PATH/TO/MANIFEST.MPD or M3U8')
338336

339337
stream = video.stream2file(Formats.h264())
340338
stream.output('/var/media/new-video.mp4')
@@ -374,7 +372,7 @@ You can use these libraries to play your streams.
374372

375373
## FAQs
376374
**I created stream files and now what should I pass to a player?**
377-
You must pass a **master playlist(manifest) URL**(e.x. `https://www.aminyazdanpanah.com/?"PATH TO STREAM DIRECTORY"/dash-stream.mpd` or `/PATH_TO_STREAM_DIRECTORY/hls-stream.m3u8` ) to a player.
375+
You must pass a **master playlist(manifest) URL**(e.x. `https://www.hadronepoch.org/?"PATH TO STREAM DIRECTORY"/dash-stream.mpd` or `/PATH_TO_STREAM_DIRECTORY/hls-stream.m3u8` ) to a player.
378376
See the demo page of these players for more information(**[hls.js Demo](https://hls-js.netlify.app/demo/)**, **[dash.js Demo](https://reference.dashif.org/dash.js/v3.1.2/samples/dash-if-reference-player/index.html)**, **[videojs Demo](https://videojs.com/advanced?video=elephantsdream)** and etc).
379377

380378
**My player does not show the quality selector button to change the video quality?**
@@ -386,16 +384,28 @@ If you save your stream content to a cloud(i.e. **[Amazon S3](https://aws.amazon
386384
**Does [IOS](https://www.apple.com/ios) support the DASH stream?**
387385
No, IOS does not have native support for DASH. Although there are some libraries such as **[Viblast](https://github.com/Viblast/ios-player-sdk)** and **[MPEGDASH-iOS-Player](https://github.com/MPEGDASHPlayer/MPEGDASH-iOS-Player)** to support this technique, I have never tested them. So maybe some of them will not work properly.
388386

389-
See [this page](https://video.aminyazdanpanah.com/python/start?r=faq#faq) for more FAQs.
387+
See [this page](https://https://www.hadronepoch.org/op/python/ffmpeg-streaming/start?r=faq#faq) for more FAQs.
388+
389+
## Support Us
390+
We greatly appreciate your support in our efforts to contribute to open-source projects. If you're able to, we kindly ask that you take a moment to check out the available options for assisting us. Your help would enable us to maintain our commitment to producing exceptional results. Thank you for your support.
391+
392+
### 1. purchasing a service or product
393+
Our company offers a range of products and services, including video streaming, video-on-demand, video conferencing, and an HR assistance application. If you wish to purchase any of these offerings, kindly direct your inquiries to our email address at **[email protected]**. We will be updating **[our website](https://www.hadronepoch.org)** with further details in the near future.
394+
395+
### 2. sponsoring the project or org
396+
Thank you for considering the option of sponsoring our organization. Your generous donations will greatly assist us in our efforts to enhance and expand our existing libraries, as well as build new ones. There are several options available for sponsorship, including clicking on the **[provided link](https://github.com/sponsors/hadronepoch)** or utilizing alternative methods such as **[crypto](https://hadronepoch.org/support)**, **[Patreon](https://patreon.com/HadronEpoch)**, **[Open Collective](https://opencollective.com/hadronepoch)**, and **[ko-fi](https://ko-fi.com/hadronepoch)**. Your support is greatly appreciated and will help us to continue our mission of providing valuable resources to the community.
390397

398+
### 3. Star and Share
399+
If you find this project to be of value, kindly consider **[starring it](stargazers)** and **sharing it** with those in your network who may benefit from this type of software. Your support would be greatly appreciated and would help to increase visibility and accessibility of this project.
391400

401+
Thank you for your consideration.
392402
## Contributing and Reporting Bugs
393403
I'd love your help in improving, correcting, adding to the specification. Please **[file an issue](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/issues)** or **[submit a pull request](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/pulls)**.
394404
- See **[Contributing File](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/CONTRIBUTING.md)** for more information.
395405
- If you discover a security vulnerability within this package, please see **[SECURITY File](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/SECURITY.md)** for more information.
396406

397407
## Credits
398-
- **[Amin Yazdanpanah](https://www.aminyazdanpanah.com/?u=github.com/aminyazdanpanah/python-ffmpeg-video-streaming)**
408+
- **[Amin Yazdanpanah](https://www.hadronepoch.org/?u=github.com/aminyazdanpanah/python-ffmpeg-video-streaming)**
399409
- **[All Contributors](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/graphs/contributors)**
400410

401411
## License

0 commit comments

Comments
 (0)