Skip to content

Commit 1c4c717

Browse files
bug fixes
1 parent 9e94c53 commit 1c4c717

14 files changed

Lines changed: 35 additions & 32 deletions

File tree

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This package uses the **[FFmpeg](https://ffmpeg.org)** to package media content
1717
- [HLS](#hls)
1818
- [Encrypted HLS](#encrypted-hls)
1919
- [Progress](#progress)
20-
- [Probe](#probe)
2120
- [Saving Files](#saving-files)
21+
- [Probe](#probe)
2222
- [Several Open Source Players](#several-open-source-players)
2323
- [Contributing and Reporting Bugs](#contributing-and-reporting-bugs)
2424
- [Credits](#credits)
@@ -48,7 +48,7 @@ video = '/var/www/media/videos/test.mp4'
4848
#### 2. From Clouds
4949
You can open a file from a cloud by passing a tuple of cloud configuration to the method. There are some options to open a file from **[Amazon Web Services (AWS)](https://aws.amazon.com/)**, **[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.
5050

51-
Please **[visit the 'open a file from a cloud' page](https://video.aminyazdanpanah.com/python/start/open-clouds)** to see more examples and usage of these clouds.
51+
Please visit **[this page](https://video.aminyazdanpanah.com/python/start/open-clouds)** to see more examples and usage of these clouds.
5252
```python
5353
video = (google_cloud, download_options, None)
5454
```
@@ -156,7 +156,7 @@ You can get realtime information about transcoding by passing callable methods t
156156
import sys
157157
import ffmpeg_streaming
158158

159-
def progress(percentage, ffmpeg, media):
159+
def progress(percentage, ffmpeg):
160160
# You can update a field in your database
161161
# You can also create a socket connection and show a progress bar to users
162162
sys.stdout.write("\r Transcoding... (%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))
@@ -174,16 +174,6 @@ def progress(percentage, ffmpeg, media):
174174
Output of the progress:
175175
![progress](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/docs/progress.gif?raw=true "progress" )
176176

177-
### Probe
178-
You can extract the metadata of video file using the following code:
179-
```python
180-
from ffmpeg_streaming import FFProbe
181-
182-
ffprobe = FFProbe('/var/www/media/test.mp4')
183-
```
184-
**NOTE:** You can save these metadata to your database.
185-
186-
See the **[example](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/examples/probe.py)** for more information.
187177
### Saving Files
188178
There are several options to save your files.
189179

@@ -213,7 +203,7 @@ It can also be null. The default path to save files is the input path.
213203
#### 2. To Clouds
214204
You can save your files to clouds by passing a array of cloud configuration to the `package` method. There are some options to save files to **[Amazon Web Services (AWS)](https://aws.amazon.com/)**, **[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.
215205

216-
Please **[visit the 'save files to clouds' page](https://video.aminyazdanpanah.com/python/start/save-clouds)** to see more examples and usage of these clouds.
206+
Please visit **[this page](https://video.aminyazdanpanah.com/python/start/save-clouds)** to see more examples and usage of these clouds.
217207
```python
218208
(
219209
ffmpeg_streaming
@@ -235,6 +225,21 @@ A path can also be passed to save a copy of files on your local machine.
235225
progress=progress)
236226
)
237227
```
228+
**NOTE:** You can open a file from your local machine(or a cloud) and save files to a local path or a cloud(or multiple clouds) or both.
229+
230+
<p align="center"><img src="https://github.com/aminyazdanpanah/aminyazdanpanah.github.io/blob/master/video-streaming/video-streaming.gif?raw=true" width="100%"></p>
231+
232+
### Probe
233+
You can extract the metadata of video file using the following code:
234+
```python
235+
from ffmpeg_streaming import FFProbe
236+
237+
ffprobe = FFProbe('/var/www/media/test.mp4')
238+
```
239+
**NOTE:** You can save these metadata to your database.
240+
241+
See the **[example](https://github.com/aminyazdanpanah/python-ffmpeg-video-streaming/blob/master/examples/probe.py)** for more information.
242+
238243
## Several Open Source Players
239244
You can use these libraries to play your streams.
240245
- **WEB**

examples/clouds/aws_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def aws_cloud(bucket_name, key):
3434
return from_aws_cloud, to_aws_cloud
3535

3636

37-
def transcode_progress(percentage, ffmpeg, media):
37+
def transcode_progress(percentage, ffmpeg):
3838
# You can update a field in your database
3939
# You can also create a socket connection and show a progress bar to users
4040
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/clouds/azure_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def azure_cloud(container, blob):
3535
return from_azure_cloud, to_azure_cloud
3636

3737

38-
def transcode_progress(percentage, ffmpeg, media):
38+
def transcode_progress(percentage, ffmpeg):
3939
# You can update a field in your database
4040
# You can also create a socket connection and show a progress bar to users
4141
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/clouds/cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def download_progress(percentage, downloaded, total):
2424
sys.stdout.flush()
2525

2626

27-
def transcode_progress(percentage, ffmpeg, media):
27+
def transcode_progress(percentage, ffmpeg):
2828
# You can update a field in your database
2929
# You can also create a socket connection and show a progress bar to users
3030
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/clouds/custom_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def custom_cloud():
4444
return from_custom_cloud, to_custom_cloud
4545

4646

47-
def transcode_progress(percentage, ffmpeg, media):
47+
def transcode_progress(percentage, ffmpeg):
4848
# You can update a field in your database
4949
# You can also create a socket connection and show a progress bar to users
5050
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/clouds/google_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def google_cloud(bucket_name, object_name):
3333
return from_google_cloud, to_google_cloud
3434

3535

36-
def transcode_progress(percentage, ffmpeg, media):
36+
def transcode_progress(percentage, ffmpeg):
3737
# You can update a field in your database
3838
# You can also create a socket connection and show a progress bar to users
3939
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/clouds/moultiple_clouds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from examples.clouds.google_cloud import google_cloud
2020

2121

22-
def transcode_progress(percentage, ffmpeg, media):
22+
def transcode_progress(percentage, ffmpeg):
2323
# You can update a field in your database
2424
# You can also create a socket connection and show a progress bar to users
2525
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/dash/dash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import ffmpeg_streaming
1717

1818

19-
def transcode_progress(percentage, ffmpeg, media):
19+
def transcode_progress(percentage, ffmpeg):
2020
# You can update a field in your database
2121
# You can also create a socket connection and show a progress bar to users
2222
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/dash/dash_manual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ffmpeg_streaming import Representation
1919

2020

21-
def transcode_progress(percentage, ffmpeg, media):
21+
def transcode_progress(percentage, ffmpeg):
2222
# You can update a field in your database
2323
# You can also create a socket connection and show a progress bar to users
2424
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

examples/hls/hls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import ffmpeg_streaming
1717

1818

19-
def transcode_progress(percentage, ffmpeg, media):
19+
def transcode_progress(percentage, ffmpeg):
2020
# You can update a field in your database
2121
# You can also create a socket connection and show a progress bar to users
2222
sys.stdout.write("\rTranscoding...(%s%%)[%s%s]" % (percentage, '#' * percentage, '-' * (100 - percentage)))

0 commit comments

Comments
 (0)