Good evening to all.
I have several videos in H264 or H264 in 1080p resolution, I want to convert them to Av1 in 720p resolution without visible quality loss.
To convert these H264 and H265 codecs to Av1 keeping the same resolution, I use the following commands:
If someone has an idea?Code:ffmpeg -i video.mkv -map 0:v:0 -pix_fmt yuv420p10le -f yuv4mpegpipe -strict -1 - | SvtAv1EncApp -i stdin --preset 6 --keyint 240 --input-depth 10 --crf 30 --rc 0 --passes 1 --film-grain 0 -b av1.ivf ffmpeg -i av1.ivf -i video.mkv -map 0:v -map 1:a:0 -c:v copy -c:a copy video.av1.mkv
Thanks.
Ignace.
+ Reply to Thread
Results 1 to 12 of 12
-
-
First of all, 1080p to 720p will result in visual quality loss. Second, encoding with any lossy codec, at any bitrate will result in some quality loss -- maybe not too visible if you if you use enough bitrate. Third, AV1 is interminably slow and it's benefits really only show up at 1080p and above. Fourth, libsvtav1 is included in ffmpeg now so there may be no reason to pipe to an external encoder.
https://www.ffmpeg.org/ffmpeg-all.html#libsvtav1
It doesn't support a lot of options so maybe that's why you're piping.
In the end, unless this is just some experiment, I think you're wasting your time and ruining your videos. -
You can't encode them to a lower resolution without quality lose,if your gonna stick to a 1080p resolution and never upgrade then try your encodes and see if you notice any quality lose.
I think,therefore i am a hamster. -
As johns0 and jagabo have said there will be some quality loss but if you still want to have ffmpeg resize the video then add something like
<code>-vf scale=-1:720</code>
before the -f flag in your example.
see https://trac.ffmpeg.org/wiki/Scaling for details. -
Good evening, Jagabo and johns0.
Okay, so I'll keep my 1080p in 1080p.
As for the interest of the Av1 codec:
Even for resolutions lower than 1080p, there is one big advantage, and that is the file weight.
In 720p I gain 30 to 45% in file size compared to H265.
In DVD format (720 × 576) I gain another 20% in file size compared to H265.
There is only in smaller format (512x280) where I have a loss of 5,5 % in file size compared to H265.
The options available by libsvtav1 in FFmpeg do not allow me to get the result I want, I have either small files, but of mediocre quality or good quality files, but of enormous weight.
By passing the video tracks to SvtAv1EncApp, I get the weight gains I mentioned earlier in this post and the quality of the video tracks is very good.
The conversion time is certainly significant, but given the file weight gains, it overrides the issue of conversion time which for me is not important, as I let the conversion work in the background while I do other things on the computer and at night the conversion does not bother me, as my computer does not make noise even at high loads.
Good evening, zing269.
Sorry, our messages got crossed.
Actually, I know the option:
Code:-vf scale=-1:720
Code:-vf scale=1280:-1
Code:-vf scale=-1:720
The same goes for 1080p, the length of the image resolution must be 1920.
This option is only useful to make 720p when the length of the 1080p video is less than 1920 pixels like TV shows before the switch to 16:9 or old movies.
The question I was asking myself is that as I send the video track to SvtAv1EncApp the option
-vf scale=
option would still work or would I have to use an option in the SvtAv1EncApp command.
I probably explained myself badly in my first message.
I'm going to try converting from 1080p to 720p to see if there is any noticeable deterioration in quality, or if the quality is good enough for me or not, but I wanted to ask before I do anything stupid because I had converted several videos just with FFmpeg before noticing that the image quality was poor.
So I had to start the conversions again with SvtAv1EncApp.
Ignace.Last edited by ignace72; 1st Apr 2022 at 18:36.
-
The only reason you gain size is when you use more bitrate in your encoding,just use the best bitrate for your file type.
I think,therefore i am a hamster. -
You can use clever FFmpeg-GUI.
[Attachment 63987 - Click to enlarge]
Fast encode, if you have an Intel CPU.
Control the image quality with the CRF value (the smaller the better, but also larger file).
Download: https://files.videohelp.com/u/292773/clever_ffmpeg_gui_newest_beta.7z -
Hello, ProWo.
Thanks, I'll try this later this afternoon, as I have a conversion in progress and need to get out.
Ignace. -
So you converted an h265 video to av1 at crf 30 and got a 45 percent smaller file? That doesn't mean av1 is 45 percent more efficient than h265. Using crf 30 was just a random choice that happened to reduce that source to a 45 percent smaller file. How do you know that reencoding the same video with x265 couldn't do the same quality at the same size? Note that crf values between different encoders don't necessarily correspond to each other. A crf 30 encoding with x265 and svtav1 don't necessarily deliver the same size or or same quality. It's really just an arbitrary number.
-
Good evening, jagabo.
All the reading I've done says that the Av1 performs better than the H265.
Here is a page that summarizes everything I have read on the subject.
https://www.winxdvd.com/convert-hevc-video/av1-vs-hevc.htm
After that, I don't force anyone to believe me and it doesn't matter to me.
I say what I think. That's all.
On the other hand, nothing you all have told me contradicts me.
I simply notice that with the same visual quality, Av1 files are less heavy than H265 ones.
This is just an observation but it is not the subject of the thread I opened.
I asked a question, I got an answer.
That is enough for me.
After that, if you want to debate whether so-and-so is better, worse or the same as so-and-so, I'm not interested.
Ignace. -
Of course av1 can compress better than hevc. My point was that the way you appeared to have measured the difference made no sense.
Support for av1 is nonexistent outside a computer. So hope you don't try to watch on anything else anytime soon. -
Good evening to all.
I tried clever FFmpeg-GUI but I don't like it, in fact I prefer the command line.
The poor support of the Av1 doesn't bother me because I only use my computer and I don't have a TV.
I finally tested the conversion of a 1080p to 720p video track from an H264 format to Av1 by adding to my conversion command:
Code:-vf scale=1280:-1
The quality of this video track is very good.
So, I will convert my other videos from 1080p to H265 or H264 to 720p to Av1.
Ignace.Last edited by ignace72; 1st Apr 2022 at 18:40.
Similar Threads
-
What parameters to use to convert videos to av1 with SVT-AV1 with FFmpeg
By ignace72 in forum Video ConversionReplies: 4Last Post: 19th Mar 2022, 08:52 -
How can i recompress from H264 to H265 with no quality loss in FFMPEG?
By Unknown01 in forum Newbie / General discussionsReplies: 4Last Post: 13th Nov 2021, 17:07 -
Best FFmpeg command for downscaling h264 video from 2160p 1080p?
By jorax68528 in forum Video ConversionReplies: 3Last Post: 12th May 2020, 18:52 -
Burning 1080p & 720p H264 To Blu Ray Using MultiAVCHD
By citycentrefox in forum Newbie / General discussionsReplies: 0Last Post: 5th Jul 2019, 19:49 -
Convert to HEVC .h265 to preserve quality and reduce file size.
By GiovannyLira in forum MacReplies: 8Last Post: 13th Dec 2017, 12:43