I've been at this issue for a week now, and have gotten nowhere. (gstreamer's ambiguious and unhelpful "erronious pipeline" output doesn't help).
Using videotestsrc, and various files, the pipeline works great. Try to hook it to snowix however, and things get sour.
gst-launch-0.10 -m -t -v $VIDEO_SRC ! $VIDEOFORMAT ! mpeg2enc format=12 framerate=0 aspect=0 sequence-header-every-gop=true bitrate=10000 ! $VIDEOFORMATOUT ! filesink location=video.mpeg --gst-debug=*sink*:4
The variables are the exact same as a regular Snowmux installation. Everything else works fine, the issue lies in geting the Snowmix outpuit to play nice with mpeg2enc.
And no, gst1.0 with avenc_mpeg2video does not work as it does not allow setting the pts.
You seem to have CSS turned off.
Please don't fill out this field.
Need complete ini file and complete script to be able to help you.
However without any queue elements in your pipeline, the whole pipeline runs in a single thread, from fetching raw frames, encoding them and writing to disk. Depending on CPU, video geometry and frame rate, that may be too much for your hardware. Throw in a 'queue' element after shmsrc, and always also before a filesink as you never can now how long time a disk write operation will take.
MPEG-2 Output script: http://pastebin.com/7AVPeS4w
INI FIle: http://pastebin.com/Eg9F7WH9
I am testing as minimal of a pipe as possable before I add things, but now that you mention it, the leaky and queue should probably be added anyway. I have them elsewhere.
Whoops forgot to login before posting.
Your videoformat caps for the video from shmsrc in your pipeline is wrong. It's not rgb, but bgra (or argb but little endian) coming from shmsrc. Use the VIDEOFORMAT variable instead. Your encoder may need a videoconvert or ffmpegcolorspace for gstreamer-0.10 before it can encode input.
Try change the suggested and add a queue or two and let me know how it goes before I look into this more.
BTW, you ini file is not that interesting as you include all the basic stuff in a file not shown :-) So next time I need all.
WARNING: erroneous pipeline: link without source element
gst-launch-0.10 -m -t -v $VIDEO_SRC ! $VIDEOFORMAT ! $videoconvert ! queue ! mpeg2enc format=12 framerate=0 aspect=0 sequence-header-every-gop=true bitrate=10000 ! $VIDEOFORMATOUT ! queue ! filesink location=video.mpeg --gst-debug=*sink*:4
Basis INI: http://pastebin.com/mate4QL4
Try add 'echo' in front of 'gst-launch-0.10' and post result
gst-launch-0.10 -m -t -v shmsrc socket-path=/tmp/mixer1 do-timestamp=true ! video/x-raw, format=(string)BGRA, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, width=1280, height=720, framerate=30/1 ! queue ! mpeg2enc format=12 framerate=0 aspect=0 sequence-header-every-gop=true bitrate=10000 ! video/x-mpeg, alignment=au, stream-format=byte-stream, profile=(string)main ! queue ! filesink location=video.mpeg --gst-debug=*sink*:4
Try change $videoconvert to $VIDEOCONVERT.
Then it should work unless you also has gst-launch-1.0 installed.
You might consider change gst-launch-0.10 to $gstlaunch. Then the script gstreamer-settings detects your gstreamer version and sets the caps and elements for the variables like VIDEOCONVERT and VIDEOFORMAT etc.
Still getting an erronious pipeline. I have to use gst-launch as I have 1.0 installed.
There is a line in gstreamer-settings you can uncomment to force using gstreamer-0.10. The line is this
Change it to
That way it skips gstreamer 1.0 and sets caps for gstreamer-0.10 format including setting gstlaunch to gst-launch-0.10.
Your issue is that either you have to use the script to set your caps, parameters and elements or you have to do it your self. The latter requires that you know your GStreamer.
That was it. Now just need to remember the output format string. I have it somewhere. Thanks for the assistance. :)
Sign up for the SourceForge newsletter: