using x264 or x265 for convert result bad video

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
-neco-
New Cone
New Cone
Posts: 7
Joined: 02 Mar 2020 14:00

using x264 or x265 for convert result bad video

Postby -neco- » 05 Apr 2020 18:08

I have general troubles with converting various videos to mp4 with x264 and x265 with VLC. Firstly, I resseted to default setting and test again. I use most recent VLC v3.0.8 x64 on win 10.
Videos from various devices (eg. Samsung Galaxy S8, Sony DSC RX100M3,…) are far far from optimal and obviously too big size for its quality!! They must be reconverted.

VLC is simple enough for everyone, good for this task, but I thing there are bugs present. I‘m little bit inexperienced, so let someone try the same and confirm what I‘m saying. I left all default settings. (test clip from my camera, 2 min, 186 MB, 1440 x 1080 [this is Sony Full HD 1080p 16:9 ratio])

[url=http://shrani.si/?3h/g9/2UuPVNa0/reset-vlc.jpg]Image[/url]
Image
Image


1. converting with x264: Outcomming video seems to be all right. Allmost perfect, but I think the file size 59 Mb is too big.
For comparison, Handbrake (open source software) manage the same video (quality factor RF 30, no filters, just converting) it with filesize about 30 Mb.
2. convertig with x265: Outcomming video is scrap. Doesn‘t play smooth with any player I have tried. File size is great only 24 Mb.
Off course I have tried also with software Handbrake (quality factor RF 30, no filters, just converting). It gave a file of 25 Mb and video is ok.

So I‘m pretty sure, that VLC have problems with converting videos. Is this a thing for bug report?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: using x264 or x265 for convert result bad video

Postby mederi » 07 Apr 2020 18:36

You can edit/create a transcoding profile, the video codec tab:
Codec [H-264]
Bitrate [Not used]
Quality [Not used]
Then you will get the default method crf=23. I recommend following options in the last input field:
Custom options [profile=main,level=3,preset=medium,crf=23]

https://forum.videolan.org/viewtopic.php?f=2&t=151281#p497194

-neco-
New Cone
New Cone
Posts: 7
Joined: 02 Mar 2020 14:00

Re: using x264 or x265 for convert result bad video

Postby -neco- » 08 Apr 2020 21:01

Thank you for advice, mederi.
How ever, with this additional input to field Custom options [profile=main,level=3,preset=medium,crf=23] give me the seme result. Video compressed with h264 is the same size as using the default settings (default profile - Video - H.264 + MP3 (MP4)). I'll search for additional help for this suggested parameters in field Custom option.

What's about x265 ? There is obviously something wrong with converted video! Wrong default settings or bug? Please let someone try to convert a random video and give a feedback.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: using x264 or x265 for convert result bad video

Postby mederi » 10 Apr 2020 14:21

If you check the "Video - H.264 + MP3 (MP4)" profile, the video tab contains "Not used" + "Not used" values that result in default method crf=23. You can increase the value of "crf" option in the "Custom options" field. Higher value means lower file size/quality. You can resize video to get a smaller file size. Then you can check source/target audio compression (mono/stereo?).

-neco-
New Cone
New Cone
Posts: 7
Joined: 02 Mar 2020 14:00

Re: using x264 or x265 for convert result bad video

Postby -neco- » 12 Apr 2020 21:46

Thaks again, mederi. You saved me a lot of time and now I better understand Custom options [profile=main,level=3,preset=medium,crf=23].
My conclusion. It maybe make sense to change preset=slow to keep same qualitay at bit smaler file size. The biggest impact to filesize has crf. For average home user which posess low or mid range device for recording, the crf may be some higher number eg. crf=26.
For explanation I'll paste few links, if maybe somebody else need aditional help.
https://en.wikipedia.org/wiki/Advanced_Video_Coding
https://trac.ffmpeg.org/wiki/Encode/H.264


I have no clue why I get bad video if I convert any video using all default settings and choose x265 (see printscreen from my first post). Default settings have to be good. Is there simply a bug?
Woul'd you like to try convert a random short video for test, mederi? I have no idea what i could do wrong. Media Players (including VLC) don't play this videos smooth.
For proove I convert same with Handbrake, choosing x265. Those videos are good, playback well.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: using x264 or x265 for convert result bad video

Postby mederi » 13 Apr 2020 17:06

I am sorry, the H.265 encoder does not work on my system. The conversion is fast but there is only audio track in output file. Avidemux (2.7.4 win32) can convert to HEVC (x265) in mkv container, fails in mp4.
main debug: adding a new sout input for `h264` (sout_input: 04acd950)
stream_out_transcode debug: creating video transcoding from fcc=`h264' to fcc=`hevc'
main debug: looking for video decoder module matching "any": 19 candidates
main debug: Buffering 27%
avcodec debug: using ffmpeg Lavc58.6.103
main debug: Buffering 41%
avcodec debug: CPU flags: 0x040010db
main debug: Buffering 49%
main debug: Buffering 55%
main debug: Buffering 69%
main debug: Buffering 83%
main debug: Buffering 97%
main debug: Stream buffering done (320 ms in 5 ms)
avcodec debug: allowing 3 thread(s) for decoding
avcodec debug: codec (h264) started
avcodec debug: using frame thread mode with 3 threads
main debug: using video decoder module "avcodec"
main debug: looking for encoder module matching "any": 23 candidates
avcodec debug: using ffmpeg Lavc58.6.103
avcodec debug: CPU flags: 0x040010db
avcodec error: cannot find encoder MPEG-H Part2/HEVC (H.265) *** Your Libav/FFmpeg installation is crippled. *** *** Please check with your Libav/FFmpeg packager. *** *** This is NOT a VLC media player issue. ***
main debug: no encoder modules matched
stream_out_transcode error: cannot find video encoder (module:any fourcc:hevc). Take a look few lines earlier to see possible reason.
main debug: removing module "avcodec"
stream_out_transcode error: cannot create video chain
main warning: new sout input failed (sout_input: 04acd950)
main error: cannot create packetizer output (h264)
main error: buffer deadlock prevented
main debug: Decoder wait done in 73 ms


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 29 guests