DEV Community

SolBeen Kwon
SolBeen Kwon

Posted on

2 2

Gstreamer 명령어

윈도우에 창 띄우기

image

gst-launch-1.0 dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE ! video/x-raw,framerate=30/1 ! videoconvert ! autovideosink
Enter fullscreen mode Exit fullscreen mode
  • gst-launch-1.0
    gstreamer 명령어 프로그램

  • dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE
    화면 가져오는 플러그인, cursor TRUE 이면 마우스 커서도 포함됨
    0,0 위치부터 1920x1080(FHD) 크기만큼

  • video/x-raw,framerate=30/1
    비디오 포맷 30프레임

  • videoconvert
    비디오 프레임 변환

  • autovideosink
    화면에 출력

mp4로 저장하기

image

gst-launch-1.0 dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE ! video/x-raw,framerate=30/1 ! videoconvert ! queue ! x264enc threads=2 tune=zerolatency pass=5 quantizer=26 speed-preset=6 ! mp4mux fragment-duration=500 ! filesink location="a.mp4"
Enter fullscreen mode Exit fullscreen mode

각 항목들은 다음과 같다.

  1. gst-launch-1.0
    gstreamer 명령어 프로그램

  2. dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE
    화면 가져오는 플러그인, cursor TRUE 이면 마우스 커서도 포함됨
    0,0 위치부터 1920x1080(FHD) 크기만큼

  3. video/x-raw,framerate=30/1
    비디오 포맷 30프레임

  4. videoconvert
    비디오 프레임 변환

  5. queue

  6. x264enc threads=2 tune=zerolatency pass=5 quantizer=26 speed-preset=6
    x.264로 인코딩

  7. mp4mux fragment-duration=500
    mp4 파일로 래핑

  8. filesink location="a.mp4"
    a.mp4로 저장한다.

화면띄우면서 영상 저장

image

gst-launch-1.0 dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE ! video/x-raw,framerate=30/1 ! tee name="local" ! videoconvert ! queue ! x264enc threads=2 tune=zerolatency pass=5 quantizer=26 speed-preset=6 ! mp4mux fragment-duration=500 ! filesink location="a.mp4" local. ! videoconvert ! autovideosink
Enter fullscreen mode Exit fullscreen mode
  • gst-launch-1.0

gstreamer 명령어 프로그램

  • dxgiscreencapsrc x=0 y=0 width=1920 height=1080 cursor=TRUE

화면 가져오는 플러그인, cursor TRUE 이면 마우스 커서도 포함됨
0,0 위치부터 1920x1080(FHD) 크기만큼

  • video/x-raw,framerate=30/1

비디오 포맷 30프레임

  • tee name="local"

이 지점에서 분기 local로 분기함

  • videoconvert

비디오 프레임 변환

  • queue

다시 큐

  • x264enc threads=2 tune=zerolatency pass=5 quantizer=26 speed-preset=6

x.264로 인코딩

  • mp4mux fragment-duration=500

mp4 파일로 래핑

  • filesink location="a.mp4" local.

저장할 파일 이름과 여기서부터 local. 분기점 시작

  • videoconvert

비디오 프레임 변환

  • autovideosink

화면에 출력

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post