Log in

View Full Version : Replicate x264 encoding settings


ricardo.santos
2nd October 2010, 16:21
hi everyone

i'm uploading some personnal holiday videos to a video sharing site in my country, it was easy to bypass the server video conversion as it didnt convert flv videos but it just started to reconvert videos to mp4 (h264+aac lc) and ive been unable to replicate what i did (bypass video conversion), ive uploaded a video and downloaded it to try to replicate settings and hoppefully upload a video that doesnt get reconverted.


Can anyone help me replicate these settings with x264? ive tried a few guis but i cant change some settings as im unable to find all options in the gui.

This is what mediainfo says about the file:

General

Format : MPEG-4
Format profile : Base Media
Codec ID : isom
Overall bit rate : 648 Kbps
Writing application : Lavf52.68.0

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Frame rate mode : Variable
Frame rate : 23.976 fps
Minimum frame rate : 12.000 fps
Maximum frame rate : 24.000 fps
Resolution : 8 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.251
Stream size : 13.2 MiB (92%)
Writing library : x264 core 98
Encoding settings : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=umh / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=50 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=600 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=10000 / vbv_bufsize=10000 / ip_ratio=1.41 / aq=1:1.00 / nal_hrd=none

Thanks

poisondeathray
2nd October 2010, 16:26
another approach would be to remux into flv with ffmpeg

this bypassed re-encoding from some sites like blip.tv in the past

ricardo.santos
2nd October 2010, 16:32
Hi

another approach would be to remux into flv with ffmpeg


you mean remux flv into mp4? the server diddnt reconvert flv before, now it reconverts to mp4(h264), since there are so many options in the format (unlike flv) im unable to do what i did before with flv.

i use blip.tv as well and they allow us to hotlink the "master" video but here in Portugal some ISP's limit international "bandwith" (dont know if thats the right word for it) while offering unlimited national "surfing bandwith" so i try to keep all my videos in this video sharing site as all its servers are national.

IŽll try your advice (remux flv into mp4), just wondering if theres a easier way by "copy/paste" the mediainfo "info" in a bat script.

i normally use x264 with nero aac encoder through a script.

poisondeathray
2nd October 2010, 16:37
Maybe I don't understand why you are doing this....

I don't see what you gain doing this. If you re-upload that same file, it will be re-encoded if it's in mp4 container anyways - regardless of settings used. The server software doesn't detect what settings you used to encode the video and they decide whether or not to allow pass-through. Most sites that have some sort of pass through will look at container only.

poisondeathray
2nd October 2010, 16:42
you mean remux flv into mp4? the server diddnt reconvert flv before, now it reconverts to mp4(h264), since there are so many options in the format (unlike flv) im unable to do what i did before with flv.


ok i didn't see your edit

are you saying flv's that worked in the past (pass through) now get re-encoded to mp4? (i.e. server bypass no longer works?)

To be clear: what I was suggesting is encode whatever settings you want, then rewrap into flv, and that used to work. However, if that exact same video was in any other container, it would be re-encoded. The fact that it was in flv container allowed it to bypass re-encoding. You can batch encode and batch remux with ffmpeg script

ricardo.santos
2nd October 2010, 16:49
Maybe I don't understand why you are doing this....


avoid video reconversion thus avoiding losing video quality, before i used to upload flv (h263+mp3) encoded at 750k and they looked "ok" as they werent reconverted.

i wanted (if possible) to upload in mp4 (h264+aac) and bypass reconversion (loosing quality).

i know some just reconvert everything but if i dont try i'll never know... just remembered.... i 'll reupload the downloaded file and if it gets reconverted its because its reconverting everything even files with same settings (how did i forget to do that :))


are you saying flv's that worked in the past (pass through) now get re-encoded to mp4? (i.e. server bypass no longer works?)


yes, files are now being converted to mp4 (h264+aac)

poisondeathray
2nd October 2010, 16:52
yes that's what i'm saying :)

h.264/aac (encoded with x264, nero aac), works (or at least it used to - when I tested a few months ago - unless they changed their policy) when wrapped in flv container. i.e. no quality loss . The key here is the flv container allowed it to bypass blip.tv re-encoding. It didn't matter what encoding settings you used.

However, if you used the exact same settings (or any settings), and used .mp4 container - it gets re-encoded

ricardo.santos
2nd October 2010, 16:55
However, if that exact same video was in any other container, it would be re-encoded. The fact that it was in flv container allowed it to bypass re-encoding. You can batch encode and batch remux with ffmpeg script

when flv wasnt reconverted i tried to upload h264 + aac in flv container as i knew we can wrap h264 + aac in flv and stream it but it didnt work, it got reconverted to h263+mp3.

ricardo.santos
2nd October 2010, 16:56
poisondeathray im not using blip.tv :) read my 2nd post without speed reading :)

poisondeathray
2nd October 2010, 16:57
when flv wasnt reconverted i tried to upload h264 + aac in flv container as i knew we can wrap h264 + aac in flv and stream it but it didnt work, it got reconverted to h263+mp3.

what website? how long ago?

was it blip.tv? maybe they plugged that "hole" and re-encode everything now ?


poisondeathray im not using blip.tv read my first post without speed reading

LOL, you never said what website. Re-read my 1st post, I said for example, some websites like blip.tv do this. I never saw your edited 3rd post until later.

Anyways sorry for confusion. Good luck

ricardo.santos
2nd October 2010, 18:32
after 1 hour trying different uploads its confirmed... it reconverts everything.

Thanks poisondeathray for all the info.