Showing posts with label media. Show all posts
Showing posts with label media. Show all posts

Sunday, December 15, 2013

Mobile App Development: Working With Media Files on Android (Part 2)

In the previous blog post, we presented two solutions that work with media files on the Android Mobile App platform, especially videos files. In this post, I will present a guide for merging and trimming video files using MP4parser. All source codes can be found on GitHub. 


Preliminaries


The first thing that we must do before we start programing our mobile app is to download the mp4parser libraries from the project page right here. For this example, we will need ISOViewer and ISOParser, which is provided in the URL mentioned above.


Secondly, we will need to create a new project and add the libraries to the project.  At the end, the project libraries must look like this:


Merging video files


The first code example that we will be working with is to merge video files. We must remember that working with media files types is an exhaustive job.  We must implement all our classes in a separate thread so that we can leave the main visual application unfrozen.


Let’s start with our class skeleton. Create a new class for our mobile app projet called MergeVideos extending the superclass AsycTask.  After creating the class, we can add the variables, constructor and required methods as follows:


 


As you can see our class must be initialized with 2 values, the working path folder and the list containing the video names, including the extension (e.g. video1.mp4, video2.mp4, videoN.mp4). The next step is to write the logic in charge of the video merging task. For this, we must follow the next algorithm:

1. For each video file we must create a Movie object containing all the information as video and audio tracks of such video.
2. For each video object, we must:
     a) Get every video track and stack them in a list.
     b) Get every sound track and stack them in a list.
3. Create a new Movie placeholder and add the movie and audio tracks stacked previously.
4. Write the new Movie object to disk, thus creating the new merged video.

So following the previous algorithm, the first task is performed by the following snippet:


 


Where count, is the number of videos to merge and inMovies is the array of Movie objects. The “for” loop will get all the video files references, generating the Movie objects and adding it to the array.


The next step is to read and concatenate the sound and video tracks, which is done by the following code:


 


After concatenating every video and audio track, we are ready to create the new movie placeholder for our mobile Android app using the snippet:


 


At this point, our new movie is created in a logical manner.   Now, we must write this newly created movie into the nonvolatile memory, which can be done as follows:


 


And now our newly created merged video is ready to be reproduced!


Trimming video files


The next example is how to use this library to shorten the length of a given video. Like the previous example, all of the logic code must run on a separate thread, in order to keep the activity unlocked. The class skeleton should look like this:


 


The class is initialized with mediaPath which is the complete path to the video.  The startTime, which is the start time in seconds, and length, which is the number of seconds it takes to trim the video file after the start time. In this case, all the logic is contained in the trimVideo method.   So let us start with the logic algorithm:

1. For each track in the video, get the correct start time from all the tracks, since where are using mp4 files, this is a required process in order to trim the complete video.
2. For each track in the video, crop the track with a start and end sample time and add it to a new Movie object.
3. Write the newly created movie to the disk.

Following this algorithm, the first step can be performed by the following code:


 


In this case, the snippet is using a private function called correctTimeNoTextSyncSample to get the nearest synchronized sample to our desired start time. Afterwards, we are ready to crop each track of the video and the step 2 of our algorithm can be performed as follows:


 


After getting the correct start and end time sample from current track, we are ready to crop it and add it to the final movie object. After cropping each track of the mp4 file and concatenated it, we are ready to save the Movie object to disk.  This step can be performed by:


 


And that’s it. We now have a newly cropped video created from a larger one!


Final thoughts


As mentioned in the previous post, one of the main drawbacks of this library is that it can only work with MP4 files. Luckily for us, all android devices record video files in such format, so this is a good option when working with this kind of media. However, this library does not give support to transcode and/or compress media files, which in many cases, is an important task to do before uploading media files to the cloud.  In this case our best option is to use ffmpeg which is our next topic of discussion. Till next time!


Acknowledgments


*Thanks to the mp4parser project for keeping this excellent library ().


*All codes were based on the demos provided by the library web page.


*More about the mp4 format here. 

Victor Cervantes is an Android developer with 1+ years of experience with the Android mobile platform. He has a Masters Degree in Computer Science specializing in optimization problem solving. He is an Appcelerator Titanium Certified Developer (TCD) and currently works at iTexico as an Android Developer.

Contact Us


View the original article here

Monday, November 11, 2013

Samsung spotlights new refrigerator with rich media mobile ad

By Rebecca Borison

August 9, 2013

samsung

Samsung is getting creative with its advertising for the new 4-Door Sparkling Water Refrigerator by placing a rich media ad within mobile applications such as Scramble with Friends.

The ad pops up with a close-up of the water system in the fridge and asks consumers to drag a cup to the spout to fill it up. Once consumers follow this direction, they can explore the refrigerator and learn more about the product.

?Samsung is an innovative and technology-savvy company as is proven by quality and success of their products time and time again,? said Harry Kargman, CEO of Kargo, New York.

Sign up to receive Mobile Marketer Daily. The premier mobile marketing publication. Free!

?In this case, developing a mobile rich media strategy creates an opportunity for their prospective customer to interact with and better understand the amazing features of their new products, in this case the Samsung refrigerator line,? he said.

?Rich media allows a brand to tell a story and Samsung leverages that story to drive desire to own. The personal nature of the phone creates a new opportunity to connect with a customer on an intimate level.?

Mr. Kargman is not affiliated with Samsung. He commented based on his expertise on the subject.

Samsung could not meet press deadline.

Still or sparkling?
Samsung?s new refrigerator is being marketed partly for its water system. The refrigerator offers both still and sparkling water.

Consumers can user their fingers to drag a glass under the water spout to fill it up within the mobile ad.

At the bottom of the screen, there is copy that reads, ?Still or sparkling??, and once the consumer drags the glass to the spout, it begins to fill up with sparkling water.


The Samsung in-app ad

Then the consumer is directed to a full view of the refrigerator with copy at the top of the screen that reads, ?Can your fridge do that?? and a button that says ?Learn more.?

If the consumer taps the learn more button, he or she will be directed to a mobile site with product information about the refrigerator and the option to purchase.

In addition to the learn more button, there are three plus signs on the fridge that lead to more pages.

One leads to a promotional video about the new refrigerator. The other two lead to close-up images of different parts of the fridge.

The first shows the main storage area of the fridge, which according to the copy stores up to 31 bags of groceries. The second shows the customizable FlexZone Drawer which is at the bottom of the fridge.

Consumers who click on "Learn More" are directed to this mobile site

Rich media
Samsung is not the only company to experiment with mobile rich media ads recently.

Ocean Spray ran a rich media ad within Us Magazine?s mobile site to promote the company?s diet drink. The ad asked users to wipe the screen to clear the juice (see story).

This particular campaign met with much success and had over 40 million impressions with users spending an average of 12.7 seconds within the ad (see story).

Making advertisements more interactive and engaging invites consumers to spend more time with the ad, leading to a more lasting impression.

?Mobile is the most exciting growth story today,? Mr. Kargman said.

?An eMarketer study just came out that the average U.S. adult will spend more than?five hours each day online, almost half of that on mobile activities, while daily TV viewing will drop slightly to an average of?four hours and 31 minutes,? he said.

?Samsung recognizes this incredible shift in time spent and consumer engagement and has empowered their agency and media teams to drive brand awareness where their consumer is spending their time.?

Final Take
Rebecca Borison is editorial assistant on Mobile Marketer, New York

Rebecca Borison is editorial assistant on Mobile Marketer. Reach her at rebecca@mobilemarketer.com.


View the original article here

Monday, September 30, 2013

Allen West Out At PJ Media

Former Congressman Allen West is leaving his job at Pajamas Media after an altercation with a female staffer in which he allegedly called her a “Jewish American princess,” BuzzFeed learned on Thursday.

“In order to focus on political interests, Allen West will transition from his full-time role as director of programming for Next Generation.TV to a twice-a-month contributor of written commentary on PJMedia.com, effective October 1, 2013,” PJ Media financier Aubrey Chernick wrote to staff in an email from Sept. 16. “I wanted our staff and consultants to have this information first. However, PJ Media is not announcing this publicly for several weeks, so please do not share this news with anyone outside of the company until you see our public announcement.”

In a message to staff, West wrote: “Shortly, I will be giving up my position as director of programming at Next Generation.TV to get back on the front lines to expand the message of constitutional conservatism across our country.”

Two sources familiar with what happened told BuzzFeed that West had gotten into an argument with a female employee and called her a “Jewish American princess” while telling her to “shut up.”

Reached by phone, West told BuzzFeed he was leaving his job voluntarily, though one source familiar with the situation told BuzzFeed he had been fired. He did not deny that an exchange with the employee had occurred, but said it hadn’t led to his leaving the company.

“No, I didn’t get fired,” West said. “I’m leaving to pursue political aspirations. That’s it. There’ll be a statement that comes out and it’s effective in October.”

Asked specifically whether he referred to the employee as a “Jewish American princess,” West said simply, “There was an exchange, that’s all.”

West, a conservative firebrand who served one term in Congress, joined PJ Media’s Next Generation TV in January, where he hosted a web show with former Daily Caller reporter Michelle Fields and L.A. radio host John Phillips.

Chernick did not return a request for comment about West’s departure.

The full email from Chernick to PJ Media staff:

Dear PJ Media Staff and Consultants:

I have a special, confidential announcement to share with you today.

In order to focus on political interests, Allen West will transition from his full-time role as director of programming for Next Generation.TV to a twice-a-month contributor of written commentary on PJMedia.com, effective October 1, 2013.

I wanted our staff and consultants to have this information first. However, PJ Media is not announcing this publicly for several weeks, so please do not share this news with anyone outside of the company until you see our public announcement.

I thank Allen for all his dedication, hard work and contributions in launching Next Generation.TV and in establishing our Washington, D.C. presence and studio. I speak for all of us when I wish Allen the very best experiences and outcomes in his future endeavors.

My commitment to the Washington, D.C. staff and studio remains as solid as ever. I am proud of this fine studio that so many of you worked diligently to construct, and I am excited to work with our D.C. and Los Angeles contributors and producers on the next generation of NG.TV programming.

Our next phase of programming for Next Generation.TV is our most important so far. We are taking that big step to produce shows for millennials, about millennials and narrated by millennials. This past January when we launched Next Generation.TV, we determined that our initial programming should be geared to the parents and grandparents of millennials since we have been building this older audience for many years. We always had in mind that we’d reach out to the millennials themselves starting in the later part of this year and cover their stories of achievement in business, science, the arts, sports, civic and military service, and leadership.

I am pleased to say that our first wave of this new content will debut on October 17 at Next Generation.TV’s first live and Web event entitled “Next Generation Startups – Young Women Building New Businesses.” This event will feature seven young female entrepreneurs who detail what it took to build their businesses. They all demonstrate that can-do spirit that made, and will keep, America great.

If you have any questions on these announcements, please feel free to contact Sandra Rozanski or Joan Seavey.

Below, you will find a personal message from Allen West about his time at Next Generation.TV and what he has planned for the future.

Sincerely,

Aubrey Chernick

September 16, 2013

The full message, attached at the bottom of Chernick’s email, from West to staff:

Dear PJ Media Staff and Consultants:

At Next Generation.TV, PJ Media has given me a powerful platform from which to address the critical issues facing our nation and its future generations. I am very proud of the work I did at Next Generation.TV, especially the news bureau that we have established in Washington, D.C. It is off to a great start delivering new content for our viewers along with mentoring the next generation of millennial journalists. During the nine months that I have spent at PJ Media, I have learned so much about what it takes to produce credible and informative programming, and I appreciate the help and support that all of you have provided me in that effort.

Shortly, I will be giving up my position as director of programming at Next Generation.TV to get back on the front lines to expand the message of constitutional conservatism across our country. I will also be focused on supporting my Allen West Guardian Fund PAC in promoting the next generation of conservative candidates in the 2014 election cycle. And I’m happy to say that I will be contributing written commentary to PJMedia.com twice a month.

It has been my pleasure to work with all of you, and I look forward to continuing to contribute to PJ Media.

Steadfast and loyal,

Allen B. West


View the original article here

Wednesday, September 25, 2013

23 Really Clever And Unique Ted Cruz Puns The Media Uses

I know, right? Now tell your friends!if(typeof getUrlVars()['reaction']!='undefined'){videoad.init()}

Thanks for Registering! Before you can vote or contribute we need to quickly validate your email address. We’ve sent you a confirmation email with instructions. If you don’t receive the email in a few minutes, please check your spam folder.

I know, right? Will your friends agree?

Monday, September 23, 2013

Do upfront media buys have a place in mobile advertising?

By Chantal Tode

September 19, 2013


Range Rover iAd


The minimum iAd buy has been repeatedly lowered


While the growth in mobile advertising is driving interest in automated buying, some publishers are pushing for upfront media buys. One possible scenario would see brands bidding in advance on premium inventory, offering similar targeting benefits as programmatic buying.


As mobile ad budgets grow and mobile experiences improve, it makes sense that some brands could want to bid on premium mobile ad space in advance. However, this is essentially what Apple tried and failed to do with iAds, which launched in 2010 with a $1 million minimum buy, but was forced to repeatedly lower the price because marketers were not biting.


?To date, mobile properties have lent themselves more to placed ads rather than strategic partnerships due to the capabilities and usage of the form,? said Gabe Misarti, chief strategy officer at agency Tris3ct, Chicago. ?While we are now seeing increased opportunities with the medium resulting in greater buzz about upfronts, we do not expect to see mobile leading the charge with upfronts,? he said.

Sign up to receive Mobile Marketer Daily. The premier mobile marketing publication. Free!


?With the added contextual information of location and constant contact with consumer, programmatic buying on mobile is appealing to advertisers,? he said. ?For brands looking to effectively day-part or connect with their target in the context of their daily routine, programmatic mobile marketing offers many potential benefits.


?In reality, marketers still perceive it as an area of test-and-learn, meaning upfronts represent a barrier to wider adoption.?


The right timing
Apple?s iAd has not had a big impact in the mobile advertising space, pointing to the reluctance of marketers to commit big upfront budgets for mobile advertising.


Last year, iAds had approximately a 3 percent share of mobile advertising compared to 54 percent for Google.


However, the industry has evolved significantly in the several years since iAds was introduced, with higher adoption rates, users spending growing amounts of time on mobile, significantly improved user experiences and ad units.


While many marketers are still not spending proportionately on mobile advertising compared to how much time users spend on mobile, budgets are expected to grow significantly over the next few years.


As more marketers begin to commit larger portions of their budgets to mobile, there may come a time when advertisers will be competing for premium mobile ad inventory.


?Quality media is quality media,? said Jeremy Sigel, client director for mobile at digital agency Essence, New York.


?There will always be a need and desire for upfronts from players like Yahoo and AOL,? he said. ?As mobile grows, upfronts will grow, in particular as advertisers gain learnings and become increasingly comfortable with mobile media partners.?


Return on investment
Yahoo and AOL are among the publishers pushing digital ad upfronts.


There are some challenges associated with upfront buying, including that the return-on-investment may not be there for some brands.


?Yahoo and AOL have always been big on pushing large upfront buys, which is no surprise given the massive amount of inventory under their control,? said Ratko Vidakovic, director of marketing at SiteScout, Toronto.


?For certain marketers, this has always been a great way of reaching their objectives, especially when the needs have been related to guaranteed reach and volume,? he said.


?The challenges with upfront buys is that they are usually priced higher than through auction-based platforms like RTB, which can make it harder to achieve ROI goals for some.?


Gaining efficiencies
However, there could be efficiencies to be gained by combining upfronts with programmatic buying.


The key will be enabling larger brands to gain access to premium content while also offering advantages such as real-time targeting.


?I believe advertisers will always be willing to spend a large portion of their budget for upfronts, especially if they think they'll get a better deal in the long run with guaranteed ad placement,? said Seth Hittman, CEO of Run, New York.


?Mobile is no different: Mobile upfronts will grow as mobile advertising grows,? he said.


?The premise behind this that advertisers want to receive a unique value in return for their spend, and upfronts challenge the status quo. Those details will be worked out by the publishers and brands, in a collaborative manner, as we move forward.?


Mobile upfront buys will need to provide marketers with unique benefits or there is not much incentive for them to shell out the money.


Not everyone is convinced the two belong together.


"The very notion of upfronts collides with what makes programmatic so powerful, the ability to target specific users anywhere you want, in the sequence you want, with controls for things like frequency and transparency across the entire ecosystem," said Brian Krick, head of search and biddable for North America at Essence.


"Generally speaking, programmatic upfronts sound good if you are a publisher or an agency, less so if you are an advertiser," he said.


"We always think about creating and maximizing the value of first-party data as foundational to any programmatic strategy. The value that a publisher like AOL or Yahoo! bring to that may be limited in comparison to the commitment they are asking for."


Final Take
Chantal Tode is associate editor on Mobile Marketer, New York

Associate Editor Chantal Tode covers advertising, messaging, legal/privacy and database/CRM. Reach her at chantal@mobilemarketer.com.


View the original article here