By an incredibly slim margin, the new animate comedy Rio 2 managed to best Captain America: The Winter Soldier at the box office on Friday.

Twentieth Century Fox's Rio 2 earned $12 million on Friday, improving upon the first film's $10.3 million first day grosses. Forbes reports that the film is projected to earn $45 million for the weekend, which should be good enough for the top spot at the box office.

The animated film has opened well internationally already earning $55 million. Rio 2 opens in more countries this weekend.

The Winter Soldier earned $11.9 million, which is a 67 percent drop from last Friday's $37 million, which is a normal drop for a Marvel film. The film is projected to earn about $40 million for the weekend, but Forbes notes that the superhero film could still manage to outperform Rio 2 and claim the top spot for another weekend.

According to The Hollywood Reporter, if The Winter Soldier does well this weekend at the box office, the film could already have outdone the first Captain America's total cume of $370.6 million.

Cheaply made horror film Oculus earned $4.9 million on Friday and could gross $12 million for its first weekend. The film only cost $5 million to put together.

Kevin Costner's new film Draft Day grossed $3.6 million for its first day and is projected to earn a middling $10.5 million. Divergent grossed another $2.4 million to place fifth at the box office, and estimates have the film earning $7.3 million.