Author Topic: Need Encoding Help...  (Read 3779 times)

Offline Tiffanys

  • Member
  • Posts: 7756
  • real female girl ojō-sama
Need Encoding Help...
« on: October 28, 2010, 06:24:13 PM »
I need some help with encoding... I've been either using in-game video captures or fraps to get videos and then running them through H.264 Encoder as 720p to lower their size. The general purpose is to retain good quality while significantly lowering the file size to a more realistic level. Something 7 minutes long in 720p shouldn't be 500MB.

This is where I am failing. I've tried the above mentioned program and Handbrake (maybe I don't know how to use Handbrake properly) and I've had horrendous results. Handbrake can't even encode for some reason most the time, it just crashes, and it's always horrid quality no matter the settings. The H.264 Encoder is more reliable it seems, but it does crap quality and way higher file sizes than necessary.

All I want to do is upload clips from animes/movies or recordings from games in either 420p or 720p to YouTube at good quality but decent file size.

I know it has to just be me, because I've seen a ton of stuff in 420p that's crystal clear, and 720p too (and good file sizes). It just seems crappy that the stuff I try to do results in a really pixelated blurry mess.

I'm obviously not very good at encoding. So, if you could just tell me what program and its settings to use, I'd really appreciate it... T.T

Offline rostheferret

  • Member
  • Posts: 1584
Re: Need Encoding Help...
« Reply #1 on: October 28, 2010, 06:48:31 PM »
I find handbrake slow and clunky, get AviDemux instead.

Open up the file, under the Video toggle set it to the MPEG-4 AVC codec (x264), apply any filters you want (if it's an interlaced source, you might want to run it through a yadif de-interlacer; if it needs cropping you can set that, noisy run the noise filter, change the aspect ratio, etc, etc, etc). Then under configure you have the options for encoding style. If you have a set size in mind, then two a two pass by size. Otherwise do a two pass by average bitrate (high quality encoded films from a DVD usually end up between 1400 and 1500kbps, as a ballpark figure to start playing around with). The only thing I'd bear in mind with the two pass-size setting is that the size only applies to the video, the audio gets lumbered on top of that.

Don't forget to change the format and you have to specify that you want to save it as .mkv for some odd reason.

Offline Tiffanys

  • Member
  • Posts: 7756
  • real female girl ojō-sama
Re: Need Encoding Help...
« Reply #2 on: October 28, 2010, 06:58:29 PM »
edit: Found where to download it... messing with it now... thanks

edit: Still getting super crappy results.... could you maybe give me some settings that generally produce good results?
« Last Edit: October 28, 2010, 08:51:33 PM by Tiffanys »

Offline Temuthril

  • Member
  • Posts: 1140
Re: Need Encoding Help...
« Reply #3 on: October 28, 2010, 10:10:32 PM »
Give a screenshot of the settings.

Does whatever you use allow you to specify the command line used?

Offline arcsear

  • Member
  • Posts: 3
Re: Need Encoding Help...
« Reply #4 on: October 28, 2010, 10:26:24 PM »
had same problems with handbrake 0.9.4 crashing on encodes changed to HandBrake-svn3154-Win_GUI encodes worked great once settings were tweaked

this is using constant quality and default video filters file comes out less than half original size with little to no noticable quality loss hope it helps
« Last Edit: October 29, 2010, 12:44:03 AM by arcsear »

Offline Tiffanys

  • Member
  • Posts: 7756
  • real female girl ojō-sama
Re: Need Encoding Help...
« Reply #5 on: October 28, 2010, 11:32:53 PM »
It doesn't matter what settings I used because I changed them many times and they never produced good results. I'm going to need someone else to give me good settings for something.

Offline Takeshi

  • Member
  • Posts: 5119
  • Animation whore
Re: Need Encoding Help...
« Reply #6 on: October 28, 2010, 11:38:46 PM »
Well, tried meGUI and avisynth? Good tools for newbs.

Offline NaRu

  • Member
  • Posts: 15225
Re: Need Encoding Help...
« Reply #7 on: October 29, 2010, 07:12:28 AM »
Try AVS Video converter 6. Its what I use to convert Fraps raw videos

Offline rostheferret

  • Member
  • Posts: 1584
Re: Need Encoding Help...
« Reply #8 on: October 29, 2010, 08:29:53 AM »
Quote from: handbrake
ref=6:mixed-refs=1:b-adapt=2:bframes=6:weightb=1:direct=auto:me=umh:subq=9:analyse=all:8x8dct=1:trellis=2:no-fast-pskip=1:psy-rd=1,0:merange=24:deblock=-2,-2:rc-lookahead=50:aq-strength=1.2:b-pyramid=1

Under "Video Filters:"
Detelecine: Default
Decomb: Default
Deinterlace: Off
Denoise: Weak (though for anime, I'd probably just turn it off, it won't be needed)

Under "Video:"
Framerate: Same as Source
Two Pass Encoding {ON}
Average Bitrate: 1500KBps (Or, you can try "constant quality," set it to ~20, though it shouldn't make much of a difference)


These are the settings I use for handbrake, but are optimised for live sources and not animé, though it should still work pretty well. You can copy and paste that long string into the advanced window to replicate the advanced settings.

Offline Temuthril

  • Member
  • Posts: 1140
Re: Need Encoding Help...
« Reply #9 on: October 29, 2010, 08:54:16 AM »
It doesn't matter what settings I used because I changed them many times and they never produced good results. I'm going to need someone else to give me good settings for something.
Try this:
Code: [Select]
b-adapt=2:rc-lookahead=60:bframes=8:ref=6:trellis=2:no-fast-pskip=1:me=umh:merange=24:subq=9:b-pyramid=1:direct=auto:analyse=all

Also set constant quality from the video tab to 16-18. Lower number = bigger filesize and better quality.
« Last Edit: October 29, 2010, 08:56:27 AM by Temuthril »

Offline vuzedome

  • Member
  • Posts: 6376
  • Reppuzan~!
  • Awards Winner of the BakaBT Mahjong tournament 2010
    • GoGreenToday
Re: Need Encoding Help...
« Reply #10 on: October 29, 2010, 09:00:28 AM »
Well, tried meGUI and avisynth? Good tools for newbs.
There's a wiki for its usage linked from the sourceforge webpage, and just throw AVC level 4.1 and CRF=18 at the H264 settings and you're good to go.
BBT Ika Musume Fan Club Member #000044   
Misaka Mikoto Fan Club Member #000044
BBT Duke Nukem Fan Club Member #0000002

Offline rostheferret

  • Member
  • Posts: 1584
Re: Need Encoding Help...
« Reply #11 on: October 29, 2010, 09:18:31 AM »
It doesn't matter what settings I used because I changed them many times and they never produced good results. I'm going to need someone else to give me good settings for something.
Try this:
Code: [Select]
b-adapt=2:rc-lookahead=60:bframes=8:ref=6:trellis=2:no-fast-pskip=1:me=umh:merange=24:subq=9:b-pyramid=1:direct=auto:analyse=all

Also set constant quality from the video tab to 16-18. Lower number = bigger filesize and better quality.

I'd suggest the higher end of that scale; around about the 16-17 mark it actually makes most files larger trying to preserve every tiny detail.

Offline Tiffanys

  • Member
  • Posts: 7756
  • real female girl ojō-sama
Re: Need Encoding Help...
« Reply #12 on: October 29, 2010, 10:07:06 PM »
What about for changing the picture size from 1080p to 720p or 480p? What settings on that?

Offline Temuthril

  • Member
  • Posts: 1140
Re: Need Encoding Help...
« Reply #13 on: October 29, 2010, 10:53:27 PM »
What about for changing the picture size from 1080p to 720p or 480p? What settings on that?
http://roksbox.wikispaces.com/file/view/HandBrake1.jpg/120734325/HandBrake1.jpg
Width/height?

Offline Tiffanys

  • Member
  • Posts: 7756
  • real female girl ojō-sama
Re: Need Encoding Help...
« Reply #14 on: October 29, 2010, 11:46:56 PM »
No, I mean which Anamorphic settings...

By the way, those settings you gave me were the worst results yet...

Quote
ref=6:mixed-refs=1:b-adapt=2:bframes=6:weightb=1:direct=auto:me=umh:subq=9:analyse=all:8x8dct=1:trellis=2:no-fast-pskip=1:psy-rd=1,0:merange=24:deblock=-2,-2:rc-lookahead=50:aq-strength=1.2:b-pyramid=1

Huge artifacts all over everything, pretty much unwatchable.



Compare with the original:


Here's all my settings:





And here's the info from the original...

2010_10_28_0000.avi
Type: KMP - Windows Movie File
Size: 3696MB
Media length: 00:07:32
Video size: 1920 x 1080
Video: MPEG 1920x1080 30.00fps 68287Kbps [Video 0]
Audio: MPEG Audio 48000Hz stereo 192Kbps [Audio 1]

I also can't do 2 pass with constant quality btw... it's grayed out.
« Last Edit: October 29, 2010, 11:50:02 PM by Tiffanys »

Offline arcsear

  • Member
  • Posts: 3
Re: Need Encoding Help...
« Reply #15 on: October 30, 2010, 12:19:17 AM »
See your problem click large file size and run an encode using it Might not get file size u want but if file comes out larger than u want try using it with specific file size and two pass encoding

Offline temuchin

  • Member
  • Posts: 759
  • Veni, vidi, vici.
Re: Need Encoding Help...
« Reply #16 on: October 30, 2010, 02:23:45 AM »
lol; handbrake looks totally different on windoze.

what kind of processor are you running?  i don't think a core2duo can handle 1080p rips.

anyway go to settings and paste in this basic anime string and then hit enter:

./HandBrakeCLI -i DVD -o ~/Movies/movie.mkv  -e x264 -b 1000 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mkv --detelecine --decomb -p -m -2 -T -x ref=5:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:analyse=all:8x8dct=1:trellis=1:nr=150:no-fast-pskip=1:deblock=1,1:psy-rd=1,1:subq=9

of course you cannot do 2x pass on a CRF setting. i.e its one or the other.   2x pass can only occur on a fixed bit-rate setting.  just make it simple and set the CRF to 16 or 17.   lower number equates to better quality.

also for the filters - just stick to DETECLINE (default) set all others to OFF.  set frame rate to 23.976.  container should be MKV.

otherwise you need to try Avisynth/MeGui.
« Last Edit: October 30, 2010, 03:03:44 AM by temuchin »
"Death is certain. Time is uncertain."

Offline rostheferret

  • Member
  • Posts: 1584
Re: Need Encoding Help...
« Reply #17 on: October 30, 2010, 02:31:33 AM »
what kind of processor are you running?  i don't think a core2duo can handle 1080p rips

It shouldn't matter, the processor speed will only determine the time it takes to encode rather than what it can encode. In practice though, I wouldn't say it was impossible for the pc to just go "fuck that" and crash :P

Offline temuchin

  • Member
  • Posts: 759
  • Veni, vidi, vici.
Re: Need Encoding Help...
« Reply #18 on: October 30, 2010, 03:02:32 AM »
^^  if she is running tons of stuff- yes i can see any encoding program crashing.
also a 1080p rip will take some time to complete.   try it when you're sleeping.

this is really quad-core territory.
"Death is certain. Time is uncertain."

Offline arcsear

  • Member
  • Posts: 3
Re: Need Encoding Help...
« Reply #19 on: October 30, 2010, 03:06:49 AM »
Handbrake would crash on my hex core system until I used what was dubbed as there snapshot version