Looking for some advices for playing sequence of images with a sound track

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Looking for some advices for playing sequence of images with a sound track

Nicolas Bertrand-4
Hi
I develop a stop-motion tool : luciole. It takes snapshot from an
external device and allow play of taken snapshot. I use gstreamer for
making snapshot an play the movie.
I want to add the possibily of a playing a music or sound in the same
time the video is playing.
The input of the 'play' function is a sequence of image.

To mix a sound track in the play function. It is better to use an
audio-sink or use gnolin ?

I expect to implement also a 'seek' function, controlled by a scale bar
who allow to start the play at any time/frame.
For that function, what is the best gstreamer choice ?

N.B : the app is developed with python
Thanks in advance
Nico






------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Looking for some advices for playing sequence of images with a sound track

wl2776
Administrator
Nicolas Bertrand-4 wrote
I use gstreamer for making snapshot and play the movie.
I want to add the possibility of playing a music or sound in the same
time the video is playing.
The input of the 'play' function is a sequence of images.
I'd suggest using imagefreeze element to play images.
Then, use filesrc, multifilesrc, or appsrc to feed the images in. Appsrc would help you to create a sophisticated image sequence, if you need one. Also, it can help you to avoid storing images to disk, you your app generates them on the fly.
Usual sound playback chain would suit, if you have sound files on the disk.

So, to put it all together, you create a pipeline and put two chains in it:

1. <some image source, filesrc, or multifilesrc, or appsrc> ! decodebin2 ! imagefreeze ! video-sink

2. filesrc ! audio-decoder ! audio-sink

This can be accomplished in 3 calls:

gst_bin_add_many(pipeline, imagesrc, decodebin2, imagefreeze, videosink, audiofile_src, audio_decoder, audio_sink,NULL);
gst_element_link_many(imagesrc,decodebin2,imagefreeze,videosink,NULL);
gst_element_link_many(audiofile_src, audio_decoder, audio_sink,NULL);

Probably, it would be useful to add a couple of queues, to create several threads.

Nicolas Bertrand-4 wrote
To mix a sound track in the play function. It is better to use an audio-sink or use gnolin ?
I doubt, you can use gnonlin, because, afair, it doesn't support single images.
You must use audio-sink in any case, whether you use gnonlin or not, because gnonlin gives you only decoded streams, and you're on your own, when you want to play them or save to a file.

Nicolas Bertrand-4 wrote
I expect to implement also a 'seek' function, controlled by a scale bar
who allow to start the play at any time/frame.
For that function, what is the best gstreamer choice ?
As for filesrc and appsrc, they support seeking. For multifilesrc, consult manuals.

Nicolas Bertrand-4 wrote
N.B : the app is developed with python
Don't see any obstacles.
Reply | Threaded
Open this post in threaded view
|

Re: Looking for some advices for playing sequence of images with a sound track

Nicolas Bertrand-4

> I'd suggest using imagefreeze element to play images.
> Then, use filesrc, multifilesrc, or appsrc to feed the images in. Appsrc
> would help you to create a sophisticated image sequence, if you need one.
> Also, it can help you to avoid storing images to disk, you your app
> generates them on the fly.
> Usual sound playback chain would suit, if you have sound files on the disk.
>
>  
Okay thanks. I will try it

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Looking for some advices for playing sequence of images with a sound track

Nicolas Bertrand-4
In reply to this post by wl2776
On 07/09/2010 14:57, wl2776 wrote:

> Nicolas Bertrand-4 wrote:
>    
>> >  
>> >  I use gstreamer for making snapshot and play the movie.
>> >  I want to add the possibility of playing a music or sound in the same
>> >  time the video is playing.
>> >  The input of the 'play' function is a sequence of images.
>> >  
>>      
> I'd suggest using imagefreeze element to play images.
>    
Hi
I have some problems to use imagefreeze with a sequence of image.
Is it possible with imagefreeze to play a sequence of image at a given
framerate ?

For example play a sequence of image as a movie :
image_001.png
image_002.png
...
image_010.png
at a framereta of 1/25s for example ?

I'm looking to turning the image sequence as a video to allow
implementation of seek/position function

Cheers
Nico



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel