Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
27th May 2008, 19:19 | #1 | Link |
AZ-Coder
Join Date: May 2007
Posts: 5
|
Exploring Software-Encode h.264 Options for Mobile Atom-Based Solution
Exploring Software-Encode h.264 Options for Mobile Atom-Based Solution
For a mobile surveillance application, we have traditionally relied upon hardware encoders, for speed and power/heat reasons. But with the advent of the Atom CPU, a 1.6 GHz device 64 but device w/ at least SSE3 is available at a very attractive price. Is there any reasonable implementation of x264 or any other h.264 software codec that might support real time software encoding on this kind of platform, for a single channel (by reasonable, I mean Baseline CIF of at least 25 fps). If not, given the above, what kind of through would be achievable w/o pushing the CPU past 80%, as determined by fps, let's say. Cheers, - Michael |
27th May 2008, 19:20 | #2 | Link |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Even on an Atom, I suspect x264 could easily do realtime High Profile CIF with good settings. If it can't, not much else can, given that x264 is one of the fastest software encoders available.
Of course, I wonder exactly how much they've butchered the IPC on that chip.
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 27th May 2008 at 19:23. |
27th May 2008, 19:26 | #3 | Link |
AZ-Coder
Join Date: May 2007
Posts: 5
|
Toss me a few worthwhile settings, and I will get a board and test it out and report
Toss me a few worthwhile settings (compile flags if appropriate and run time options), and I will get a board and test it out and report back how it does. I just did not want to dive in if the thing was doomed from the get-go to hit 3 fps or something.
-mg |
29th May 2008, 17:22 | #5 | Link |
Turkey Machine
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
|
Add --bframes 0 if you can sacrifice the quality.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld |
29th May 2008, 19:16 | #7 | Link |
Turkey Machine
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
|
--ref 0 then. I couldn't remember whether it was refs or bframes that were enabled by default. Refs I find slow encoding down, no matter what number's used between 1 and 16.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld Last edited by Inventive Software; 29th May 2008 at 19:18. |
7th September 2008, 20:45 | #9 | Link |
AZ-Coder
Join Date: May 2007
Posts: 5
|
I am getting fairly good results with the following in a single core ATOM just now:
/usr/bin/nice --16 /usr/local/bin/ffmpeg -y -threads 2 -f oss -i /dev/dsp -ab 22k -ac 1 -ar 22050 \ -f video4linux2 \ -s cif -r ntsc -i /dev/video0 \ -t 180 -vcodec libx264 -bufsize 30000k -r 15 -b 300k -f mp4 \ -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 \ -me hex -subq 5 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 \ -i_qfactor 0.71 -b_strategy 1 -crf 22 \ -bt 300k -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 However, I have three things I am hoping to do better with: 1.) I do not understand all the above settings, some may be dumb for this kind of real time encoding... 2.) The resulting video has little or no color, I think some setting above may be messing that up... and finally 3. ) I am getting some small artifacts with the above settings when people move, what would be a good way to tackle that? Here is an example of the current result (mp4, plays in MPC, at least, about 8MB): Sample Vid Any ideas are appreciated! - Cheers Michael Last edited by azcoder; 9th September 2008 at 05:34. Reason: added video link |
9th September 2008, 15:43 | #10 | Link |
Registered User
Join Date: Dec 2007
Posts: 639
|
The artifacts look like interlacing.
If the camera shoots at 704x576 then you should try and see if ffmpeg can do something like Avisynth's ReduceBy2() on Linux, which should produce deinterlaced 352x288. Otherwise I don't think you have a choice other than encoding interlaced and deinterlacing later. (or see if you can get the camera to shoot progressive) As for the colors, I really don't know. Last edited by Comatose; 9th September 2008 at 15:45. |
9th September 2008, 17:03 | #12 | Link | ||
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
Quote:
|
||
9th September 2008, 18:54 | #13 | Link |
Registered User
Join Date: Dec 2007
Posts: 639
|
I thought so too, but then if x264 treated whatever as YV12 wouldn't it just look really messed up?
|
9th September 2008, 18:56 | #14 | Link | |
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
|
|
10th September 2008, 05:29 | #16 | Link | |
AZ-Coder
Join Date: May 2007
Posts: 5
|
Quote:
I think you are onto something here -- there does appear to be some strangeness with the ffmpeg v4l2 capture, and the Kodicom 4400R video capture card / bttv driver in use. I will collect more data and report back. |
|
10th September 2008, 07:04 | #18 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
http://threebit.net/mail-archive/vid.../msg04762.html |
|
10th September 2008, 17:07 | #19 | Link | |
AZ-Coder
Join Date: May 2007
Posts: 5
|
Quote:
Cheers and thanks, - Michael |
|
10th September 2008, 18:38 | #20 | Link | |
Registered User
Join Date: Mar 2005
Location: Finland
Posts: 2,641
|
Quote:
Speed is practically the same with both tools, but mencoder has much more features: video and audio filters, supported input devices and formats etc.. Also x264 encoding parameters are easier to handle with mencoder's command-line syntax (they are the same as in x264 itself). Mencoder should be able to do almost everything that ffmpeg does, and a lot more. |
|
|
|