muxing and filesink

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

muxing and filesink

Peter Innerhofer
hello,

i have an issue with multiplexing and writing a stream to a file.

for example:
gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! avimux ! filesink location=test.avi

ok, this stream works fine. vlc can open and show codec meta data. but
now i send the stream to a udpsink and receive it.

gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! udpsrc host=127.0.0.1 port=5000

gst-launch udpsrc port=5000 ! video/mpeg, width=(int)640,
height=(int)480, framerate=(fraction)25/1, mpegversion=(int)4,
systemstream=(boolean)false ! avimux ! queue ! filesink location=test.avi

now the video wont play in vlc and i cant open it in video editing
programs which are not based on gstreamer, they can't find any codec details

ideas? what's wrong here, i have tried several multiplexer
(mpegtsmux,qtmux,ffmux_mp4), but its the same. shall i exit the pipeline
in an other way? (not just interrupting it)

i build a python script around this pipelines and i can start/stop the
stream with keyboard input, setting the pipelines to NULL and to
PLAYING.... sometimes the stream is playable in vlc, but mostly not.

thx
 peter

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: muxing and filesink

Sudarshan Bisht
In your first pipeline it should be udpsink , not udpsrc.

Another thing is that you are not properly setting up rtp packets of encoded data.
So I think your pipelines should look like this;

gst-launch videotestsrc ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace ! ffenc_mpeg4   ! rtpmp4vpay  ! udpsink host=127.0.0.1 port=5000 
 
gst-launch  udpsrc port=5000   ! application/x-rtp,media=video,payload=100,clock-rate=100000000,encoding-name=MP4V-ES  ! rtpmp4vdepay  ! video/mpeg,width=640,height=480,framerate=25/1,mpegversion=4,systemstream=false  ! avimux  ! filesink location=test.avi

And I could  play this file using gst-launch playbin uri=file:///home/maemo/test.avi



 

 
On Thu, Nov 18, 2010 at 10:02 PM, Peter Innerhofer <[hidden email]> wrote:
hello,

i have an issue with multiplexing and writing a stream to a file.

for example:
gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! avimux ! filesink location=test.avi

ok, this stream works fine. vlc can open and show codec meta data. but
now i send the stream to a udpsink and receive it.

gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! udpsrc host=127.0.0.1 port=5000

gst-launch udpsrc port=5000 ! video/mpeg, width=(int)640,
height=(int)480, framerate=(fraction)25/1, mpegversion=(int)4,
systemstream=(boolean)false ! avimux ! queue ! filesink location=test.avi

now the video wont play in vlc and i cant open it in video editing
programs which are not based on gstreamer, they can't find any codec details

ideas? what's wrong here, i have tried several multiplexer
(mpegtsmux,qtmux,ffmux_mp4), but its the same. shall i exit the pipeline
in an other way? (not just interrupting it)

i build a python script around this pipelines and i can start/stop the
stream with keyboard input, setting the pipelines to NULL and to
PLAYING.... sometimes the stream is playable in vlc, but mostly not.

thx
 peter

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: muxing and filesink

Sudarshan Bisht
In reply to this post by Peter Innerhofer

In your first pipeline it should be udpsink , not udpsrc.


Another thing is that you are not properly setting up rtp packets of encoded data.
So I think your pipelines should look like this;


gst-launch videotestsrc ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace ! ffenc_mpeg4   ! rtpmp4vpay  ! udpsink host=127.0.0.1 port=5000
 
gst-launch  udpsrc port=5000   ! application/x-rtp,media=video,payload=100,clock-rate=100000000,encoding-name=MP4V-ES  ! rtpmp4vdepay  ! video/mpeg,width=640,height=480,framerate=25/1,mpegversion=4,systemstream=false  ! avimux  ! filesink location=test.avi

And I could  play this file using gst-launch playbin uri=file:///home/maemo/test.avi

On Thu, Nov 18, 2010 at 10:02 PM, Peter Innerhofer <[hidden email]> wrote:
hello,

i have an issue with multiplexing and writing a stream to a file.

for example:
gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! avimux ! filesink location=test.avi

ok, this stream works fine. vlc can open and show codec meta data. but
now i send the stream to a udpsink and receive it.

gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! udpsrc host=127.0.0.1 port=5000

gst-launch udpsrc port=5000 ! video/mpeg, width=(int)640,
height=(int)480, framerate=(fraction)25/1, mpegversion=(int)4,
systemstream=(boolean)false ! avimux ! queue ! filesink location=test.avi

now the video wont play in vlc and i cant open it in video editing
programs which are not based on gstreamer, they can't find any codec details

ideas? what's wrong here, i have tried several multiplexer
(mpegtsmux,qtmux,ffmux_mp4), but its the same. shall i exit the pipeline
in an other way? (not just interrupting it)

i build a python script around this pipelines and i can start/stop the
stream with keyboard input, setting the pipelines to NULL and to
PLAYING.... sometimes the stream is playable in vlc, but mostly not.

thx
 peter

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: muxing and filesink

Sudarshan Bisht
One more thing,  I have used videotestsrc instead of v4l2src .

On Fri, Nov 19, 2010 at 8:10 AM, sudarshan bisht <[hidden email]> wrote:

In your first pipeline it should be udpsink , not udpsrc.


Another thing is that you are not properly setting up rtp packets of encoded data.
So I think your pipelines should look like this;


gst-launch videotestsrc ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace ! ffenc_mpeg4   ! rtpmp4vpay  ! udpsink host=127.0.0.1 port=5000

 
gst-launch  udpsrc port=5000   ! application/x-rtp,media=video,payload=100,clock-rate=100000000,encoding-name=MP4V-ES  ! rtpmp4vdepay  ! video/mpeg,width=640,height=480,framerate=25/1,mpegversion=4,systemstream=false  ! avimux  ! filesink location=test.avi

And I could  play this file using gst-launch playbin uri=file:///home/maemo/test.avi

On Thu, Nov 18, 2010 at 10:02 PM, Peter Innerhofer <[hidden email]> wrote:
hello,

i have an issue with multiplexing and writing a stream to a file.

for example:
gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! avimux ! filesink location=test.avi

ok, this stream works fine. vlc can open and show codec meta data. but
now i send the stream to a udpsink and receive it.

gst-launch v4l2src ! videoscale ! videorate !
video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace !
ffenc_mpeg4 ! udpsrc host=127.0.0.1 port=5000

gst-launch udpsrc port=5000 ! video/mpeg, width=(int)640,
height=(int)480, framerate=(fraction)25/1, mpegversion=(int)4,
systemstream=(boolean)false ! avimux ! queue ! filesink location=test.avi

now the video wont play in vlc and i cant open it in video editing
programs which are not based on gstreamer, they can't find any codec details

ideas? what's wrong here, i have tried several multiplexer
(mpegtsmux,qtmux,ffmux_mp4), but its the same. shall i exit the pipeline
in an other way? (not just interrupting it)

i build a python script around this pipelines and i can start/stop the
stream with keyboard input, setting the pipelines to NULL and to
PLAYING.... sometimes the stream is playable in vlc, but mostly not.

thx
 peter

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Regards,

Sudarshan Bisht



--
Regards,

Sudarshan Bisht

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: muxing and filesink

Peter Innerhofer
On 19.11.2010 11:16, sudarshan bisht wrote:
One more thing,  I have used videotestsrc instead of v4l2src .

On Fri, Nov 19, 2010 at 8:10 AM, sudarshan bisht <[hidden email]> wrote:

In your first pipeline it should be udpsink , not udpsrc.


Another thing is that you are not properly setting up rtp packets of encoded data.
So I think your pipelines should look like this;


gst-launch videotestsrc ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace ! ffenc_mpeg4   ! rtpmp4vpay  ! udpsink host=127.0.0.1 port=5000

 
gst-launch  udpsrc port=5000   ! application/x-rtp,media=video,payload=100,clock-rate=100000000,encoding-name=MP4V-ES  ! rtpmp4vdepay  ! video/mpeg,width=640,height=480,framerate=25/1,mpegversion=4,systemstream=false  ! avimux  ! filesink location=test.avi

And I could  play this file using gst-launch playbin uri=file:///home/maemo/test.avi


first of all, thanks for your answer.
but this pipeline doesn't solve my problem, vlc cant play the recorded video. (anyway the problem is not so big, and there are some workarounds) 

i already thought about the rtp payloader,  i could even make a rtp stream with control ports, but that’s quite an overhead and i think it doesn't solve my problems ether.

could it be a failure of the filesink? does the filesink add codec details, or make a header? vlc sometimes even thinks the file just has a audio track...

the reason why i want it to play with vlc is, that i think it is one of the most common player on all systems and i probably want to edit it further on
mfg
 peter

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: muxing and filesink

roope.jarvinen

Hi,

 

You need to run gst-launch with “-e” switch on receiver side to force EOS when you kill your pipeline, otherwise your file won’t be properly finalized.

 

--Roope

 

 

From: ext Peter Innerhofer [mailto:[hidden email]]
Sent: 19. marraskuuta 2010 13:41
To: [hidden email]
Subject: Re: [gst-devel] muxing and filesink

 

On 19.11.2010 11:16, sudarshan bisht wrote:

One more thing,  I have used videotestsrc instead of v4l2src .

On Fri, Nov 19, 2010 at 8:10 AM, sudarshan bisht <[hidden email]> wrote:

In your first pipeline it should be udpsink , not udpsrc.


Another thing is that you are not properly setting up rtp packets of encoded data.
So I think your pipelines should look like this;


gst-launch videotestsrc ! videoscale ! videorate ! video/x-raw-yuv,width=640,height=480,framerate=25/1 ! ffmpegcolorspace ! ffenc_mpeg4   ! rtpmp4vpay  ! udpsink host=127.0.0.1 port=5000

 
gst-launch  udpsrc port=5000   ! application/x-rtp,media=video,payload=100,clock-rate=100000000,encoding-name=MP4V-ES  ! rtpmp4vdepay  ! video/mpeg,width=640,height=480,framerate=25/1,mpegversion=4,systemstream=false  ! avimux  ! filesink location=test.avi

And I could  play this file using gst-launch playbin uri=<a href="file:///\\home\maemo\test.avi">file:///home/maemo/test.avi

 

first of all, thanks for your answer.
but this pipeline doesn't solve my problem, vlc cant play the recorded video. (anyway the problem is not so big, and there are some workarounds) 

i already thought about the rtp payloader,  i could even make a rtp stream with control ports, but that’s quite an overhead and i think it doesn't solve my problems ether.

could it be a failure of the filesink? does the filesink add codec details, or make a header? vlc sometimes even thinks the file just has a audio track...

the reason why i want it to play with vlc is, that i think it is one of the most common player on all systems and i probably want to edit it further on
mfg
 peter


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel