24 Kasım 2020 Salı

ffmpeg Komutu Main Options File Format Seçeneği

Giriş
Açıklaması şöyle
Force input or output file format. The format is normally auto detected for input files and guessed from the file extension for output files, so this option is not needed in most cases.
Girdi veya çıktının formatını belirtir. Bu seçeneğe çoğunlukla ihtiyaç duyulmaz çünkü format otomatik olarak bulunabilir.

-f alsa
Bir örnek burada

-f concat 
Eğer dosyaları birleştirmek istersek şöyle yaparız.
ffmpeg -f concat -i joinlist.txt -c copy joinedfile.mp4
joinlist.txt dosyasının içi şöyle olmalıdır.
file 'vid1.avi'
file 'black_screen_video.mp4'
file 'vid2.avi'
file 'black_screen_video.mp4'
file 'vid3.avi'
file 'black_screen_video.mp4'
...
Sanırım dosya şöyle de olabilir.
Part1.mp4
Part2.mp4
Part3.mp4
-f dshow - directshow cihazından görüntü alır
USB cameranın yakaladığı görüntü http üzerinden sunulur.
ffmpeg -f dshow -i video="A4TECH USB2.0 PC Camera" -r 25 -s 320x240 
 -vcodec libx265 -preset ultrafast -tune zerolatency  
 http://119.81.216.43:8090/feed1.ffm
-f rtp
RTP Nedir?
RTP bir transport protokolü. Açıklaması şöyle
RTP is real time protocol used for transporting audio and video in real time. Transport used can be unicast, multicast or broadcast, depending upon transport address and port. Besides transporting RTP does lots of things for you like packetization, reordering, jitter control, QoS, support for Lip sync.....
Örnek
İki tane rtp akımın birleştirmek ve yine rtp olarak sunmak için şöyle yaparız.
ffmpeg -f rtp -i rtp://196.1.110.249:8977 -f rtp -i rtp://196.1.110.249:8999
-filter_complex amix=inputs=2:duration=longest:dropout_transition=3
-f rtp rtp://192.168.105.207:8004
-f rtsp
RTSP Nedir?
 Açıklaması şöyle
... you can think of RTSP as a "VCR controller", the protocol allows you to specify which streams (presentations) you want to play, it will then send you a description of the media, and then you can use RTSP to play, stop, pause, and record the remote stream. The media itself goes over RTP.
RTMP Nedir?
RTMP de bir streaming protokolü. Sadece TCP kullanır. FlashPlayer içindir.

Örnek
rtps'i flv olarak vermek için şöyle yaparız
ffmpeg -i rtsp://url -c copy -an -f flv rtmp://localhost/live
-f v4l2 formatı
-i ile belirtilen device'tan v4l2 olarak okuyup diğer device'lara yazmak için şöyle yaparız.
# duplicate webcam to virtual devices
ffmpeg -f v4l2 -i /dev/video0 -f v4l2 /dev/video1 -f v4l2 /dev/video2

Hiç yorum yok:

Yorum Gönder