Skip to content

Commit

Permalink
docs: Added README."en".md translation via https://github.com/dephrai…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 31, 2023
1 parent 5e6cf11 commit 1bbe84f
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,35 @@

<div align=center><img src="doc/player.jpeg"></div>

### Need a powerful opengl and vulkan yuv rendering module!
### A powerful opengl and vulkan yuv rendering module is needed!

1. There are too many if else in the shader in Opengl, causing the GPU to run empty, affecting GPU decoding and av_hwframe_transfer_data speed, this phenomenon is especially obvious on 4K video images;
2. In WidgetRender, use QImage::Format_RGB32 and QImage::Format_ARGB32_Premultiplied image formats as much as possible. The following reasons:
1. There are too many if elses in the shader in Opengl, causing the GPU to run dry, affecting the speed of GPU decoding and av_hwframe_transfer_data. This phenomenon is particularly obvious on 4K video images;
2. In WidgetRender, use the QImage::Format_RGB32 and QImage::Format_ARGB32_Premultiplied image formats whenever possible. The following reasons:
1. Avoid most rendering directly to most of these formats using QPainter. Rendering is best optimized to the Format_RGB32 and Format_ARGB32_Premultiplied formats, and secondarily for rendering to the Format_RGB16, Format_RGBX8888, Format_RGBA8888_Premultiplied, Format_RGBX64 and Format_RGBA64_Premultiplied formats.

### Ffmpeg (5.0) is not the same as 4.4.3 in decoding subtitles
### How does OpenGL render images in the BT.2020 color space?

### Decoding subtitles (ffmpeg-n5.0):
Now adjust the contrast, saturation, brightness; the effect is not very good.

```cpp
contrast = 1.6;
saturation = 1.0;
brightness = 0;
```

If you don't adjust it, it will have the same effect as the ffplay output image, and the overall color will be darker. For Netflix videos, the N at the beginning of the video is displayed in a darker yellow color.

### How to achieve image quality enhancement when rendering images with OpenGL?

### Ffmpeg (5.0) decodes subtitles differently from 4.4.3

#### Decode subtitles (ffmpeg-n5.0):

0,,en,,0000,0000,0000,,Peek-a-boo!

you must use`ass_process_chunk`And set pts and duration as in libavfilter/vf_subtitles.c.
you have to use`ass_process_chunk`and set pts and duration as in libavfilter/vf_subtitles.c.

ASS standard format should be (ffmpeg-n4.4.3):
#### The ASS standard format should be (ffmpeg-n4.4.3):

Dialogue: 0,0:01:06.77,0:01:08.00,en,,0000,0000,0000,,Peek-a-boo!\r\n

Expand All @@ -35,8 +49,8 @@ use`ass_process_data`;

How to set encoding parameters to get smaller files and better video quality?

1. set a very high bitrate;
2. set encoder`global_quality`invalid. code show as below:
1. Set a very high bitrate;
2. Set up the encoder`global_quality`invalid. code show as below:

```C++
d_ptr->codecCtx->flags |= AV_CODEC_FLAG_QSCALE;
Expand All @@ -48,7 +62,7 @@ How to set encoding parameters to get smaller files and better video quality?
av_opt_set_int(d_ptr->codecCtx, "crf", crf, AV_OPT_SEARCH_CHILDREN);
```

### How to calculate pts from frames acquired by AVAudioFifo?
### How to calculate pts from frames obtained by AVAudioFifo?

```C++
// fix me?
Expand All @@ -57,9 +71,9 @@ frame->pts = transcodeCtx->audioPts / av_q2d(transcodeCtx->decContextInfoPtr->ti
transcodeCtx->audioPts += frame->nb_samples;
```

### [New BING's Video Transcoding Recommendations](./doc/bing_transcode.md)
### [New BING’s video transcoding recommendations](./doc/bing_transcode.md)

## SwsContext is great! Compared to QImage converted to and scaled.
## SwsContext is great! Compare to QImage conversion to and scaling.

## QT-BUG

Expand All @@ -71,9 +85,9 @@ transcodeCtx->audioPts += frame->nb_samples;

<https://stackoverflow.com/questions/74500509/failed-to-setup-resampler-when-starting-qaudiosink>

#### Dynamically switch Video Render, switch from opengl to widget, there is still GPU 0-3D occupation, and the usage is twice that of opengl! ! ! QT-BUG?
#### Dynamically switching Video Render, switching from opengl to widget, still consumes GPU 0-3D, and the usage is twice that of opengl! ! ! QT-BUG?

### QOpenGLWidget memory leak, moving zoom in and out of the window, the code is as follows:
### QOpenGLWidget memory leaks, moves the zoom in and out window, the code is as follows:

```C++
int main(int argc, char *argv[])
Expand Down

0 comments on commit 1bbe84f

Please sign in to comment.