Changes between Version 5 and Version 6 of linux/media
- Timestamp:
- 02/19/2019 10:36:57 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
linux/media
v5 v6 354 354 # upscale 355 355 gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240 ! \ 356 v4l2 convert ! \356 v4l2video8convert ! \ 357 357 video/x-raw,width=640,height=480 ! kmssink can-scale=false 358 358 # downscale 359 359 gst-launch-1.0 videotestsrc ! video/x-raw,width=640,height=480 ! \ 360 v4l2 convert ! \360 v4l2video8convert ! \ 361 361 video/x-raw,width=320,height=240 ! kmssink can-scale=false 362 362 # rotate 363 363 gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240 ! \ 364 v4l2 convert extra-controls=cid,rotate=90 ! \364 v4l2video8convert extra-controls=cid,rotate=90 ! \ 365 365 video/x-raw,width=240,height=320 ! kmssink can-scale=false 366 366 # hflip 367 367 gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240 ! \ 368 v4l2 convert extra-controls=cid,horizontal_flip=1 ! \368 v4l2video8convert extra-controls=cid,horizontal_flip=1 ! \ 369 369 video/x-raw,width=640,height=480 ! kmssink can-scale=false 370 370 # vflip 371 371 gst-launch-1.0 videotestsrc ! video/x-raw,width=320,height=240 ! \ 372 v4l2 convert extra-controls=cid,vertical_flip=1 ! \372 v4l2video8convert extra-controls=cid,vertical_flip=1 ! \ 373 373 video/x-raw,width=640,height=480 ! kmssink can-scale=false 374 374 }}} 375 375 - note the above examples force the input format (resolution in this case) to differ from the output format otherwise gstreamer will bypass the v4l2convert entity thinking it not necessary as gstreamer does not understand the flip/rotation properties. GStreamer master (in development) adds the 'disable-passthrough' property which can be enabled to force disabling passthrough 376 * scale/rotate/flip using imx-media capture device and KMS display driver (can use dmabufs for this as they are all imx hardware entitites): 377 {{{#!bash 378 # scale sensor input to 720p display 379 gst-launch-1.0 v4l2src device=$DEVICE ! \ 380 v4l2video8convert output-io-mode=dmabuf-import ! \ 381 video/x-raw,width=1280,height=720 ! \ 382 kmssink can-scale=false 383 # scale sensor input to 1080p display 384 gst-launch-1.0 v4l2src device=$DEVICE ! \ 385 v4l2video8convert output-io-mode=dmabuf-import ! \ 386 video/x-raw,width=1920,height=1080 ! \ 387 kmssink can-scale=false 388 # scale/flip 389 gst-launch-1.0 v4l2src device=$DEVICE ! \ 390 v4l2video8convert output-io-mode=dmabuf-import extra-controls=cid,horizontal_flip=1 ! \ 391 video/x-raw,width=1920,height=1080 ! \ 392 kmssink can-scale=false 393 # scale/rotate 394 gst-launch-1.0 v4l2src device=$DEVICE ! \ 395 v4l2video8convert output-io-mode=dmabuf-import extra-controls=cid,rotate=90 ! \ 396 video/x-raw,width=720,height=1280 ! \ 397 kmssink can-scale=false 398 }}} 376 399 377 400 … … 402 425 # encode 403 426 gst-launch-1.0 v4l2src device=$DEVICE ! \ 404 v4l2 convert output-io-mode=dmabuf-import ! \427 v4l2video8convert output-io-mode=dmabuf-import ! \ 405 428 v4l2h264enc output-io-mode=dmabuf-import ! \ 406 429 rtph264pay ! udpsink host=$SERVER port=$PORT 407 430 # scale/encode 408 431 gst-launch-1.0 v4l2src device=$DEVICE ! \ 409 v4l2 convert output-io-mode=dmabuf-import ! \432 v4l2video8convert output-io-mode=dmabuf-import ! \ 410 433 video/x-raw,width=1440,height=960 ! \ 411 434 v4l2h264enc output-io-mode=dmabuf-import ! \ … … 413 436 # scale/flip/encode 414 437 gst-launch-1.0 v4l2src device=$DEVICE ! \ 415 v4l2 convert output-io-mode=dmabuf-import extra-controls=cid,horizontal_flip=1 ! \438 v4l2video8convert output-io-mode=dmabuf-import extra-controls=cid,horizontal_flip=1 ! \ 416 439 video/x-raw,width=1440,height=960 ! \ 417 440 v4l2h264enc output-io-mode=dmabuf-import ! \ … … 419 442 # scale/rotate/encode 420 443 gst-launch-1.0 v4l2src device=$DEVICE ! \ 421 v4l2 convert output-io-mode=dmabuf-import extra-controls=cid,rotate=90 ! \444 v4l2video8convert output-io-mode=dmabuf-import extra-controls=cid,rotate=90 ! \ 422 445 video/x-raw,width=1440,height=960 ! \ 423 446 v4l2h264enc output-io-mode=dmabuf-import ! \