재밌는세상2019. 8. 27. 02:25

요즘 홍콩 민주화운동으로 더욱 주목받는 천안문 민주화운동. 1986년 6월 4일이었군요. 멀지도 않은 과거.

천안문광장 민주화 운동, 항쟁, 유혈사태.... 학살

Tiananmen Square. June 4th 1989

 

탱크맨이 막아서 탱크의 물결. 탱크맨을 close up한것보다 더 감동적인 사진입니다.

 

https://namu.wiki/w/%EC%B2%9C%EC%95%88%EB%AC%B8%206.4%20%ED%95%AD%EC%9F%81

 

천안문 6.4 항쟁 - 나무위키

학생들과 시민들이 후야오방의 추모를 위해 인민영웅기념비로 몰려들기 시작했으며, 수백 명의 대학생들로 시위대가 형성되었다. 중국정법대학의 대학원생들 약 600여명과 청년 교사들이 스스로 만든 화환을 들고 진혼곡을 부르면서 천안문 광장까지 행진했고, 약 60여명이 후야오방의 집에 문상을 갔다. 오후 3시 베이징대학 역사학과 학생 왕단이 교내에서 530위안을 모금해서 화환을 사 천안문 광장으로 보냈고, 후야오방의 집에 추도하러 갔다. 24시부터 베이징대학, 베

namu.wiki

https://en.wikipedia.org/wiki/Tank_Man

 

Tank Man - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search Anonymous man who stood in front of a column of Chinese tanks during the Tiananmen Square protests "Tankman" redirects here. For the operator of a military tank, see Tank § Crew. Coord

en.wikipedia.org

https://en.wikipedia.org/wiki/1989_Tiananmen_Square_protests

 

1989 Tiananmen Square protests - Wikipedia

From Wikipedia, the free encyclopedia Jump to navigation Jump to search PR China's pro-democracy movement in 1989 1989 Tiananmen Square protestsPart of Chinese democracy movement in 1989, Revolutions of 1989 and the Cold WarTiananmen Square in May 1988Date

en.wikipedia.org

 

Posted by 쁘레드
자동차이야기2019. 8. 26. 03:46

일본제품 불매가 열심히 일어날때 현대/기아/제네시스가 국민들에게 자랑스러운 브랜드가 되어야 하는데, 삼성과 현대차 모두 일본보다 조금 나은 수준이니 참 답답하네요.

 

현대차 미국 판매실적을 몇년전까지 잘 분석하다가 완전이 미국시장에서 맛이가면서 그냥 tracking을 그만뒀는데, 오늘 심심해서 제네시스 G90과 G80를 찾아보니 G90는 판매량이 챙피한지 공개하지 않기로 했나보네요. 거참. 아들에게 거져 넘겨주는 재벌들의 족벌체제가 문제지요. 그러니 경영자들이 부실해서 한국 최고의 기업도 될수 있었는데 좋은 모멤텀을 날려버린게 진짜 아쉽습니다.

 

http://www.goodcarbadcar.net/2015/11/genesis-g90-sales-stats-hyundai-monthly-yearly.html

http://www.goodcarbadcar.net/2015/10/genesis-g80-sales-figures-usa-canada-monthly-yearly/

 

Genesis G80 Sales Figures

Here you will find monthly and yearly Canadian and U.S. sales figures for the Genesis G80. Use the dropdown at the top right of this page or at GCBC’s Sales Stats home to find sales figures for any other vehicle currently on sale in North America. To see s

www.goodcarbadcar.net

G80도 잘 만들어 놓고 처음부터 잘못된 브랜딩으로 현대내에 제네시스에 비해 판매량이 40%이상이 줄엇는데 작년에는 장사도 못했네요. 올해는 모델 체인지때문에 또 200대도 나오겠네요.

 

G90는 혹시 중고가로는 얼마정도 하나 서치해보니, 판매대수가 많지가 않으니 중고물량도 많지가 않은데 캘리쪽에는 $28,988 에 하나가 있네요. MSRP가 7만불이 넘는데 3년정도되서 반값이하로 떨어지니, 이것도 많이 좋아진건데, 직접 사본 사람들은 정말 정 떨어질듯. 중고물량이 많으면 저 가격에서는 저는 아주 훌륭하다고 생각합니다.

미국 정식 홈페이지, 차는 잘 만들었는데 왜 망하게 그냥 뒀는지...

https://www.genesis.com/us/en/2019/genesis-g90.html/

 

제네시스(Genesis) 브랜드 - G90(EQ900), G80, G70 고급세단 | 제네시스

새로워진 제네시스가 주행 경험의 신세계로 초대합니다. 운전자의 완벽한 주행 경험을 위한 제네시스의 디자인과 성능 그리고 다양한 기능 및 스펙에 대해 알아보세요.

www.genesis.com

Posted by 쁘레드
Programming2019. 8. 21. 05:37

몇일동안 FFMPEG option을 찾아봤더니, FFMPEG front end tools들이 많더란.

Github link 가 있는 QWinFF를 소스를 받아 compile해봄. C++, QT4를 사용하는데 아주 간단하면서 아주 빠름. 여기서 조금 고쳐서 쓰면 되겠네. 비디오 붙이기랑 title넣기 몇가지만 더 있으면 그냥 settle하는건데.

 

그런데 FFMPEG은 option이 직관적이지 않아 아주 골치. 그량 transcoding하면 quality가 너무 안좋아짐. 뭐지...

QWinFF에 보면 Copy Audio/Copy Video (Do not re-encode) 라는 옵션을 체크하면 시간만 자르거나 할때 진짜 빠르고 퀄리티가꼭 같은데 그냥 default로 하면 완정 망한 비디오됨

Same Quantizer as Source라는 option이 있는데 FFMPEG option으로 -crf 23 이라고 나오는데, 현재 내 버전에서 인식을 못함. 아 된장.

 

video1          +    video 2 + video 3 = output.mp4  이게 안되나...

overlay. png +

------------------------------------------

QWinFF: http://qwinff.github.io/
AVANTI - FFmpeg/AviSynth GUI: http://avanti.arrozcru.com/
WinFF: http://winff.org/html_new/
FFmpegx (mac): http://www.FFmpegx.com/
Handbrake: http://handbrake.fr/
Mpeg streamclip: http://www.squared5.com/
FFmpegYAG (Windows / Linux): https://sourceforge.net/projects/ffmpegyag/

MAC에서는 FFworks https://www.ffworks.net/

 

https://github.com/amiaopensource/ffmpeg-amia-wiki/wiki/3)-Graphical-User-Interface-Applications-using-FFmpeg

 

amiaopensource/ffmpeg-amia-wiki

AMIA/DLF Hack day FFmpeg documentation, scripts and recipes geared toward archivists. - amiaopensource/ffmpeg-amia-wiki

github.com

------------------------------------------

Video 자르기 (codec copy no transcoding)


ffmpeg -y -i ./20190811_in.mp4 -strict experimental -vcodec copy -acodec copy -ss START -t END ./20190811_OUT.mp4

 

Video re-encoding이 필요할때는 원본화질을 보전하기 위해서 원본파일의 codec과 bitrate를 확인합니다. 아래 경우 video는 AVC, 24000k(23942kbps). Audio는 AAC, 156kbps. 원본보다 약간 roundup하는것이 좋을것 같음.

 


ffprobe ./INPUT.mp4

  Duration: 00:00:24.05, start: 0.000000, bitrate: 24233 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 23942 kb/s, SAR 1:1 DAR 16:9, 60.01 fps, 60 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2019-08-11T18:44:41.000000Z
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 156 kb/s (default)
    Metadata:
      creation_time   : 2019-08-11T18:44:41.000000Z
      handler_name    : SoundHandle

 

Overlay Title


ffmpeg -i ./INPUT.mp4 -i data/watermark.png -c:v nvenc -c:a aac -b:v 24000k -b:a 160k -filter_complex "[0:v][1:v]overlay=main_w-overlay_w:main_h-overlay_h" watermarked.mp4

 

Video 붙이기


ffmpeg -f concat -i mylist.txt -c copy output.mp4

https://orunson.tistory.com/entry/FFMPEG%EC%9C%BC%EB%A1%9C-%EB%B9%84%EB%94%94%EC%98%A4-%EB%B6%99%EC%9D%B4%EA%B8%B0

 

FFMPEG으로 비디오 붙이기

아래 두가지 방법이 가장 간단한듯. 아래글중 10초씩 자르는것과 붙이는 것, 앞에 Title자동으로 넣는것까지 3가지만 있으면 될듯. *concat demuxer $ cat mylist.txt file '/path/to/file1' file '/path/to/file2..

orunson.tistory.com

Posted by 쁘레드
Programming2019. 8. 20. 03:03

아래 두가지 방법이 가장 간단한듯. 아래글중 10초씩 자르는것과 붙이는 것, 앞에 Title자동으로 넣는것까지 3가지만 있으면 될듯.

 

*concat demuxer

$ cat mylist.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

$ ffmpeg -f concat -i mylist.txt -c copy output.mp4
$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Note: -safe 0 is not required if the paths are relative but it seems required.

 

*concat protocol

ffmpeg -i "concat:input1|input2" -codec copy output.mkv

 

https://superuser.com/questions/1059245/ffmpeg-join-two-mp4-files-with-ffmpeg-on-command-line

 

ffmpeg join two mp4 files with ffmpeg on command line

I can successfully join multiple files using the following command: ffmpeg -f concat -i input.txt -codec copy output.mp4 The only problem with this command is that you need to read the filepaths ...

superuser.com

https://stackoverflow.com/questions/7333232/how-to-concatenate-two-mp4-files-using-ffmpeg

 

How to concatenate two MP4 files using FFmpeg?

I'm trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I'm converting the two files into .ts files and then concatenating them and ...

stackoverflow.com

 

Posted by 쁘레드
IT이야기2019. 8. 20. 03:00

예전에는 웹서버랑 어떤 프레임워크 및 언어 이런것만 나오더니 요즘은 광고 platform, Docker 등 엄청 뭐가 많이 붙어있어요. 이 웹사이트는 어떻게 만들어졌을까 궁금할때 참 좋습니다.

https://www.wappalyzer.com/ 

 

클리앙은 아주 깔끔한 편이네요.

Posted by 쁘레드
Programming2019. 8. 20. 02:11

lsof - list open files

!{command} ; last command 
vi !$   ; last argument 
!! ; last command 
"CTRL+R" for Repeating the Last Matching Command 
history | grep "keyword" 
egrep "ERROR|Exception" *.xml 
grep Exception logfile.txt | grep -v ERROR 
grep -c "Error" logfile.txt 
grep --context=6 successful logfile.txt 
grep 'Error|Exception' logfile.txt 
grep -i Error logfile.txt 
zgrep -i Error *.gz 
grep -w ERROR logfile.txt ; search whole word 
grep -l ERROR *.log  ; display file name which contains pattern 

Using Alias .bashrc or .profile 
pushd, popd, cd --- and cd ~ command. cd --- is best 

Ctrl+Z to suspend it and fg 1 or fg 2

 

https://dev.to/javinpaul/10-simple-linux-tips-which-save-50-of-my-time-in-the-command-line-4moo

 

10 simple Linux tips which save 50% of my time in the command line

My favorite Linux commands, tips, and tricks to work fast in the UNIX terminal. Every programmer or Linux user should know this to save time and typing.

dev.to

 

 

• finding host/domain name and IP address - hostname
• test network connection – ping
• getting network configuration – ifconfig
• Network connections, routing tables, interface statistics – netstat
• query DNS lookup name – nslookup
• communicate with another hostname – telnet
• outing steps that packets take to get to network host – traceroute
• view user information – finger
• checking status of destination host - telnet

 


hostname with no options displays the machine's hostname
hostname –d displays the domain name the machine belongs to
hostname –f displays the fully qualified host and domain name
hostname –i displays the IP address for the current machine

netstat -nap | grep port  #will display process id of application which is using that port
netstat -a  or netstat –all #will display all connections including TCP  and UDP  
netstat --tcp  or netstat –t #will display only TCP  connection
netstat --udp or netstat –u #will display only UDP  connection
netstat -g #will display all multicast network subscribed by this host.

nslookup blogger.com # find IP address of the SITE

#A handy utility to view the number of hops and response time to get to a remote system or website is traceroute
traceroute

#View user information, displays a user’s login name, real name, terminal name and write status.
#this is pretty old Unix command and rarely used nowadays.
finger

 



Read more: https://javarevisited.blogspot.com/2010/10/basic-networking-commands-in-linuxunix.html#ixzz5x4Ghj3Gd

Posted by 쁘레드
재밌는세상2019. 8. 17. 05:29

21세기에도 경제적으로 저주받은 대륙이 두군데가 있는데, 남미와 아프리카. 남미는 아프리카대륙의 아래쪽이라 크기라도 좀 작은편인데, 아프리카는 저렇게 어마어마한 땅을 가지고 경제적으로 바닦에 있다는 것이 말이 되는 이야기 인지. 

 

제국주의의 최대피해자들. 죽을때까지 피해보며 살아갈듯.

 

https://en.wikipedia.org/wiki/French_West_Africa : 프랑스 아프리카 식민지

 

French West Africa - Wikipedia

For the entire area in Africa colonized by France, see French Africa. Afrique occidentale française Commercial Relations Report, showing the profile of a Fula woman. January–March 1938. French West Africa (French: Afrique occidentale française, AOF) was a

en.wikipedia.org

https://ko.wikipedia.org/wiki/프랑스령_서아프리카

 

프랑스령 서아프리카 - 위키백과, 우리 모두의 백과사전

위키백과, 우리 모두의 백과사전.

ko.wikipedia.org

기니 
말리 
코트디부아르 
니제르 
베냉 
모리타니 
부르키나파소 
세네갈

 

 

https://ko.wikipedia.org/wiki/아프리카_분할

 

아프리카 분할 - 위키백과, 우리 모두의 백과사전

위키백과, 우리 모두의 백과사전. 아프리카 분할( - 分割, 영어: Scramble for Africa, Partition of Africa, Conquest of Africa, 프랑스어: Partage de l'Afrique,독일어: Wettlauf um Afrika 스페인어: Reparto de África, 이탈리아어: Spartizione dell'Africa)은 1880년대에서부터 제1차 세계대전이 있었던 1914년까지 유럽의 제국주의적 침략으로

ko.wikipedia.org

 

https://namu.wiki/w/식민지

 

식민지 - 나무위키

애국심 고취, 사회갈등 해소, 군사적 필요 등과 같은 비경제적 목적이 강했던 식민지 시대. 어떻게 보면 이것이 식민모국에게 더 굴욕적일 수 있다. 국력은 규모와 정치적 상황으로 식민지가 더 강해질 수 있지만 1인당 소득이 뒤쳐졌다는 것은 더 못 산다는 의미이기 때문이다.

namu.wiki

대표적으로 미국, 영국, 프랑스, 네덜란드, 스페인, 포르투갈, 호주, 뉴질랜드 같은 서방 세계 국가들이 오세아니아나 카리브 지역, 남미, 아프리카 등지에 소유하고 있는 누벨칼레도니, 프랑스령 폴리네시아, 왈리스 퓌튀나, 마르티니크, 과들루프, 생바르텔레미, 세인트마틴 섬, 프랑스령 기아나, 마요트, 레위니옹, 케이맨 제도, 앵귈라, 몬트세랫, 터크스 케이커스 제도, 버뮤다, 버진 제도, 포클랜드 제도, 이스터 섬, 아루바, 퀴라소, 카리브 네덜란드, 카나리아 제도, 세우타, 멜리야, 마데이라 제도, 괌, 북마리아나 제도, 미국령 사모아, 하와이, 푸에르토리코, 코코스 제도, 크리스마스 섬, 노퍽 섬, 쿡 제도, 니우에, 토켈라우 등이 있다. 아시아에도 위구르와 티베트가 중국의 식민지인 상태이고, 류큐 역시 일본의 식민지인 상태이다.

 

 

 

Posted by 쁘레드
Programming2019. 8. 15. 01:42

18.10 Cosmic Cuttlefish

19.04 Disco Dingo

 

최근에 NVidia 드라이버 문제로 귀찮게 되어 잘 돌아가는 빌드머신을 Ubuntu 18.10 -> Ubuntu 19.04로 upgrade. USB가 있는데, 그거 꼽고 upgrade 쉽게할수 있으면 참 좋을텐데. 19.04 설치로 들어가니 upgrade는 안된다고 나와서 맨붕.


$ sudo apt update 
$ sudo apt upgrade
$ sudo apt dist-upgrade

#Remove all no longer required packages:
$ sudo apt autoremove

#Make sure release upgrade is normal
#this can be normal, lts, never. GUI setting is Software Updater
$vi /etc/update-manager/release-upgrades

$ sudo do-release-upgrade

역시나 NVidia! 430.40 버전이 계속 문제를 일으킴.

 


sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
ubuntu-drivers devices
ubuntu-drivers autoinstall

 

하니 418.56 버전이 설치되었음. 그리고 정상으로. 헐~

Posted by 쁘레드
Programming2019. 8. 14. 06:31

가끔씩 핸드폰 비디오가 90도 돌아가 있는 상태로 저장된것을 봅니다. MP4 header에 orientation이 있어서 새로 transcoding하는 것은 안좋은 상황. 비손실과 속도까지 고려하면 헤더만 change하는것이 좋음

 

1. FFMPEG으로 transcoding

# rotate video 1=90 cw, 2=90 ccw
# -filter:v transpose=1

ffmpeg -n -i 20190811_000.mp4 -filter:v transpose=2 20190811_000_r.mp4

 

ffmpeg -i in.mov -vf "transpose=1" out.mov

0 = 90CounterCLockwise and Vertical Flip (default)

1 = 90Clockwise

2 = 90CounterClockwise

3 = 90Clockwise and Vertical Flip

 

2. VLCPlayer로

Tools >> Preferences, Show settings->check "All"

Video >> Filters >> check Rotate video filter

Tools > Effects and Filters > Video Effects > Geometry

TODO:저장되나?

 

3. MP4 Header만 손수 update

https://superuser.com/questions/1307158/change-rotation-flag-in-mp4-video-without-losing-metadata

 

Change rotation flag in MP4 video (without losing metadata)

I just want to change the rotation flag in a .mp4 video file. Many similar questions exist, most answers suggest using ffmpeg -i input.mp4 -map_metadata 0 -metadata:s:v rotate=90 -codec copy outpu...

superuser.com

open mp4 with hex editor and search for vide to find the metadata of the video track
some rows above (for my files mostly 9, sometimes 12) you should see trak...\tkhd

  • no rotation:

    00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40
  • 180°:

    FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40
  • 90° cw:

    00 00 00 00 00 01 00 00 00 00 00 00 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40
  • 90° ccw:

    00 00 00 00 FF FF 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40

 

4. EXIF 정보만 update

program이 EXIF을 읽는다면

http://owl.phy.queensu.ca/~phil/exiftool/

 

ExifTool by Phil Harvey

0 (Information Type) AFCP, AIFF, APE, APP0, APP1, APP11, APP12, APP13, APP14, APP15, APP4, APP5, APP6, APP8, ASF, Audible, CanonVRD, Composite, DICOM, DNG, DV, DjVu, Ducky, EXE, EXIF, ExifTool, FITS, FLAC, FLIR, File, Flash, FlashPix, Font, FotoStation, GI

owl.phy.queensu.ca

exiftool -Orientation='Rotate 90 CW' INPUT_FILE

exiftool -Orientation='Rotate 270 CW' INPUT_FILE

 

---------------

핸드폰으로 찍은 비디오가 참 화질이 좋은데, mediainfo로 보면 진자 기가맥히게 설정이 잘 되어있네요. transcoding/다시encoding해서 퀄리티를 유지하기가 진짜 어려울 정도


Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.2
Format settings                          : CABAC / 1 Ref Frames

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2

'Programming' 카테고리의 다른 글

10 simple Linux tips in the command line  (0) 2019.08.20
Ubuntu upgrade 18.10 -> 19.04  (0) 2019.08.15
FFMPEG으로 비디오 파일에서 10초만 짤라서 만들기  (0) 2019.08.13
linux kernel build on ubuntu  (0) 2019.03.07
MinGW-w64 install  (0) 2017.01.22
Posted by 쁘레드
IT이야기2019. 8. 13. 11:55

아 된장. NVidia 이놈들....

완전 이상해졌네...

FFMPEG자동화 한다고 NVidia HW좀 이용하볼라니까 뭔 드라이버 버전이 낮다고 해서 시작한 뻘짓이...

 

430.40이 최신버전인데 최신버전 설치하다가 X Server가 완전 맛갔다. 예전에도 최신버전깔으려다가 겨우겨우 이 사이트에서 하라는 대로 하니까 돌아왔는데... 이번엔 확실히 한다고 390 싹 다지우고 깔았더니 완전....

--------------------

https://www.mvps.net/docs/install-nvidia-drivers-ubuntu-18-04-lts-bionic-beaver-linux/

 

How to install NVIDIA drivers on Ubuntu 18.04 LTS Bionic Beaver Linux

This tutorial will help users that want to install drivers for their NVIDIA GPU...

www.mvps.net

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-390
sudo reboot

--------------------

최신버전 설치하려고 홈페이지까지 들어가서 현재 그래픽카드랑 호환되는지도 체크해보고, 최신것으로 받았는데. Installer같은것을 받게해주는데,

111258448 Aug 12 19:00 NVIDIA-Linux-x86_64-430.40.run

설치해도 뭐 안되고, dmesg에 딱히 error도 없고.

--------------------

http://us.download.nvidia.com/XFree86/Linux-x86_64/430.40/README/installdriver.html

NVidia그래도 많이 좋아졌다는데도 아직도 문서도 그지같고. 불친절하기 그지없다.

Posted by 쁘레드