SVN은 리파지터리(repository, 이하 저장소) 별로 revision이 올라간다.
다르게 말하자면, 저장소 하나별로 프로젝트를 구성하는게
roll-back 이나, 관리에 유용하다는 점이다.

물론 SVN은 개인적으로 단일 프로젝트에만 사용했지,
단일 - 복합 프로젝트에는 사용해보지 못해서 이것이 정답이다! 라고 하긴 힘들지만
CVS에 비해서 저장소 관리에 모호함이 있다.

CVS는 파일별로 revision이 붙는데,
SVN은 commit 별로 revision이 증가한다.

다르게 말하면 SVN은 하나를 커밋하는 행위가
CVS에서 커밋 후 tag를 붙이는것과 동일한 행위가 된다.

이런 이유로, 하나의 프로젝트에 사용되는 소스 저장용 / 개발환경 저장용 저장소 구성에 있어
약간의 차이점이 생길수 밖에 없다.

일단 /home/cvs 에 구성했다고 할경우
cvs 아래에 여러가지 소스를 디렉토리 별로 구성을 할 수 있다.
물론 atomic commit이라던가, tagging은 문제가 있겠지만,
한번에 모든 저장소를 볼수 있기 때문에 사용상에 상당한 잇점으로 작용한다.

그에비해 svn을 하나의 저장소 아래 여러개 프로젝트로 할 경우,
어떻게 보면 svn을 쓰는 의미가 없어질 정도가 된다.

예를들어 linux kernel / uboot source / nfs target / MTD target을 구성할 경우
CVS는 Filesystem을 CVS에 넣고 각각 디렉토리로 구성해도 상관없지만(파일별로 하니까)
SVN에 이런식으로 구성을 하면, 하나의 커밋 별로 revision이 증가하는건 아무런 의미가 없게된다.

아무튼
/home/svn/프로젝트 1
/home/svn/프로젝트 2
/home/svn/프로젝트 3

이런식으로 구성을 하고,
svnserve -d -r /home/svn
으로 한다음, 개별 프로젝트로 이름을 알아내서 쓰는게 (불편하지만) 낫지 않을까하는 생각이 든다.


혹시.. 웹에서 cvsweb 처럼 보여주는 게 있을려나?
[링크 : http://freshmeat.net/projects/svnweb/]
[링크 : http://freshmeat.net/projects/cvsweb/]
[링크 : http://www.viewvc.org/]

[링크 : http://svnbook.red-bean.com/en/1.4/index.html]
    [링크 : http://svnbook.red-bean.com/en/1.4/svn.reposadmin.planning.html]

'프로그램 사용 > Version Control' 카테고리의 다른 글

GIT는 리눅스에서 받으시는걸 추천합니다.  (0) 2010.03.18
TortoiseGIT  (0) 2010.03.18
SVN의 장점  (0) 2009.09.19
svn tagging/branching  (0) 2009.08.20
SVN repository 구조  (0) 2009.05.11
Posted by 구차니
서버를 교체하거나, 서버의 아이피 변경으로 인해 기존의 서버의 아이피와 겹칠경우
${HOME}/.ssh/known_hosts
파일에 이전의 정보가 남아있는 바람에 생기는 에러이다.
"에러" 라고 한이유는, 경고라고 해놓고 접속이 안되기 때문이다.

해결 방법은, 위의 파일을 삭제하거나(그러면 다음 접속시 키를 다 받아야 하는 귀차니즘이)
해당 서버의 아이피가 들어있는 줄을 지우면 된다.

$ ssh USERID@SERVER_IP
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
5b:c1:63:e6:6c:53:30:ea:fd:fd:f3:72:22:a0:a1:aa.
Please contact your system administrator.
Add correct host key in /home/USERID/.ssh/known_hosts to get rid of this message.
Offending key in /home/USERID/.ssh/known_hosts:2
RSA host key for SERVER_IP has changed and you have requested strict checking.
Host key verification failed.

Posted by 구차니
컴파일 속도를 올리는 법을 찾다보니
distcc라는 녀석이 나온다.
원래 samba에서 관리하던 녀석인가?

60-second instructions:

  1. For each machine, download distcc unpack, and do
    ./configure && make && sudo make install
  2. On each of the servers, run distccd --daemon, with --allow options to restrict access.
  3. Put the names of the servers in your environment:
    export DISTCC_HOSTS='localhost red green blue'
  4. Build!
    cd ~/work/myproject; make -j8 CC=distcc

아무튼 CC를 distcc 로 해서 사용하고
distcc / distccd 조합으로 네트워크를 통해서 병행처리 하는 것으로 보인다.

[링크 : http://mechta.kr/51]
[링크 : http://distcc.samba.org/]
[링크 : http://distcc.org -> http://code.google.com/p/distcc/]



2010.07.08 추가

심볼릭 링크를 변경함으로서 distcc를 cross-compile에도 사용가능 하도록 해준다.
(해보진 않았으나 이런 문서만 발견 -0-)
[링크 : http://www.gentoo.org/doc/en/cross-compiling-distcc.xml]


+
2014.09.30 추가
[링크 : http://whatwant.tistory.com/423

'프로그램 사용 > distcc & ccache' 카테고리의 다른 글

distcc 크로스 컴파일/커널 빌드 관련  (0) 2016.09.13
distcc 로 valgrind-3.6.1 컴파일 실패?  (0) 2014.12.12
distcc 작동모드  (0) 2014.12.09
ccache & distcc  (0) 2014.12.08
distcc on ubuntu  (0) 2014.12.08
Posted by 구차니
프로그램 사용/gcc2010. 3. 4. 11:23

학교에서 컴파일러 배운지도 오래되서 기억도 가물가물하는데,
아무튼 컴파일이라는 과정은 생각보다 여러단계를 거친다.

1단계는 #define 이나 #include 등의 매크로프로세서를 처리하는 과정
2단계는 매크로 처리된 C언어를 컴파일하는 과정(문법 확인)
3단계를 컴파일 된 결과물인 어셈블리 코드를 오브젝트로 변환하는 과정
4단계는 오브젝트들을 서로 묶어주는 과정
5단계는 이런 묶인 녀석들을 메모리에서 돌아가도록 하는 로더라는 녀석을 붙이는 과정을 거친다.

이렇게 단계가 나누어져 있다 보니,
gcc에서는 단계별 결과를 추출해 낼수 있다.

예를들어, 매크로가 복잡해서 소스 추적이 힘들경우
매크로 프로세서를 거친 결과만을 뽑아내고 싶다고 한다면
gcc -E 옵션을 사용하면 매크로가 제외된(처리된) 결과가 stdout으로 나온다.
gcc -E 소스파일 > 저장할 파일
이런식으로 한단계만 거쳐 디버깅에 사용할 수도 있다.

추가적으로, Makefile 에서
CPP 는 C++이 아니라 C PreProcessor = 매크로 프로세서 이고
CC 는 C Compiler
AS 는 Assembler
LD 는 Loader (링커) 를 의미한다.

2010/03/02 - [프로그램 사용/gcc] - gcc의 linker 옵션
2010/01/27 - [프로그램 사용/gcc] - gcc 매크로만 확장하기 (preprocessor/전처리기)
Posted by 구차니
make와 gmake는 유사하나
Fedora Core 6 에서는 실질적으로 symbolic link로 연결이 되어있다.

# ll /usr/bin/*make
lrwxrwxrwx 1 root root      4 Feb 16 13:23 /usr/bin/gmake -> make
-rwxr-xr-x 1 root root 162204 Jul 13  2006 /usr/bin/make

[링크 : http://linux.die.net/man/1/gmake]
[링크 : http://linux.die.net/man/1/make]

shenzhen{bzhu}$ gmake -version
GNU Make version 3.71, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

shenzhen{bzhu}$ make -version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

[링크 : http://www.unix.com/high-level-programming/29191-what-distinguish-between-gmake-make.html]

아무튼, 다르지만 실질적으로 같은 녀석이다.
Posted by 구차니
프로그램 사용/gcc2010. 3. 2. 17:34
gcc 옵션중에 헷갈리는게 있다.
-L과 -l이 그녀석인데, 비슷비슷해서 조금 헷갈린다.

아무튼 -L은 디렉토리(경로)를
-l은 특정 라이브러리 파일을 설정하는데 사용된다.

       -l library
           Search the library named library when linking.  (The second alternative with the library as a separate argu-
           ment is only for POSIX compliance and is not recommended.)

           It makes a difference where in the command you write this option; the linker searches and processes libraries
           and object files in the order they are specified.  Thus, foo.o -lz bar.o searches library z after file foo.o
           but before bar.o.  If bar.o refers to functions in z, those functions may not be loaded.

           The linker searches a standard list of directories for the library, which is actually a file named libli-
           brary.a.  The linker then uses this file as if it had been specified precisely by name.

           The directories searched include several standard system directories plus any that you specify with -L.

           Normally the files found this way are library files---archive files whose members are object files.  The
           linker handles an archive file by scanning through it for members which define symbols that have so far been
           referenced but not defined.  But if the file that is found is an ordinary object file, it is linked in the
           usual fashion.  The only difference between using an -l option and specifying a file name is that -l sur-
           rounds library with lib and .a and searches several directories.

       -Ldir
           Add directory dir to the list of directories to be searched for -l.

       LIBRARY_PATH
           The value of LIBRARY_PATH is a colon-separated list of directories, much like PATH.  When configured as a
           native compiler, GCC tries the directories thus specified when searching for special linker files, if it
           can’t find them using GCC_EXEC_PREFIX.  Linking using GCC also uses these directories when searching for
           ordinary libraries for the -l option (but directories specified with -L come first).

[링크 : http://linux.die.net/man/1/gcc]
Posted by 구차니
컴파일 환경 자동화툴인
autoconf, automake, libtool을 설명한다.

컴파일시 각종 헤더들의 위치, 라이브러리들의위치
그리고 설치할 위치들을 설정하고,
컴파일할 프로그램의 세부 패키지를 설정한다.

아래는 ffmpeg의 configure --help 내용중 일부이다.
Standard options:
  --prefix=PREFIX         install in PREFIX          []

  --bindir=DIR            install binaries in DIR    [PREFIX/bin]
  --datadir=DIR           install data files in DIR  [PREFIX/share/ffmpeg]
  --libdir=DIR            install libs in DIR        [PREFIX/lib]
  --shlibdir=DIR          install shared libs in DIR [PREFIX/lib]
  --incdir=DIR            install includes in DIR    [PREFIX/include]
  --mandir=DIR            install man page in DIR    [PREFIX/share/man]

Advanced options (experts only):
  --enable-cross-compile   assume a cross-compiler is used
  --arch=ARCH              select architecture []
  --target-os=OS           compiler targets OS []
  --cross-prefix=PREFIX    use PREFIX for compilation tools []
  --source-path=PATH       path to source code [/home/morpheuz/st7109/target_ori/root/ffmpeg]
  --sysroot=PATH           root of cross-build tree
  --sysinclude=PATH        location of cross-build system headers
  --target-exec=CMD        command to run executables on target
  --target-path=DIR        path to view of build directory on target
  --nm=NM                  use nm tool
  --as=AS                  use assembler AS []
  --cc=CC                  use C compiler CC [gcc]
  --ld=LD                  use linker LD
  --host-cc=HOSTCC         use host C compiler HOSTCC
  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host
  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host
  --host-libs=HLIBS        use libs HLIBS when linking for host
  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS []
  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS []
  --extra-libs=ELIBS       add ELIBS []
  --extra-version=STRING   version string suffix []
  --build-suffix=SUFFIX    library name suffix []
  --cpu=CPU                select the minimum required CPU (affects
                           instruction selection, may crash on older CPUs)
  --disable-yasm           disable use of yasm assembler
  --enable-pic             build position-independent code

이녀석의 경우 arch 와 target-os를 조합해서 cross compiler prefix를 만들어 낸다.
예를들어 sh4-linux의 경우
--enable-cross-compile --arch=sh4 --target-os=linux 라고 하면
자동으로 sh4-linux- 접두를 붙이게 된다.

하지만, target 에만 존재하는 library를 끌어 오려면 어떤 옵션을 써야 하나.. 후우..

[링크 : http://wariua.springnote.com/pages/1041972] << 한글 번역
[링크 : http://sources.redhat.com/autobook/]
Posted by 구차니
파이어폭스에서 URL에 한글이 들어간걸 복사하면은
%22 이런식으로 이상한(!) 문자가 복사된다.

이런 표기를
URL encoding + UTF-8 이라고 하는거 같은데
아무튼, 유튜브에서 내부적으로 인코딩된 녀석을 풀어주기에는
적절한 서비스인것으로 보인다.


[링크 : http://mimul.com/pebble/default/2009/08/21/1250862600000.html]
[링크 : http://www.mimul.com/examples/dencoder/] << 웹에서 인코딩/디코딩


[링크 : http://bdyne.net/?document_srl=11733] << 동시에 여러가지 보여줌

[링크 : http://kldp.org/node/76274]
Posted by 구차니
make -j2
이렇게 컴파일을 하면 동시에 2개의 작업을 실행하여
다소 컴파일 시간이 줄어드는 효과가 있다.

-j jobs 에서 jobs 에 숫자를 넣지 않으면, make가 돌릴수 있는 최대한의 숫자가 제한되지 않는다고 한다.
현재 사용중인 개발환경에서 make 로는 1분 make -j2 / make -j4 에서 40초 걸리는 것으로 봐서
상당히 유용한 옵션으로 생각이 된다.

-j [jobs], --jobs[=jobs]
    Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j option, the last one is effective. If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously.

[링크 : http://linux.die.net/man/1/make]
[링크 : http://theory.uwinnipeg.ca/localfiles/infofiles/make/make_47.html]
[링크 : http://www.ibm.com/developerworks/kr/library/l-bash3.html]

Posted by 구차니
아래는 wireshark로 tcp 에서 긁어 본건데, 간단하게 URL을 빼내기는 힘들다라는 내용
[링크 : http://blog.scouta.com/2007/10/20/youtubes-h264-file-url/]

아래는 &t 에 &fmt 값으로 원하는 포맷으로 변경후 받는 내용
[링크 : http://blog.jimmyr.com/High_Quality_on_Youtube_11_2008.php]


하.지.만 될리가 없잖아 ㄱ-
아무튼 혼자서 또 삽질을 하면서 알아낸 것은


http://www.youtube.com/watch?v=TMZNXW7cFCs
이 녀석을 샘플로 말하자면

이 html 페이지를 열어 보면 다음과 같은 내용이 있다.
yt.setConfig({
            'VIDEO_ID': 'TMZNXW7cFCs',
            'VIDEO_TITLE': '게임테크 2010 시연 동영상  1',

            'SWF_URL': (yt.flash.canPlayV9Swf() ? (!yt.flash.canPlayH264Videos() ? "http://s.ytimg.com/yt/swf/watch-vfl148687.swf" : "http://s.ytimg.com/yt/swf/watch_as3-vfl148857.swf") : "http://s.ytimg.com/yt/swf/watch_v8-vfl148687.swf"),
            'SWF_ARGS': {"rv.2.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2FfmPjDH1sDfo%2Fdefault.jpg", "rv.7.length_seconds": "600", "rv.0.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPOcCzju_kqk", "rv.0.view_count": "7243", "enablecsi": "1", "rv.2.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+8%2F14", "rv.7.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2F2rEfw1DEtts%2Fdefault.jpg", "rv.4.rating": "5.0", "length_seconds": "78", "rv.0.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+14%2F14", "rv.7.author": "junjangsoh", "rv.7.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+10%2F14", "rv.3.view_count": "6324", "allow_embed": "1", "rv.5.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+5%2F14", "rv.0.length_seconds": "564", "rv.4.thumbnailUrl": "http%3A%2F%2Fi3.ytimg.com%2Fvi%2FnHQokcqw2uw%2Fdefault.jpg", "fmt_url_map": "22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b", "rv.2.rating": "5.0", "csi_page_type": "watch", "keywords": "14", "cr": "KR", "rv.1.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DLUs4UPyE2AI", "rv.6.thumbnailUrl": "http%3A%2F%2Fi4.ytimg.com%2Fvi%2FCjn_lrc2b_k%2Fdefault.jpg", "rv.1.id": "LUs4UPyE2AI", "rv.3.rating": "5.0", "rv.6.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+13%2F14", "fmt_list": "22%2F2000000%2F9%2F0%2F115%2C35%2F640000%2F9%2F0%2F115%2C34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0", "rv.7.id": "2rEfw1DEtts", "rv.1.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+1%2F14", "rv.1.thumbnailUrl": "http%3A%2F%2Fi1.ytimg.com%2Fvi%2FLUs4UPyE2AI%2Fdefault.jpg", "rv.6.length_seconds": "602", "rv.0.rating": "5.0", "watermark": "http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Flogo-vfl106645.swf%2Chttp%3A%2F%2Fs.ytimg.com%2Fyt%2Fswf%2Fhdlogo-vfl100714.swf", "rv.6.author": "junjangsoh", "rv.5.id": "gfsJ3Eq_Zhs", "rv.4.author": "junjangsoh", "plid": "AASAfHyi-5gDThaQ", "rv.0.id": "POcCzju_kqk", "rv.3.length_seconds": "598", "rv.5.rating": "5.0", "rv.4.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DnHQokcqw2uw", "sdetail": "p%3A%2Fvideos", "fexp": "900023%2C901802", "rv.1.author": "junjangsoh", "rv.1.rating": "5.0", "rv.4.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+3%2F14", "rv.5.thumbnailUrl": "http%3A%2F%2Fi4.ytimg.com%2Fvi%2FgfsJ3Eq_Zhs%2Fdefault.jpg", "rv.5.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgfsJ3Eq_Zhs", "rv.3.title": "%EC%97%94%EB%93%9C%EA%B2%8C%EC%9E%84+-+%EC%A7%80%EA%B5%AC+%EB%85%B8%EC%98%88%ED%99%94+%EC%B2%AD%EC%82%AC%EC%A7%84+4%2F14", "sourceid": "y", "rv.0.author": "junjangsoh", "rv.3.thumbnailUrl": "http%3A%2F%2Fi2.ytimg.com%2Fvi%2Fi27PAb-w0AY%2Fdefault.jpg", "rv.2.author": "junjangsoh", "rv.6.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCjn_lrc2b_k", "rv.7.rating": "5.0", "rv.3.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Di27PAb-w0AY", "fmt_map": "22%2F2000000%2F9%2F0%2F115%2C35%2F640000%2F9%2F0%2F115%2C34%2F0%2F9%2F0%2F115%2C5%2F0%2F7%2F0%2F0", "hl": "en_US", "rv.7.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2rEfw1DEtts", "rv.2.view_count": "5454", "rv.4.length_seconds": "611", "rv.4.view_count": "7731", "rv.2.url": "http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfmPjDH1sDfo", "rv.5.length_seconds": "600", "rv.0.thumbnailUrl": "http%3A%2F%2Fi1.ytimg.com%2Fvi%2FPOcCzju_kqk%2Fdefault.jpg", "fmt_stream_map": "22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b", "sk": "AN-IBdoG6rDwqBQ2JAmJ7AiKj79qzYtCC", "rv.1.view_count": "25631", "rv.1.length_seconds": "596", "rv.6.rating": "5.0", "rv.5.author": "junjangsoh", "vq": "medium", "rv.3.id": "i27PAb-w0AY", "rv.2.id": "fmPjDH1sDfo", "rv.2.length_seconds": "600", "rv.5.view_count": "6470", "t": "vjVQa1PpcFNMsS2pAI26JfksbOObe4nVZu_ORw-B1v4%3D", "rv.6.id": "Cjn_lrc2b_k", "video_id": "TMZNXW7cFCs", "rv.6.view_count": "5377", "rv.3.author": "junjangsoh", "rv.4.id": "nHQokcqw2uw", "rv.7.view_count": "4854"},
            'SWF_GAM_URL': null,
            'SWF_DC_URL': null,
            'SWF_EXPRESS_URL': null,
            'SWF_AD_EURL': null,
            'SWF_IS_PLAYING_ALL': false,
            'SWF_SET_WMODE': false,

            'SHOW_AUTOSHARE': true,
            'IS_WIDESCREEN': false,
            'IS_HD_AVAILABLE': true,
            'WIDE_PLAYER_STYLES':         ["watch-wide-mode"]
,
            'EMBED_URL': 'http://www.youtube.com/v/TMZNXW7cFCs&hl=en_US&fs=1',
            'VIDEO_LANGUAGE': 'EN',
            'VIDEO_USERNAME': 'say2420',
            'PLAY_NEXT_FROM': '',
            'PLAY_NEXT_COUNT': '0',
            'QL_AUTOSCROLL_DEST': 0,
            'LOCALE': 'en_US',
            'AXC': '',
            'SUBSCRIBE_AXC': '',

            'PLAYER_SAVE_QUALITY': true,

            'COMMENTS_THRESHHOLD': -5,
            'COMMENTS_FILTER': 0,
            'COMMENTS_PAGE_SIZE': 10,
            'COMMENTS_MAX_PAGE': 1,
            'COMMENTS_COUNT': 4,

            'IS_BRANDED_WATCH': false
        });

아무튼 저넘의 fmt_url_map을 들여다보자!
"22%7Chttp%3A%2F%2Fv20.lscache7.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cratebypass%26fexp%3D900023%252C901802%26itag%3D22%26ipbits%3D0%26sver%3D3%26ratebypass%3Dyes%26expire%3D1267196400%26key%3Dyt1%26signature%3D0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595%26id%3D4cc64d5d6edc142b%2C35%7Chttp%3A%2F%2Fv21.lscache2.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D35%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C34%7Chttp%3A%2F%2Fv2.lscache8.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D34%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC%26factor%3D1.25%26id%3D4cc64d5d6edc142b%2C5%7Chttp%3A%2F%2Fv7.lscache3.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Calgorithm%252Cburst%252Cfactor%26fexp%3D900023%252C901802%26algorithm%3Dthrottle-factor%26itag%3D5%26ipbits%3D0%26burst%3D40%26sver%3D3%26expire%3D1267196400%26key%3Dyt1%26signature%3D5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739%26factor%3D1.25%26id%3D4cc64d5d6edc142b"

무언의 규칙성이 느껴지지 않는가!?
그렇다면 치환을 고고싱~

%7C 는 |
%3A 는 :
%2F 는 /
%3F 는 ?
%26 는 &
%25 는 %
%2C 는 ,
%3D 는 =

이므로 치환을 하면

"22|http://v20.lscache7.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass&fexp=900023%2C901802&itag=22&ipbits=0&sver=3&ratebypass=yes&expire=1267196400&key=yt1&signature=0F25C849B5E0697E2708D7FDF90873CA778C1814.33DA1EEAD4CC9692C5613494A2C564133BF81595&id=4cc64d5d6edc142b

,35|http://v21.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&fexp=900023%2C901802&algorithm=throttle-factor&itag=35&ipbits=0&burst=40&sver=3&expire=1267196400&key=yt1&signature=241955F71A0A876EC7B6DB78E3E792F66F3F21AD.309C4F50111292184108BB359CEEF7A9A86B918F&factor=1.25&id=4cc64d5d6edc142b

,34|http://v2.lscache8.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&fexp=900023%2C901802&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1267196400&key=yt1&signature=6AE4B5BA71E0F02396287FFDA1DF821A6158B6AF.CB0891E42ADAB8317ECA61A64CF77DD79BE662AC&factor=1.25&id=4cc64d5d6edc142b

,5|http://v7.lscache3.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor&fexp=900023%2C901802&algorithm=throttle-factor&itag=5&ipbits=0&burst=40&sver=3&expire=1267196400&key=yt1&signature=5AD304AB9BCC13F8BD46205F6F5FD95EF491C5EB.AB6CB2D6EEAE16BAE8003D88D2628D4008065739&factor=1.25&id=4cc64d5d6edc142b"

의 내용이 나오게 된다.
아무튼 http:// 부터 클릭하면 다운로드를 하게 된다.
22>18 순으로 H.264를 지원하는 해상도 이므로 적절하게 다운로드!



2010/01/26 - [프로그램 사용/VLC] - VLC로 youtube 동영상 감상하기

'프로그램 사용 > 유튜브(youtube)' 카테고리의 다른 글

youtube xml / RSS 주소  (0) 2010.04.09
youTube 경로로 VLC 플레이가 안됨  (0) 2010.04.01
유튜브 썸네일 사이즈(image size of thumbnail on youtube)  (4) 2010.03.16
3D 유튜브  (6) 2010.03.15
URL encode  (2) 2010.03.02
Posted by 구차니