Hy,
I am recording Microphone and Webcam with GStreamer. To record them I am creating two Pipelines because I need a seperate audio and video file. After Recording I play these two files with two seperate Playbins. If I do this the audio/video is a bit out of sync. So I tried to use the Clock from audio and give it to the video playbin (this is the GstSystemClock ... wich is default I think). I looked at the playback time (queryDuration) of my audio and my video file and there seems to be a 0.2 Second gap between them. Would be great if someone could help me figure out where I miss the sync. Is it even possible to create perfectly synced audio and video with two different pipelines? And how do I sync two playbins? Thx for any help!! |
I would record to one file, and then if you need to get only one part
extract only that part from the file. There are many ways to do that that I would guess are easier than getting two files in sync after the fact. On 01/24/2012 07:19 AM, FastRidingZebra wrote: > Hy, > > I am recording Microphone and Webcam with GStreamer. To record them I am > creating two Pipelines because I need a seperate audio and video file. > > After Recording I play these two files with two seperate Playbins. > If I do this the audio/video is a bit out of sync. So I tried to use the > Clock from audio and give it to the video playbin (this is the > GstSystemClock ... wich is default I think). > > I looked at the playback time (queryDuration) of my audio and my video file > and there seems to be a 0.2 Second gap between them. > > Would be great if someone could help me figure out where I miss the sync. Is > it even possible to create perfectly synced audio and video with two > different pipelines? And how do I sync two playbins? > > Thx for any help!! > > -- > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Audio-Video-Sync-with-Playbin-2-Pipelines-tp4323843p4323843.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by FastRidingZebra
Real experts can give you more advice on that, but I may ask why are you using two separate pipelines? If you have different sources for audio and video, but you want to play them synchronously, create two chains, but add them to the same pipeline. Actually I'm doing this in my currently developed application - I'm using gnonlin to play fragments of video files and I have two gnlcomposition chains: one for audio and the other for video; I add both chains to a single pipeline and everything is in perfect sync.
|
I´m not very familiar with Chains. Maybe because I´m using GStreamer Java.
Could you maybe give an Exapmple of how to feed a Pipeline with two Chains and would this be possible with a Playbin or do I have to build my own Pipeline? Thanks for your help. |
This post was updated on .
Pipeline is just a container for any elements.
Add video elements, link them together. Then add all audio elements and link them together. Done. If you use just two playbins with nothing else, add both playbins to the pipeline and from there control the playback (Play, Pause, Seek, etc.) via the pipeline. That's it. |
Thx for your help so far... did not know that I could use a Pipeline for this.
After I did what you suggested I have a problem now: It somehow seems that my Recording Pipe containing my Videopipe and my Audiopipe is starting the Recording sequencially. There is a 10 to 20 second gap between audio and video Recording. For example: If I add video first, than audio and than start my Recording Pipe - my Video is about 30 Sec long and my Audio only 15 Sec (audio recording started 15 Sec after video recording). If I add Audio first and than video. Video and Audio have the same length, but my video is frozen for the first 10 to 20 seconds. ... do I have to tell the Pipeline to start all Elements immediately, or am I missing something? |
Free forum by Nabble | Edit this page |