Re: Syncing audio from video

7 views
Skip to first unread message

claudio canepa

unread,
Nov 5, 2012, 11:53:38 AM11/5/12
to cocos2d discuss
Maybe trying different versions of avbin (which pyglet uses for video) ?

 


On Fri, Nov 2, 2012 at 7:07 PM, Blaine <fri...@gmail.com> wrote:
Hi guys,

My video layer plays video great, and the audio plays great too, just not in sync w/ the video. Got any tips?

My video layer:

It's like the audio is about a half second ahead of the video. I obviously have the above sample on mute (player.volume=0) for now, so please mind that.

--
You received this message because you are subscribed to the Google Groups "cocos2d discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cocos-discuss/-/943ifXa1HIgJ.
To post to this group, send email to cocos-...@googlegroups.com.
To unsubscribe from this group, send email to cocos-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cocos-discuss?hl=en.

Blaine

unread,
Nov 7, 2012, 10:35:05 AM11/7/12
to cocos-...@googlegroups.com
Thanks!

I upgraded ffmpeg to v1.0, avbin to the latest, and pyglet down to latest stable. Didn't seem to affect much, but I do think I get less data corruption problems with bad audio packets.

Ultimately, I found a format that "just works". I'm just converting everything to that format.

After building ffmpeg with --enable-libx264 and --enable-gpl:

cmd = '''ffmpeg -i \"%s\" -strict experimental -vcodec libx264 -vprofile high \\
-preset slow -b:v 5000k -maxrate 5000k -bufsize 5000k -acodec ac3 \"%s\"''' % (in_video, out_video)

does the trick.
Reply all
Reply to author
Forward
0 new messages