View Full Version : x264 codec settings
sikumaini
17th April 2007, 22:15
Hi, I am extremely new at streaming in general. I have been toying around with the x264 codec, and is the one I am most interested in using during live feeds.
I have used few settings but I am generally not pleased with the quality and plus I have some issues with the audio well there is none. My upload speed averages out at 600/Kbps or 80kb/s. So I believe if I try to aim at 500 Kbps including both video and audio that its a possibility. I have taken few pics of my setting in general if you could tell me what needs to be changed or what I have done right it would be great. I want to thank you guys in advance for what ever advice you guys have.
http://img440.imageshack.us/img440/2978/setting1nq6.jpg http://img440.imageshack.us/img440/4531/setting2ca3.jpg http://img440.imageshack.us/img440/6128/setting3ue9.jpg http://img258.imageshack.us/img258/3849/setting4im3.jpg http://img353.imageshack.us/img353/8156/setting5du4.jpg
slavas
18th April 2007, 08:04
dont expect to look really good video at 300kbps, plus give us resolution you are encoding maybe its too high and source
as for audio i dont understood correctly you but 32 kbps mp3 at stereo is kinda weird decision, go for aacplus (search forum) or at least mono
wildex999
18th April 2007, 09:10
300kbps with 400x300(Something around that that can be /16)
is really good quality with the right settings on X264.
48kbps AACP goes perfectly allong with it, and you have space for the little 100kbps overhead...
wildex999
18th April 2007, 11:51
Oh, and at 23.973 FPS.
tip:
Motion estimiation:
Turn of mixed with so few frames(5 frames is good for that bitrate) set range to at LEAST 32, best at 64, but that would be slower.
B Frames:
Keep it to 1-2 B frames.
sikumaini
18th April 2007, 15:02
I read somewhere that while streaming you should try to keep source aspect ratio size of 4:3, and lowest one is 320x240 and then increase it by multiples of 16. So I was trying to get the middle one 512x384. Or you guys suggest 640 x 480?
wildex999
18th April 2007, 15:19
432x320 works perfectly for me. It's good quality in full screen, and keeps good enough on 300-400kbps.
I have never read about the aspect ratio, but as long as you keep the same size for all the videos, the stream will work.
sikumaini
18th April 2007, 15:48
Before I try to stream somewhere else I am trying to stream it on lan on my local computers. Even with that 20-30 secs into the stream my screen freezes, although it shows that its still playing on winamp my screen remains frozen. Plus I can't get my audio to work.
sikumaini
18th April 2007, 16:01
Okay I decreased my fps and my screen size that helped on screen getting stuck issue. But still no audio.
Scratch that still having the issue but not as bad as before.
john@ROCKNTV1
18th April 2007, 17:05
Originally posted by sikumaini
Okay I decreased my fps and my screen size that helped on screen getting stuck issue. But still no audio.
Scratch that still having the issue but not as bad as before.
your machine may be borking the "decode" due to horse power issues. what is your hardware? as decoding a 300 + bit h264 stream ,full screen , is not for the economy pc.:eek:
wildex999
18th April 2007, 17:19
Decoding 400kbps H264 full screen uses 20% of my AMD Athlon 3500+, doesn't need THAT much of power >_>
And it shouldn't freeze, it should be jumpy, yes.
As for audio,
32kbps MP3??? No way, use 48kbps AACP.
And, are you sure the audio source can be read? Can Windows Media Player get sound of the file you're trying to encode?
Do you have FFDSHOW installed?
sikumaini
18th April 2007, 17:21
Na my pc should be good enough for this. I have 3 ghz P4,Asus P4P800-e deluxe mobo, 1 gb ram, plenty of hard drive, ATI x800 pro, Hauppauge WinTV and Creative X-Fi.
Even my system usage isn't 100. I just can't figure out how to get around no audio and how to get my stream stop getting stuck and the problem is I don't know if its only the video part that is getting stuck cause there is no audio. I mean when I open nsvcap I can see the picture and hear the audio but when I start the capture there is no audio and video gets stuck after a minute or so. I even keep dropping lot of frames why I don't know. If I try to start "capture audio" before "start capture" itself nsvcap crashes. Sorry if this isn't clear.
sikumaini
18th April 2007, 17:27
Originally posted by wildex999
Decoding 400kbps H264 full screen uses 20% of my AMD Athlon 3500+, doesn't need THAT much of power >_>
And it shouldn't freeze, it should be jumpy, yes.
As for audio,
32kbps MP3??? No way, use 48kbps AACP.
And, are you sure the audio source can be read? Can Windows Media Player get sound of the file you're trying to encode?
Do you have FFDSHOW installed?
Yeh I changed my audio to 48kpbs AACP. Well I am trying to play this live directly from my TV. When I use the software given with my capture card or if I run NSVCAP I can hear everything fine. Its only that the stream is the one that doesn't have any audio.
Yes I have FFDSHOW installed.
So you guys think there is nothing wrong with my settings in those pics?
And I am trying to stream Cricket matches to my friends and they are over 8 hours long and live. I don't mind if it hands once or twice every 30 mins or so, but this is just pathetic it hangs after a minute and only way to fix it is if I restart the stream. And after 10-20 mins my NSVcap starts dropping frames like crazy too and I have to restart that.
wildex999
18th April 2007, 17:45
Looks like your PC can't handle encoding then, 3GHz P4 isn't enough for live encoding X264, you need at LEAST double core(I'm not sure if NSV can be encoded multi core???)
My CPU can encode somewhat live X264 with some lower quality settings(No B frames, 1 ref frame, 16-32 range, etc.)
john@ROCKNTV1
18th April 2007, 18:00
Originally posted by sikumaini
Na my pc should be good enough for this. I have 3 ghz P4,Asus P4P800-e deluxe mobo, 1 gb ram, plenty of hard drive, ATI x800 pro, Hauppauge WinTV and Creative X-Fi.
Even my system usage isn't 100. I just can't figure out how to get around no audio and how to get my stream stop getting stuck and the problem is I don't know if its only the video part that is getting stuck cause there is no audio. I mean when I open nsvcap I can see the picture and hear the audio but when I start the capture there is no audio and video gets stuck after a minute or so. I even keep dropping lot of frames why I don't know. If I try to start "capture audio" before "start capture" itself nsvcap crashes. Sorry if this isn't clear.
It has been my experience that ati and creative fight over irq this would also explain pin line issue with audio
sikumaini
18th April 2007, 19:40
Really? You feel my PC isn't up to the mark? Well I made some changes in the settings and NSVcap dropped like 4050 frames in 70,000 frames. The stream was going on for 45 mins almost. So I feel dropping 5% of frames isn't all that bad. But if someone here themselves x264 codec and stream online. I would love to know your settings for encoding I don't want it to be something special. But best settings for 320 x 240 with 24 fps, 300kpbs stream for video and 24 kpbs stream for audio.
About ATI clashing with Creative I do have on board Realtek card do you think if I use that for my streaming it will work?
john@ROCKNTV1
18th April 2007, 20:05
a few short years back it would not have been the way to go
ie. onboard sound. Those days are gone .
i suggest an all in wonder not that the huapauge ist capable but ultimatly you are dividing finite cpu cycles to more devices. as far as the sound goes try it with the onboard, i have a blaster on the shelf because of this. i have been able to make a onboard c-media chip work fine.
i was after alot of hair pulling ,able to get the add ons to play in the sand box together, but any restart of the machine brought on a hit or miss on which card would get priority buss mastering
If you notice sound hardware vary in ther ability to compress audio to differant densitys , this might well be the desiding factor in your search performance/quality.
ps.... nsvcap pulldown menu/capture audio/checkmark
:D
sikumaini
18th April 2007, 23:11
SO I have to checkmark capture audio right? It crashes everytime I try that. NSVcap does.
wildex999
19th April 2007, 05:03
Sounds like it doesn't like your audio input >_>
Have you set an audio source under "Devices"?
I can run screen capture and audio from realtek HD Audio at the same time.
sikumaini
19th April 2007, 15:12
Well some how it started working on its own. I suppose they audio and video made up.
Jeeper One
20th April 2007, 03:28
Hi everyone:Originally posted by sikumaini
Hi, I am extremely new at streaming in general. I have been toying around with the x264 codec, and is the one I am most interested in using during live feeds.
I have used few settings but I am generally not pleased with the quality and plus I have some issues with the audio well there is none. My upload speed averages out at 600/Kbps or 80kb/s. So I believe if I try to aim at 500 Kbps including both video and audio that its a possibility. I have taken few pics of my setting in general if you could tell me what needs to be changed or what I have done right it would be great. I want to thank you guys in advance for what ever advice you guys have.
http://img440.imageshack.us/img440/2978/setting1nq6.jpgDon't use 32K LAME Stereo as indicated in the attached image. That's your problem with the audio. If you're going to use 32K, either use LAME Mono or (Better yet) Parametric Stereo AAC+.
Cheers :D
Pat (ala Jeeper One)
wildex999
20th April 2007, 04:56
I think that image is a bit outdated x3
john@ROCKNTV1
20th April 2007, 12:11
Originally posted by sikumaini
Well some how it started working on its own. I suppose they audio and video made up.
There's that "hit or miss" syndrome I was eluding to .
h 264 is no more rugged of a codec than vp6/ for encoding and does not requier special dual core or any special hardware as i have done it on a p2 @400 mgh.
veiwing /decodeing a vp6/ or h264 stream @ anything more then 128 however is a diferent story as the cpu cycles
on machines this slow are spent operating the pci bus and nic card, /before rendering the data to agp memmory.
It is even possible to use a machine as slow as a
350 amd pentium class /pci as a server for these codecs.
I would show you example shots of the server hardware inside the case if any one doughts this , but the lack of common curticy around here ,( how ya doing jeeper)now bars me from increasing my work load jest to prove a point .
I john@ROCKNTV1 atest to the above post as fact not speculation(how ya doin jeeps)and implor you not to force me to make the video, becuase , i will ,and jeepsta will be mad @ me and start to speculate........lol<new mime type> .lol :D
wildex999
20th April 2007, 12:37
ENCODING at a 400mhz??? erm..... good luck
john@ROCKNTV1
20th April 2007, 13:15
Theres no luck in it kid
I just set it and forget it. :D
wildx you may have issues if you buy the ronco branded
machines........lol <new mime type> .lol :eek: floating point operations "brand new p 60 " or lack there of, floating point operations. Other than that it is realy more a question of the operator and whether the hardware is dedicated :D
In time I will make the VIDEO for those who cant see past there keyboard to dispell any misconception ,and i would realy love to help anyone who wants to smell the wire burning. :rolleyes:
gameplaya15143
20th April 2007, 20:33
Originally posted by sikumaini
I even keep dropping lot of frames Your x264 settings are good for pre-encoding NOT live. Learn how to monitor your CPU usage, you will see with those settings it is MAXED. That is why you are dropping frames.
Set partition decision to the lowest quality (fast), and motion search to diamond (this gives you the biggest speed increase). Shut off trellis, use 0 b-frames (unless you want to deal with the a/v sync issues), unchecking everything in 'partitions' may also increase speed. Encode at 320x240 at half framerate and you should be all set. Quality won't be as good, but you will be able to encode live successfully at least.
Jeeper One
29th April 2007, 23:24
Hi everyone:
One more question. How fast is your fps.?
BTW, fps = frames per second.
Pat (ala Jeeper One)
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.