DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

SolBeen Kwon
SolBeen Kwon

Posted on

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

화면에 좜λ ₯

​

Top comments (0)

🌚 Life is too short to browse without dark mode