tuxmartin

gstreamer ring buffer

Aug 5th, 2015
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.93 KB | None | 0 0
  1. $ gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! capsfilter name=mycapsfilter caps=video/x-raw,width=1280,height=720 ! valve name=valve drop=0 ! queue2 ! x264enc tune=zerolatency ! queue ! mp4mux name=m ! filesink location=/tmp/file.mp4 alsasrc device=hw:2,0 ! audioconvert ! audioresample ! lamemp3enc target=1 bitrate=64 cbr=true ! queue ! m.
  2. Setting pipeline to PAUSED ...
  3. Pipeline is live and does not need PREROLL ...
  4. Setting pipeline to PLAYING ...
  5. New clock: GstAudioSrcClock
  6. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
  7. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
  8. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  9. /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  10. /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  11. /GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  12. /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  13. /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  14. Redistribute latency...
  15. /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  16. /GstPipeline:pipeline0/GstCapsFilter:mycapsfilter.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  17. /GstPipeline:pipeline0/GstValve:valve.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  18. /GstPipeline:pipeline0/GstQueue2:queue2-0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  19. /GstPipeline:pipeline0/GstQueue2:queue2-0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  20. /GstPipeline:pipeline0/GstValve:valve.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  21. /GstPipeline:pipeline0/GstCapsFilter:mycapsfilter.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  22. /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  23. /GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:src: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  24. /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  25. /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  26. /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  27.  
  28.  
  29.  
  30. RING BUFFER:
  31.  
  32. $ gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! capsfilter name=mycapsfilter caps=video/x-raw,width=1280,height=720 ! valve name=valve drop=0 ! queue2 ring-buffer-max-size=8192 ! x264enc tune=zerolatency ! queue ! mp4mux name=m ! filesink location=/tmp/file.mp4 alsasrc device=hw:2,0 ! audioconvert ! audioresample ! lamemp3enc target=1 bitrate=64 cbr=true ! queue ! m.
  33. Setting pipeline to PAUSED ...
  34. Pipeline is live and does not need PREROLL ...
  35. Setting pipeline to PLAYING ...
  36. New clock: GstAudioSrcClock
  37. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-buffer-time = 200000
  38. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: actual-latency-time = 10000
  39. /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  40. /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  41. /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:src: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  42. /GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  43. /GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  44. /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = "audio/x-raw\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)44100\,\ format\=\(string\)S16LE\,\ channels\=\(int\)1"
  45. Redistribute latency...
  46. /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  47. /GstPipeline:pipeline0/GstCapsFilter:mycapsfilter.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  48. /GstPipeline:pipeline0/GstValve:valve.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  49. /GstPipeline:pipeline0/GstQueue2:queue2-0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  50. /GstPipeline:pipeline0/GstValve:valve.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  51. /GstPipeline:pipeline0/GstCapsFilter:mycapsfilter.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1"
  52. /GstPipeline:pipeline0/GstLameMP3Enc:lamemp3enc0.GstPad:src: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  53. /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  54. /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  55. /GstPipeline:pipeline0/GstMP4Mux:m.GstPad:audio_0: caps = "audio/mpeg\,\ mpegversion\=\(int\)1\,\ mpegaudioversion\=\(int\)1\,\ layer\=\(int\)3\,\ channels\=\(int\)1\,\ rate\=\(int\)44100"
  56. ERROR: from element /GstPipeline:pipeline0/GstX264Enc:x264enc0: GStreamer error: negotiation problem.
  57. Additional debug info:
  58. gstvideoencoder.c(1463): gst_video_encoder_chain (): /GstPipeline:pipeline0/GstX264Enc:x264enc0:
  59. encoder not initialized
  60. EOS on shutdown enabled -- waiting for EOS after Error
  61. Waiting for EOS...
Add Comment
Please, Sign In to add comment