ffmpeg slideshow komutları

Ocak 30, 2019 § Yorum yok § Kalıcı bağlantı

Some completed ffmpeg command to create slideshow video with effect from images or edit video

Blend Effect slideshow video

ffmpeg -framerate 20 \
-loop 1 -t 0.5 -i 1.jpg \
-loop 1 -t 0.5 -i 2.jpg \
-loop 1 -t 0.5 -i 3.jpg \
-loop 1 -t 0.5 -i 4.jpg \
-c:v libx264 \
-filter_complex " \
[1:v][0:v]blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b1v]; \
[2:v][1:v]blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b2v]; \
[3:v][2:v]blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))'[b3v]; \
[0:v][b1v][1:v][b2v][2:v][b3v][3:v]concat=n=7:v=1:a=0,format=yuv420p[v]" -map "[v]" out.mp4

Zoom and blend effect slideshow video

ffmpeg -y \
 -loop 1 -i 1.jpg \
 -loop 1 -i 2.jpg \
 -loop 1 -i 3.jpg \
 -filter_complex " \
[0:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,trim=duration=5,blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))',setpts=PTS-STARTPTS[v0]; \
[1:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,trim=duration=5,blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))',setpts=PTS-STARTPTS[v1]; \
[2:v]zoompan=z='min(zoom+0.0015,1.5)':d=125,trim=duration=5,blend=all_expr='A*(if(gte(T,0.5),1,T/0.5))+B*(1-(if(gte(T,0.5),1,T/0.5)))',setpts=PTS-STARTPTS[v2]; \
[v0][v1][v2] concat=n=3:v=1:a=0, format=yuv420p[v]" -map '[v]' -c:v libx264 -pix_fmt yuvj420p -q:v 1 out.mp4

Zoomout and Fade

ffmpeg \
-t 5 -i 1.jpg \
-t 5 -i 2.jpg \
-t 5 -i 3.jpg \
-t 5 -i 4.jpg  -filter_complex " \
[0:v]zoompan=z='min(max(zoom,pzoom)+0.015,2)':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=out:st=4:d=1[v0]; \
[1:v]zoompan=z='min(max(zoom,pzoom)+0.015,2)':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=2[v1]; \
[2:v]zoompan=z='min(max(zoom,pzoom)+0.015,2)':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=2[v2]; \
[3:v]zoompan=z='min(max(zoom,pzoom)+0.015,2)':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]; \
[v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[v]" -map "[v]" -t 40 out_fade.mp4

Zoomin and Fade

ffmpeg \
-t 5 -i 1.jpg \
-t 5 -i 2.jpg \
-t 5 -i 3.jpg \
-t 5 -i 4.jpg  -filter_complex " \
[0:v]zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.015))':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=out:st=4:d=1[v0]; \
[1:v]zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.015))':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=2[v1]; \
[2:v]zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.015))':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=2[v2]; \
[3:v]zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.015))':s=1080x1080:d=50:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)',fade=t=in:st=0:d=1,fade=t=out:st=4:d=1[v3]; \
[v0][v1][v2][v3]concat=n=4:v=1:a=0,format=yuv420p[v]" -map "[v]" -t 40 out_fade.mp4

Zoom a image

ffmpeg -framerate 30 -loop 1 -i 1.jpg -filter_complex "[0:v]zoompan=z='min(max(zoom,pzoom)+0.015,1.5)':d=1.5:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1080x1080,trim=duration=5[v]" -map "[v]" -y zoom.mp4
ffmpeg -framerate 30 -loop 1 -i 1.jpg -filter_complex "[0:v]zoompan=z='min(zoom+0.015,1.5)':d=1.5:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1080x1080,fps=fps=30,trim=duration=5[v]" -map "[v]" -y -pix_fmt yuv420p zoom.mp4

Insert text in video

ffmpeg -i input.mp4 -vf drawtext="fontfile=./font.ttf: \
text='text': fontcolor=white: fontsize=24: box=1: boxcolor=black@0.5: \
boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -codec:a copy output.mp4

Insert multi text in a video

ffmpeg -i input.mp4 -vf "[in]drawtext=fontsize=18:fontcolor=Green:fontfile='./font.ttf':te‌​xt='text1':x=(w)/2:y=(h)-25, drawtext=fontsize=18:fontcolor=Green:fontfile='./font.ttf':text='text2':x=(w)/1.2:y=(h)-25[out]" -codec:a copy text.mp4

Insert text in video (dynamic position)

ffmpeg -i input.mp4 -vf drawtext="fontsize=30:fontfile=./font.ttf:text='text':x=if(eq(mod(t\,1)\,0)\,rand(0\,(w-text_w))\,x):y=if(eq(mod(t\,1)\,0)\,rand(0\,(h-text_h))\,y):box=1: boxcolor=black@0.5: \
boxborderw=5" -codec:a copy text1.mp4

Insert image in video

ffmpeg -i input.mp4 -i logo.png -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" -pix_fmt yuv420p -c:a copy logo.mp4

Video from one image

ffmpeg -loop 1 -i 1.jpg -c:v libx264 -t 15 -pix_fmt yuv420p -vf scale=1080:1080 static_img.mp4

Dynamic video view

ffmpeg -i static_img.mp4 -filter:v "crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*1):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*2)" dynamic_view.mp4
ffmpeg -i merge_img.mp4 -filter:v "crop=in_w/4:in_h:t*100:0" dynamic_view_merge_img.mp4

Merge images

ffmpeg -pattern_type glob -i "*.jpg" -filter_complex "tile=4x1:margin=10:padding=4" merged_img.jpg

Kaynak:https://github.com/letungit90/ffmpeg_memo#ffmpeg_memo
https://trac.ffmpeg.org/wiki/StreamingGuide
FFmpeg – the swiss army knife of Internet Streaming – part II

ffmpeg Kullanımı

Ocak 30, 2019 § Yorum yok § Kalıcı bağlantı

Contents

  1. Basic FFmpeg command notation
  2. Transcode a stream with FFmpeg
  3. Transcode an RTSP or RTP IP camera source
  4. Transcode an MPEG-TS stream
  5. Transcode a native RTP stream
  6. Stream over a different outgoing protocol
  7. Stream over RTMP
  8. Stream over RTSP/RTP
  9. Other FFmpeg command line examples
  10. List available devices
  11. Convert .ts source files to .mp4
  12. Synchronize audio and video that start at different timecodes
  13. Analyze an FFmpeg stream using logs and FFprobe
  14. Save a live stream as .mp4
  15. Get encoding properties

Basic FFmpeg command notation
A basic FFmpeg command uses the format

ffmpeg [input-options] -i [input-file] [output-options] [output-stream-URI]

Where:

[input-options] apply to the input, or source, file. For example, you can use -s to specify the size of the file.
[input-file] is the video file or the stream URL.
[output-options] apply to the output, or destination. For example, the -f option specifies the output container format.
[output-stream-URI] is the destination stream URI. The format of the URI depends on the output container format.

Transcode a stream with FFmpeg
Here are a few examples that use FFmpeg to transcode an RTSP, RTP, or MPEG-TS source stream.

Transcode an RTSP or RTP IP camera source

ffmpeg -i "rtsp://[camera-ip-address]/[camera-URI-syntax]" -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -b:v 1024k -bufsize 1216k -maxrate 1280k -preset medium -profile: v main -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000

Transcode an MPEG-TS stream

ffmpeg -i "udp://localhost:[port]" -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -b:v 1024k -bufsize 1216k -maxrate 1280k -preset medium -profile: v main -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000

Transcode a native RTP stream

ffmpeg -i "unicast.sdp" -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -b:v 1024k -bufsize 1216k -maxrate 1280k -preset medium -profile: v main -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vbsf h264_mp4toannexb -f mpegts udp://127.0.0.1:10000

Stream over a different outgoing protocol
You can deliver FFmpeg streams using RTMP and RTSP/RTP, as shown in the following examples.

Stream over RTMP
To deliver a stream using RTMP, change the output portion of the FFmpeg URL from -f mpegts udp://127.0.0.1:10000 to -f flv rtmp://127.0.0.1/live/myStream.

The RTMP URL must follow the format

rtmp://[wowza-ip-address]:1935/[application]/[stream-name]

Where:

[wowza-ip-address] is the IP address of your Wowza Streaming Engine server.
[application] is the name of your Wowza Streaming Engine application (such as live or vod).
[stream-name] is the name of the stream in the Wowza Streaming Engine application.

Stream over RTSP/RTP
To deliver a stream using RTSP/RTP, change the output portion of the FFmpeg URL from -f mpegts udp://127.0.0.1:10000 to -f rtsp rtsp://127.0.0.1:1935/live/myStream.sdp.

The RTSP URL must follow the format

rtsp://[wowza-ip-address]:1935/[application]/[stream-name]

Where:

[wowza-ip-address] is the IP address of your Wowza Streaming Engine server.
[application] is the name of your Wowza Streaming Engine application (such as live or vod).
[stream-name] is the name of the stream in the Wowza Streaming Engine application.

Other useful FFmpeg commands

List available devices
Get a list of available hardware devices, such as webcams and microphones:

ffmpeg -list_devices true -f dshow -i dummy

Convert .ts source files to .mp4
Convert a .ts file (or any FFmpeg-compatible source) to as .mp4 for VOD playback with Wowza Streaming Engine:

ffmpeg -i input.ts -c:vcopy -c:a copy output.mp4

Synchronize audio and video that start at different timecodes
Wowza Streaming Engine doesn’t use the edit lists that some video recorders use to synchronize audio and video in a .mp4 or .mov container when the audio and video start at different timecodes. Instead, the following FFmpeg commands create separate audio and video renditions of the file in .mkv format and remove a specified number of seconds, in this case 4, from the beginning of the file. Then, the video and audio files are remuxed to create an .mp4 file that is, in this example, 5 seconds shorter. Adjust the number of seconds removed from the file as needed to synchronize your audio and video.

ffmpeg -y -ss 4 -i source.mp4 -c:v copy -an source_video.mkv
ffmpeg -y -ss 4 -i source.mp4 -vn -c:a copy source_audio.mkv
ffmpeg -y -i source_video.mkv -i source_audio.mkv -c:v copy -c:a copy source_trim.mp4

Analyze an FFmpeg stream using logs and FFprobe
You can study a Wowza Streaming Engine access log file to see how your stream is encoding. A bad keyframe interval can cause the length of chunks (segments) to vary, which can lead to client buffering and connection timeouts.

Here’s an example from a Wowza Streaming Engine access log file that shows a healthy Apple HLS stream. This particular stream has a frame rate is 29.970 fps with a 2-second GOP.

In the example, a = audio frames, v = video frames, and k = keyframes.

a/v/k:469/300/5 duration:10000
a/v/k:471/299/5 duration:10000
a/v/k:469/300/5 duration:10001
How can you tell the stream is healthy? First, the segments are within 1 ms of being the same length. Although the first segment is slightly shorter, typically if the first timecode in the live stream isn’t zero, which would account for the discrepancy. This is expected behavior, but in some edge cases it may cause an issue with the player reconnecting when the stream first starts.

In addition, the GOP (the number of video frames divided by the number of keyframes) is consistently 60. Due to the nature of a noninteger-based GOP there will be some variance in the number of frames in the live stream.

Here’s an example of a live stream whose playback might be suffering:

a/v/k:469/300/5 duration:10000
a/v/k:461/295/5 duration:9843
a/v/k:459/294/8 duration:9810
a/v/k:537/344/14 duration:11478
Not only do the segment lengths vary from 9810 ms to 11478 ms but the group of pictures also varies greatly, from 60 for the first segment to 24.75 for the last. As a result, players may disconnect or buffer out. And if the keyframes don’t align, players will be unable to switch to a different resolution.

In addition to using logs to assess an FFmpeg live encode, you can analyze it using FFprobe.

Save a live stream as .mp4
Save a minute or more of a live stream from Wowza Streaming Engine as a .mp4 file to run through FFprobe:

ffmpeg -i [live-url] -codec copy -f mpegts -y out.ts ffmpeg -i [live-url] -codec copy -f mp4 -y out.mp4

Get encoding properties

ffprobe -show_streams [stream-name]

Kaynak:https://www.wowza.com/docs/how-to-live-stream-using-ffmpeg-with-wowza-streaming-engine

FFmpeg İle Restream

Ocak 30, 2019 § Yorum yok § Kalıcı bağlantı

Re-streaming is when a server broadcasts an encoded video file as though it were a live stream. To re-stream using FFmpeg, use the -re option when encoding the video file for Wowza Streaming Engine™ media server software. The -re option instructs the encoder to read the source at its native frame rate. This slows the stream down to simulate live streaming and mitigates buffering and memory buildup that can disrupt playback.

Note: FFmpeg is updated frequently. Download the current version and read current documentation at ffmpeg.org.

Contents
Re-stream sample.mp4
Re-stream using passthrough
Re-stream RTSP with password authentication
Re-stream RTP with SDP
Re-stream UDP-based MPEG-TS
Re-stream TCP-based MPEG-TS
Re-stream UDP-based RTSP
Re-stream TCP-based RTSP
Re-stream RTMP
Re-stream to MP4

Re-stream sample.mp4

In a Terminal window, enter one of the following commands.
For a low-bitrate, low-complexity, low-quality stream that can be played on most devices and systems:

ffmpeg -re -i "%WMSAPP_HOME%/content/sample.mp4" -pix_fmt yuv420p -vsync 1 -threads 0 -vcodec libx264 -r 30 -g 60 -sc_threshold 0 -b:v 512k -bufsize 640k -maxrate 640k -preset veryfast -profile:v baseline -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -bsf:v h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

For a higher-quality stream:

ffmpeg -re -i "%WMSAPP_HOME%/content/sample.mp4" -pix_fmt yuv420p -vsync 1 -threads 0 -vcodec libx264 -r 30 -g 60 -sc_threshold 0 -b:v 640k -bufsize 768k -maxrate 800k -preset veryfast -profile:v baseline -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -bsf:v h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

Re-stream using passthrough
Content can also be re-streamed by passing the existing encode though FFmpeg without re-encoding. For passthrough re-streaming, use the -codec option and set it to copy. This example re-streams sample.mp4 as a passthrough instead of the full encode shown in the previous example.

ffmpeg -re -i "%WMSAPP_HOME%/content/sample.mp4" -codec copy -bsf:v h264_mp4toannexb -f mpegts udp://127.0.0.1:10000?pkt_size=1316

Re-stream RTSP with password authentication
This example re-streams sample.mp4 with user authentication, level 3.0 logging verbosity, a 24-fps frame rate, 2-second keyframe frequency, 310 kbps bitrate, and 44.1 kHz stereo audio.

ffmpeg -re -i "%WMSAPP_HOME%/content/sample.mp4" -pix_fmt yuv420p -vsync 1 -threads 0 -vcodec libx264 -r 30 -g 60 -sc_threshold 0 -b:v 640k -bufsize 768k -maxrate 800k -preset veryfast -profile:v baseline -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -f rtsp rtsp://username:password@[wowza-address]:1935/live/myStream

Re-stream RTP with SDP
This example captures local hardware devices, uses a 15-fps frame rate, 8-bit color, and generates an SDP file that contains metadata about the streaming session.

ffmpeg -f dshow -s 640x480 -r 15 -i video="Logitech HD Pro Webcam C920" -f dshow -i audio="Microphone (HD Pro Webcam C920)" -pix_fmt yuv420p -vsync 1 -threads 0 -vcodec libx264 -r 15 -g 30 -sc_threshold 0 -b:v 640k -bufsize 768k -maxrate 800k -preset veryfast -profile:v baseline -tune film -an -f rtp rtp://127.0.0.1:10000 -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vn -f rtp rtp://127.0.0.1:10002 > 10000.sdp

Re-stream UDP-based MPEG-TS
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -bsf:v h264_mp4toannexb -f mpegts udp://[wowza-address]:1234?pkt_size=1316

Re-stream TCP-based MPEG-TS
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -bsf:v h264_mp4toannexb -f mpegts tcp://[wowza-address]:1234?listen

Re-stream UDP-based RTSP
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -f rtsp rtsp://username:password@[wowza-address]:1935/live/myStream

Re-stream TCP-based RTSP
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -rtsp_transport tcp -f rtsp rtsp://username:password@[wowza-address]:1935/live/myStream

Re-stream RTMP
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -f flv rtmp://username:password@[wowza-address]:1935/live/myStream

Re-stream to MP4
In a Terminal window, enter:

ffmpeg -re -i inputfile.mp4 -codec copy -f mp4 output.mp4

Kaynak:https://www.wowza.com/docs/how-to-live-stream-using-ffmpeg-with-wowza-streaming-engin

ffmpeg ile videodan kaliteli gif yapmak

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

Video framelerini çıkaralım:(2/1 değiştirilebilir, 1 saniye için 2 resim çıkart demek, -vf fps=1/5 de kullanılabilir. 5 saniye için 1 frame kullan demektir. Bütün keyframeleri çıkarmak için -vf “select=eq(pict_type\,I)” -vsync vfr kullanılabilir. Dosya isminin %03d.jpg olması 000.jpg, 001.jpg, 002.jpg, 003.jpg vs demektir.)

mkdir frames
ffmpeg -i screen-recording.mov -r 2/1 frames/%03d.png
veya
ffmpeg -i screen-recording.mov -vf fps=1/5 frames/%03d.png -hide_banner

Optional: crop the frames to 600x400px using 824,690 as top/left

mkdir cropped
convert ??.png -crop 600x400+824+690 cropped/

Palet oluşturalım:

ffmpeg -i cropped/%02d.png -vf palettegen palette.png

Gif oluşturalım (6*PTS gif animasyonu yavaşlatmak için konuldu)

ffmpeg -v warning -i cropped/%02d.png -i palette.png  -lavfi "paletteuse,setpts=6*PTS" -y out.gif

Kaynak:http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

youtube video tavsiyeleri

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

https://support.google.com/youtube/answer/1722171?hl=en

Postgresql Çalışan Aktif Sorgular

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

SELECT pg_stat_activity.current_query, pg_class.relname, pg_locks.* from pg_class, pg_locks, pg_stat_activity where pg_class.relfilenode=pg_locks.relation and pg_stat_activity.procpid=pg_locks.pid;

Log sort

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

cut -d field seperator, -f filedleri almak için 
sort:
-r reverse
-t field seperator
-k 2. fielde göre sırala
-n numerik
[root@vt02 pg_log]# head 1.txt| cut -d" " -f1,6 | sort -n -r -t ' ' -k 2
<172.16.42.34-2016-11-11 2.655
<172.16.42.37-2016-11-11 2.463
<172.16.42.41-2016-11-11 2.428
<172.16.42.34-2016-11-11 0.621
<172.16.42.37-2016-11-11 0.596
<172.16.42.41-2016-11-11 0.593
<172.16.42.45-2016-11-11 0.140
<172.16.42.34-2016-11-11 0.113
<172.16.42.37-2016-11-11 0.110
<172.16.42.41-2016-11-11 0.091

Postgresql Bir Tablodan Geri Dönüş

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

[root@vt02 ~]# su - postgres
-bash-3.2$ pg_restore --data-only --table=t_yay_kuruluslar /home/arsiv/arsiv_201301150659.sql > yay.pg

“vi yay.pg” ile copy içindeki t_yay_kuruluslar t_yay_kuruluslar_asil olarak değiştirilir

-bash-3.2$ psql
psql (9.0.4)
Type "help" for help.

postgres=# \c db
You are now connected to database "db".
xxx_db=# create TABLE t_yay_kuruluslar_asil as (select * from t_yay_kuruluslar);
xxx_db=# TRUNCATE t_yay_kuruluslar_asil ;
xxx_db=# UPDATE t_yay_kuruluslar t1 set adres=t2.adres from t_yay_kuruluslar_asil t2 where t1.yayinci_id=t2.yayinci_id;
xxx_db=# drop table t_yay_kuruluslar_asil ;

Postgresql Tekrar Tespiti

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

select count (ALL dosya_adi) as all_dosya_adi, count(DISTINCT dosya_adi) as dis_dosya_adi, count(*) as all_rows from t_kayit where dosya_adi ilike '%mp4';
select count (ALL dosya_adi) as all_dosya_adi, count(DISTINCT dosya_adi) as dis_dosya_adi, count(*) as all_rows from t_kayit where dosya_adi ilike '%mp3';

Linux route eklemek

Ocak 28, 2019 § Yorum yok § Kalıcı bağlantı

route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.5.1 dev bond0
route add -net 192.168.5.0 netmask 255.255.255.0 dev bond0

Neredeyim ben!?

Ocak, 2019 arşivinde geziniyorsun.