Good visual quality in sdl2 consumer and bad visual quality in avformat consumer #1029
Replies: 2 comments
-
I don't know the specific problem causing the quality loss. But I can offer some advice that might help:
|
Beta Was this translation helpful? Give feedback.
-
After some investigation, I summarized the differences I encountered as below:
After fixing these two (the second one requires recompile), the visual effects doesn't seem to be significant blur. By the way, I notice mlt/src/modules/core/transition_composite.c Line 348 in 70b3ce1 What I meant to describe is that if you use melt -track color:blue out=100 -track -qtext "+Hello world.txt" out=100 -transition composite geometry="0/1:300x300" out=100 -consumer avformat:hellow1.mp4 melt -track color:blue out=100 -track -qtext "+Hello world.txt" out=100 -transition composite geometry="1/1:300x300" out=100 -consumer avformat:hellow2.mp4 See visual difference between 2 result videos. hellow2.mp4hellow1.mp4 |
Beta Was this translation helpful? Give feedback.
-
This tracker is for defects only! For feature requests, you can submit a pull
request with the changes.
If you’re reporting a defect, make it as detailed as possible, and include both your operating system and MLT versions (e.g.
Windows10; MLT v7.25.0
).Windows10; MLT v7.25.0
I encounter a simple use case which is just like below melt command:
video.mp4
is with 1080x1920 (portrait screen suitable for mobile phone).The thing is visual content is clear, including the video-in-video compared to the original
video.mp4
.But when I need to save it to
output.mp4
it shows with obviously poor visual quality especially for the video-in-video compared to the originalvideo.mp4
.I tried it using ffmpeg command like below:
ffmpeg -i background.jpg -i video.mp4 -filter_complex "[1:v]scale=-1:1080[ovr];[0:v][ovr]overlay=500:10" -b:v 1500K -r 25 output2.mp4
The
output2.mp4
has similar quality compared to sdl2 preview, which is also better thanoutput1.mp4
So I attempt with
vb
property.The
output3.mp4
's file size is greater thanoutput2.mp4
, but with almost no difference in visual quality.I assume sdl2 render the visual quality well, just like image show for each frame, maybe the issue comes along the encoding process of avformat?
I've also checked the png image sequence output, the png file is still in poor visual quality.
Any idea how to investigate more? Can I save each output frame (in ram) to lossless image file to verify my guess?
Beta Was this translation helpful? Give feedback.
All reactions