[prev in list] [next in list] [prev in thread] [next in thread]
List: mjpeg-users
Subject: [Mjpeg-users] performance of mplex on embedded controller like ARM9
From: "Reither, Frank" <frank.reither () emtrion ! de>
Date: 2011-01-11 7:31:32
Message-ID: 95F51F4B902CAC40AF459205F6322F0187A9CA4724 () BMK019S01 ! emtrion ! local
[Download RAW message or body]
Hello everybody,
I'm using mplex (mjpegtools-1.9.0) in a customer project and I have some qu=
estions about the performance of this tool. The purpose of the project of m=
y customer is to capture video (special HW of the customer) and audio signa=
ls (alsa) from an input device, to encode the video stream to mpeg2, to mul=
tiplex audio and the encoded video stream and to write this new stream to a=
DVD. This altogether has to run "on the fly".
I'm running Linux 2.6.32_2 on an ARM9 controller Davinci DM365 (about 400MH=
z) and I'm using the appropriate SDK from TexasInstruments (It's version 12=
). For multiplexing I'm using mplex from the mjpegtools-1.9.0 package and f=
or authoring the stream before writing on a DVD, I'm using dvdauthor. The e=
ncoder of the Davinci controller is able to create I-Frames and P-Frames bu=
t no B-Frames. I can configure the bitrate between 2MBit/s up to 6.5MBit/s =
(actuall I'm using 2MBit/s). The stream on the DVD has to be PAL (or NTSC) =
with 24 frames per sec.
My problem now is, that I'm losing lots of frames and the result is an incr=
easing offset between audio and video.
I order to make sure that I don't have a problem with the encoder I checked=
all the processing steps individually: As long as mplex doesn't run with t=
he encoder (part of my application) in parallel everything is fine, no fram=
es are lost. By the way, the encoder is a piece of hardware of DM365 and is=
controlled by my application.
Multiplexing this video stream by calling mplex as a separate process and n=
ot running my app at the same time leads to good results. In this scenario =
I noticed that mplex consumes about 90% of the cpu time and the time for mu=
ltiplexing is nearly the same time I needed for capturing and encoding.
This cpu time is only about 65% when mplex runs in parallel (on the fly) wi=
th the rest of my app (this consumes about 20%). -> All the fifos and inter=
mediate buffers are running full very quickly and the consequence is that t=
he capturing unit drops frames.
On an X86 architecture it's completely different, multiplexing there takes =
only a few seconds. Looking into the code I see some hints about optimizati=
ons for X86 and for PPC.
- So what is about ARM9, are there any optimizations available?
- Is a Floating Point Unit necessary?
- Or even worth, is mlpex suitable for this "on the fly" project?
- Do you have any hints for improving the performance of mplex (be=
sides using a different cpu:))
It would be very great is someone could help.
Thanks in advance and Best Regards
Frank Reither
By the way, I calling mplex like this:
mplex -f 8 -b 2000 -V -r 8200 -v 0 -o output.vob video.m2v audio.lpcm
________________________________
_____________________________________
Amtsgericht Mannheim
HRB 110 300
Gesch?ftsf?hrer: Dieter Baur, Ramona Maurer
_____________________________________
Important Note:
- This e-mail may contain trade secrets or privileged, undisclosed or other=
wise confidential information.
- If you have received this e-mail in error, you are hereby notified that a=
ny review, copying or distribution of it is strictly prohibited.
- Please inform us immediately and destroy the original transmittal.
Thank you for your cooperation.
[Attachment #3 (text/html)]
<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"><head> <meta http-equiv="Content-Type" \
content="text/html; charset=us-ascii"> <meta name="Generator" content="Microsoft Word \
12 (filtered medium)"> <style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2132550594;
mso-list-type:hybrid;
mso-list-template-ids:1369341550 1309993250 67567619 67567621 67567617 67567619 \
67567621 67567617 67567619 67567621;} @list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello everybody,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m using mplex (mjpegtools-1.9.0) in a \
customer project and I have some questions about the performance of this tool. The \
purpose of the project of my customer is to capture video (special HW of the \
customer) and audio signals (alsa) from an input device, to encode the video stream \
to mpeg2, to multiplex audio and the encoded video stream and to write this new \
stream to a DVD. This altogether has to run “on the \
fly”.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">I’m \
running Linux 2.6.32_2 on an ARM9 controller Davinci DM365 (about 400MHz) and \
I’m using the appropriate SDK from TexasInstruments (It’s version 12). \
For multiplexing I’m using mplex from the mjpegtools-1.9.0 package and for \
authoring the stream before writing on a DVD, I’m using dvdauthor. The encoder \
of the Davinci controller is able to create I-Frames and P-Frames but no B-Frames. I \
can configure the bitrate between 2MBit/s up to 6.5MBit/s (actuall I’m using \
2MBit/s). The stream on the DVD has to be PAL (or NTSC) with 24 frames per \
sec.<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">My \
problem now is, that I’m losing lots of frames and the result is an increasing \
offset between audio and video. <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I order to make sure that I don’t have \
a problem with the encoder I checked all the processing steps individually: As long \
as mplex doesn’t run with the encoder (part of my application) in parallel \
everything is fine, no frames are lost. By the way, the encoder is a piece of \
hardware of DM365 and is controlled by my application.<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">Multiplexing this video stream by calling mplex \
as a separate process and not running my app at the same time leads to good results. \
In this scenario I noticed that mplex consumes about 90% of the cpu time and the time \
for multiplexing is nearly the same time I needed for capturing and encoding. <o:p> \
</o:p></span></p> <p class="MsoNormal"><span lang="EN-US">This cpu time is only about \
65% when mplex runs in parallel (on the fly) with the rest of my app (this consumes \
about 20%). -> All the fifos and intermediate buffers are running full very \
quickly and the consequence is that the capturing unit drops \
frames.<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">On \
an X86 architecture it’s completely different, multiplexing there takes only a \
few seconds. Looking into the code I see some hints about optimizations for X86 and \
for PPC.<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New \
Roman""> \
</span></span></span><![endif]><span lang="EN-US">So what is about ARM9, are there \
any optimizations available?<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New \
Roman""> \
</span></span></span><![endif]><span lang="EN-US">Is a Floating Point Unit \
necessary?<o:p></o:p></span></p> <p class="MsoListParagraph" \
style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span \
lang="EN-US"><span style="mso-list:Ignore">-<span style="font:7.0pt "Times New \
Roman""> \
</span></span></span><![endif]><span lang="EN-US">Or even worth, is mlpex suitable \
for this “on the fly” project?<o:p></o:p></span></p> <p \
class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if \
!supportLists]><span lang="EN-US"><span style="mso-list:Ignore">-<span \
style="font:7.0pt "Times New \
Roman""> \
</span></span></span><![endif]><span lang="EN-US">Do you have any hints for improving \
the performance of mplex (besides using a different cpu</span><span lang="EN-US" \
style="font-family:Wingdings">J</span><span lang="EN-US">)<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">It would be very great is someone could \
help.<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US">Thanks in advance \
and Best Regards<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Frank Reither<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">By \
the way, I calling mplex like this:<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">mplex –f 8 –b 2000 –V –r 8200 –v 0 \
–o output.vob video.m2v audio.lpcm<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> </div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">_____________________________________<br>
<br>
Amtsgericht Mannheim<br>
HRB 110 300<br>
Geschäftsführer: Dieter Baur, Ramona Maurer<br>
_____________________________________<br>
<br>
Important Note:<br>
- This e-mail may contain trade secrets or privileged, undisclosed or otherwise \
confidential information.<br>
- If you have received this e-mail in error, you are hereby notified that any review, \
copying or distribution of it is strictly prohibited.<br>
- Please inform us immediately and destroy the original transmittal.<br>
<br>
Thank you for your cooperation.<br>
</font>
</body>
</html>
[Attachment #4 (--===============5440266016273805614==)]
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic