8000 Add syntax highlighting to README.md · Powercoder64/ffmpeg-python@e709840 · GitHub
[go: up one dir, main page]

Skip to content

Commit e709840

Browse files
committed
Add syntax highlighting to README.md
1 parent d59bb7a commit e709840

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ There are tons of Python FFmpeg wrappers out there but they seem to lack complex
1212
## Quickstart
1313

1414
Flip a video horizontally:
15-
```
15+
```python
1616
import ffmpeg
1717
stream = ffmpeg.input('input.mp4')
1818
stream = ffmpeg.hflip(stream)
@@ -21,7 +21,7 @@ ffmpeg.run(stream)
2121
```
2222

2323
Or if you prefer a fluent interface:
24-
```
24+
```python
2525
import ffmpeg
2626
(ffmpeg
2727
.input('input.mp4')
@@ -39,7 +39,7 @@ Take for example a signal graph that looks like this:
3939
![Signal graph](https://raw.githubusercontent.com/kkroening/ffmpeg-python/master/doc/graph1.png)
4040

4141
The corresponding command-line arguments are pretty gnarly:
42-
```
42+
```bash
4343
ffmpeg -i input.mp4 \
4444
-filter_complex "\
4545
[0]trim=start_frame=10:end_frame=20[v0];\
@@ -54,7 +54,7 @@ ffmpeg -i input.mp4 \
5454
Maybe this looks great to you, but if you're not an FFmpeg command-line expert, it probably looks alien.
5555

5656
If you're like me and find Python to be powerful and readable, it's easy with `ffmpeg-python`:
57-
```
57+
```python
5858
import ffmpeg
5959

6060
in_file = ffmpeg.input('input.mp4')
@@ -87,7 +87,7 @@ pip install ffmpeg-python
8787
```
8888

8989
It's also possible to clone the source and put it on your python path (`$PYTHONPATH`, `sys.path`, etc.):
90-
```
90+
```bash
9191
$ git clone git@github.com:kkroening/ffmpeg-python.git
9292
$ export PYTHONPATH=${PYTHONPATH}:ffmpeg-python
9393
$ python
@@ -99,23 +99,23 @@ $ python
9999
API documentation is automatically generated from python docstrings and hosted on github pages: https://kkroening.github.io/ffmpeg-python/
100100

101101
Alternatively, standard python help is available, such as at the python REPL prompt as follows:
102-
```
102+
```python
103103
>>> import ffmpeg
104104
>>> help(ffmpeg)
105105
```
106106

107107
## Custom Filters
108108

109109
Don't see the filter you're looking for? `ffmpeg-python` is a work in progress, but it's easy to use any arbitrary ffmpeg filter:
110-
```
110+
```python
111111
stream = ffmpeg.input('dummy.mp4')
112112
stream = ffmpeg.filter_(stream, 'fps', fps=25, round='up')
113113
stream = ffmpeg.output(stream, 'dummy2.mp4')
114114
ffmpeg.run(stream)
115115
```
116116

117117
Or fluently:
118-
```
118+
```python
119119
(ffmpeg
120120
.input('dummy.mp4')
121121
.filter_('fps', fps=25, round='up')

0 commit comments

Comments
 (0)
0