회사일/STLinux2010. 3. 8. 17:22
STLinux2.2에서 크로스 컴파일을 시도하는데
sh4-linux-gcc -DHAVE_AV_CONFIG_H -I. -I"/home/morpheuz/st7109/target_ori/root/ffmpeg" --sysroot=/home/morpheuz/st7109/target_ori -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std=c99 -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -O3 -fno-math-errno -fno-tree-vectorize        -MMD -MF ffserver.d -MT ffserver.o -c -o ffserver.o ffserver.c

libavcodec/vorbis_dec.c:1409: warning: no previous prototype for 'vorbis_inverse_coupling'
libavcodec/vorbis_dec.c: In function 'vorbis_decode_init':
libavcodec/vorbis_dec.c:575: warning: 'book_idx' is used uninitialized in this function
libavcodec/vorbis_dec.c:998: internal compiler error: in schedule_insns, at sched-rgn.c:2605
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://bugzilla.stlinux.com> for instructions.
make: *** [libavcodec/vorbis_dec.o] Error 1 
요런 에러가 발생한다.

물론, 컴파일도 제대로 완료되지 못하고 결과물도 생성되지 않는다.
버그리폿하려다가 그냥 STLinux2.3에 들어있는 sh4-linux-gcc로 하니 문제없이 해결!

뭥미? ㄱ-




아무튼, PATH 변수의 경로를 바꾸는 법이 있다지만, 귀차니즘으로 인해
config.mak 파일의 CC= AS= 등에
전부 절대경로로 바꾸어 넣어주었다.

# ./configure --enable-shared --target-os=linux --arch=sh4 --cross-prefix=sh4-linux- --enable-cross-compile

# vi config.mak
CC=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-gcc
AS=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-gcc
LD=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-gcc
DEPCC=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-gcc
AR=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-ar
RANLIB=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-ranlib
STRIP=/opt/STM/STLinux-2.3/devkit/sh4/bin/sh4-linux-strip

'회사일 > STLinux' 카테고리의 다른 글

glibc 타겟보드 컴파일  (2) 2010.03.15
VLC 와 pkg-config  (0) 2010.03.09
python 2.5.4 컴파일시 bzip 에러  (0) 2010.02.25
python2.4 on STLinux with google api(gdata)  (0) 2010.02.23
cross compiled python2.4 on STLinux2.3  (2) 2010.02.23
Posted by 구차니
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
CustomLog -
NoDaemon

<Feed feed1.ffm>
    File /tmp/feed1.ffm
    FileMaxSize 200K
    ACL allow 127.0.0.1
</Feed>

<Stream test1.mpg>
    Feed feed1.ffm
    Format mpeg
    AudioBitRate 32
    AudioChannels 1
    AudioSampleRate 44100
    VideoBitRate 64
    VideoBufferSize 40


#    VideoIntraOnly
    VideoGopSize 12
#    NoAudio
#    NoVideo
#    VideoQMin 3
#    VideoQMax 31
#    Preroll 15
#    ACL ALLOW <first address>
#    ACL DENY <first address>
</Stream>

#<Stream test.mjpg>
#    Feed feed1.ffm
#    Format mpjpeg
#    VideoFrameRate 2
#    VideoIntraOnly
#    NoAudio
#    Strict -1
#</Stream>

#<Stream test.jpg>
#    Feed feed1.ffm
#    Format jpeg
#    VideoFrameRate 2
#    VideoIntraOnly
#    VideoSize 352x240
#    NoAudio
#    Strict -1
#</Stream>

#<Stream test.swf>
#    Feed feed1.ffm
#    Format swf
#    VideoFrameRate 2
#    VideoIntraOnly
#    NoAudio
#</Stream>

<Stream test.asf>
    Feed feed1.ffm
    Format asf
    VideoFrameRate 15
    VideoSize 352x240
    VideoBitRate 256
    VideoBufferSize 40
    VideoGopSize 30
    AudioBitRate 64
    StartSendOnKey
</Stream>

#<Stream test.mp3>
#    Feed feed1.ffm
#    Format mp2
#    AudioCodec mp3
#    AudioBitRate 64
#    AudioChannels 1
#    AudioSampleRate 44100
#    NoVideo
#</Stream>

#<Stream test.ogg>
#    Feed feed1.ffm
#    Title "Stream title"
#    AudioBitRate 64
#    AudioChannels 2
#    AudioSampleRate 44100
#    NoVideo
#</Stream>

#<Stream test.ra>
#    Feed feed1.ffm
#    Format rm
#    AudioBitRate 32
#    NoVideo
#    NoAudio
#</Stream>

#<Stream test.rm>
#    Feed feed1.ffm
#    Format rm
#    AudioBitRate 32
#    VideoBitRate 128
#    VideoFrameRate 25
#    VideoGopSize 25
#    NoAudio
#</Stream>

#<Stream file.rm>
#    File "/usr/local/httpd/htdocs/tlive.rm"
#    NoAudio
#</Stream>

#<Stream file.asf>
#    File "/usr/local/httpd/htdocs/test.asf"
#    NoAudio
#    Author "Me"
#    Copyright "Super MegaCorp"
#    Title "Test stream from disk"
#    Comment "Test comment"
#</Stream>

File 이 들어 가는건 VLC에서 트랜스코딩이 비활성화 된 스트림이라고 생각된다.





#<Stream test1-rtsp.mpg>
#    Format rtp
#    File "/usr/local/httpd/htdocs/test1.mpg"
#</Stream>

#<Stream test1-sdp.mpg>
#    Format rtp
#    File "/usr/local/httpd/htdocs/test1.mpg"
#    MulticastAddress 224.124.0.1
#    MulticastPort 5000
#    MulticastTTL 16
#    NoLoop
#</Stream>

<Stream stat.html>
    Format status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255
</Stream>

<Redirect index.html>
    URL http://www.ffmpeg.org/
</Redirect>
Posted by 구차니
The server is too busy to serve your request at this time.

The bandwidth being served (including your stream) is 3758kbit/sec, and this exceeds the limit of 1000kbit/sec.
http://localhost:8090/feed1.ffm 로 접속하니 위와 같은 에러가 난다.

<Stream test.asf>
Feed feed1.ffm
Format asf
VideoFrameRate 30
VideoSize 320x240
VideoBitRate 1872
VideoBufferSize 4000
VideoGopSize 30
AudioBitRate 1886
StartSendOnKey
</Stream>
ffserver.conf의 설정은 video가 1872kb / audio 가 1886kb 였고
합쳐서 3758kb 인데 이는 1000kbit의 데이터 폭을 넘어선다는 에러인 듯 하다.


아무튼 http://localhost:8090/test.asf로 접속하면


위와 같은 화면이 뜬다.
(아직 스트리밍은 실패 ㅠ.ㅠ)
Posted by 구차니
우분투 8.04에서 Logitech Quickcam Pro 4000으로 스트리밍 서버 만드는 방법이다.

$ ffserver -f ./ffserver.conf
$ ffmpeg -y -f video4linux -r 30 -s 160x120 -i /dev/video0 http://localhost:8090/feed1.ffm
웹브라우저 http://xxx.xxx.xxx.xxx:8090/stream.asf

[링크 : http://sound79.tistory.com/105]

머.. ffmpeg 홈페이지의 ffserver 문서와 다를 내용은 그리 없지만

As a simple test, just run the following two command lines where INPUTFILE is some file which you can decode with ffmpeg:

./ffserver -f doc/ffserver.conf &
./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm

At this point you should be able to go to your Windows machine and fire up Windows Media Player (WMP). Go to Open URL and enter

    http://<linuxbox>:8090/test.asf

아무튼.. wmv 중요한건 저게 아니라 /etc/ffserver.conf 파일의 내용일 듯 하다.


ffmpeg 홈페이지의 ffserver.conf 예제파일

# Port on which the server is listening. You must select a different
# port from your standard HTTP web server if it is running on the same
# computer.
Port 8090

# Address on which the server is bound. Only useful if you have
# several network interfaces.
BindAddress 0.0.0.0

# Number of simultaneous HTTP connections that can be handled. It has
# to be defined *before* the MaxClients parameter, since it defines the
# MaxClients maximum limit.
MaxHTTPConnections 2000

# Number of simultaneous requests that can be handled. Since FFServer
# is very fast, it is more likely that you will want to leave this high
# and use MaxBandwidth, below.
MaxClients 1000

# This the maximum amount of kbit/sec that you are prepared to
# consume when streaming to clients.
MaxBandwidth 1000

# Access log file (uses standard Apache log file format)
# '-' is the standard output.
CustomLog -

# Suppress that if you want to launch ffserver as a daemon.
NoDaemon


##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another
# ffserver. This sequence may be encoded simultaneously with several
# codecs at several resolutions.

<Feed feed1.ffm>

# You must use 'ffmpeg' to send a live feed to ffserver. In this
# example, you can type:
#
# ffmpeg http://localhost:8090/feed1.ffm

# ffserver can also do time shifting. It means that it can stream any
# previously recorded live stream. The request should contain:
# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
# a path where the feed is stored on disk. You also specify the
# maximum size of the feed, where zero means unlimited. Default:
# File=/tmp/feed_name.ffm FileMaxSize=5M
File /tmp/feed1.ffm
FileMaxSize 200K

# You could specify
# ReadOnlyFile /saved/specialvideo.ffm
# This marks the file as readonly and it will not be deleted or updated.

# Specify launch in order to start ffmpeg automatically.
# First ffmpeg must be defined with an appropriate path if needed,
# after that options can follow, but avoid adding the http:// field
#Launch ffmpeg

# Only allow connections from localhost to the feed.
ACL allow 127.0.0.1

</Feed>


##################################################################
# Now you can define each stream which will be generated from the
# original audio and video stream. Each format has a filename (here
# 'test1.mpg'). FFServer will send this stream when answering a
# request containing this filename.

<Stream test1.mpg>

# coming from live feed 'feed1'
Feed feed1.ffm

# Format of the stream : you can choose among:
# mpeg       : MPEG-1 multiplexed video and audio
# mpegvideo  : only MPEG-1 video
# mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
# ogg        : Ogg format (Vorbis audio codec)
# rm         : RealNetworks-compatible stream. Multiplexed audio and video.
# ra         : RealNetworks-compatible stream. Audio only.
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
# jpeg       : Generate a single JPEG image.
# asf        : ASF compatible streaming (Windows Media Player format).
# swf        : Macromedia Flash compatible stream
# avi        : AVI format (MPEG-4 video, MPEG audio sound)
Format mpeg

# Bitrate for the audio stream. Codecs usually support only a few
# different bitrates.
AudioBitRate 32

# Number of audio channels: 1 = mono, 2 = stereo
AudioChannels 1

# Sampling frequency for audio. When using low bitrates, you should
# lower this frequency to 22050 or 11025. The supported frequencies
# depend on the selected audio codec.
AudioSampleRate 44100

# Bitrate for the video stream
VideoBitRate 64

# Ratecontrol buffer size
VideoBufferSize 40

# Number of frames per second
VideoFrameRate 3

# Size of the video frame: WxH (default: 160x128)
# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
# hd1080
VideoSize 160x128

# Transmit only intra frames (useful for low bitrates, but kills frame rate).
#VideoIntraOnly

# If non-intra only, an intra frame is transmitted every VideoGopSize
# frames. Video synchronization can only begin at an intra frame.
VideoGopSize 12

# More MPEG-4 parameters
# VideoHighQuality
# Video4MotionVector

# Choose your codecs:
#AudioCodec mp2
#VideoCodec mpeg1video

# Suppress audio
#NoAudio

# Suppress video
#NoVideo

#VideoQMin 3
#VideoQMax 31

# Set this to the number of seconds backwards in time to start. Note that
# most players will buffer 5-10 seconds of video, and also you need to allow
# for a keyframe to appear in the data stream.
#Preroll 15

# ACL:

# You can allow ranges of addresses (or single addresses)
#ACL ALLOW <first address>

# You can deny ranges of addresses (or single addresses)
#ACL DENY <first address>

# You can repeat the ACL allow/deny as often as you like. It is on a per
# stream basis. The first match defines the action. If there are no matches,
# then the default is the inverse of the last ACL statement.
#
# Thus 'ACL allow localhost' only allows access from localhost.
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
# allow everybody else.

</Stream>


##################################################################
# Example streams


# Multipart JPEG

#<Stream test.mjpg>
#Feed feed1.ffm
#Format mpjpeg
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#Strict -1
#</Stream>


# Single JPEG

#<Stream test.jpg>
#Feed feed1.ffm
#Format jpeg
#VideoFrameRate 2
#VideoIntraOnly
##VideoSize 352x240
#NoAudio
#Strict -1
#</Stream>


# Flash

#<Stream test.swf>
#Feed feed1.ffm
#Format swf
#VideoFrameRate 2
#VideoIntraOnly
#NoAudio
#</Stream>


# ASF compatible

<Stream test.asf>
Feed feed1.ffm
Format asf
VideoFrameRate 15
VideoSize 352x240
VideoBitRate 256
VideoBufferSize 40
VideoGopSize 30
AudioBitRate 64
StartSendOnKey
</Stream>


# MP3 audio

#<Stream test.mp3>
#Feed feed1.ffm
#Format mp2
#AudioCodec mp3
#AudioBitRate 64
#AudioChannels 1
#AudioSampleRate 44100
#NoVideo
#</Stream>


# Ogg Vorbis audio

#<Stream test.ogg>
#Feed feed1.ffm
#Title "Stream title"
#AudioBitRate 64
#AudioChannels 2
#AudioSampleRate 44100
#NoVideo
#</Stream>


# Real with audio only at 32 kbits

#<Stream test.ra>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#NoVideo
#NoAudio
#</Stream>


# Real with audio and video at 64 kbits

#<Stream test.rm>
#Feed feed1.ffm
#Format rm
#AudioBitRate 32
#VideoBitRate 128
#VideoFrameRate 25
#VideoGopSize 25
#NoAudio
#</Stream>


##################################################################
# A stream coming from a file: you only need to set the input
# filename and optionally a new format. Supported conversions:
#    AVI -> ASF

#<Stream file.rm>
#File "/usr/local/httpd/htdocs/tlive.rm"
#NoAudio
#</Stream>

#<Stream file.asf>
#File "/usr/local/httpd/htdocs/test.asf"
#NoAudio
#Author "Me"
#Copyright "Super MegaCorp"
#Title "Test stream from disk"
#Comment "Test comment"
#</Stream>


##################################################################
# RTSP examples
#
# You can access this stream with the RTSP URL:
#   rtsp://localhost:5454/test1-rtsp.mpg
#
# A non-standard RTSP redirector is also created. Its URL is:
#   http://localhost:8090/test1-rtsp.rtsp

#<Stream test1-rtsp.mpg>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#</Stream>


##################################################################
# SDP/multicast examples
#
# If you want to send your stream in multicast, you must set the
# multicast address with MulticastAddress. The port and the TTL can
# also be set.
#
# An SDP file is automatically generated by ffserver by adding the
# 'sdp' extension to the stream name (here
# http://localhost:8090/test1-sdp.sdp). You should usually give this
# file to your player to play the stream.
#
# The 'NoLoop' option can be used to avoid looping when the stream is
# terminated.

#<Stream test1-sdp.mpg>
#Format rtp
#File "/usr/local/httpd/htdocs/test1.mpg"
#MulticastAddress 224.124.0.1
#MulticastPort 5000
#MulticastTTL 16
#NoLoop
#</Stream>


##################################################################
# Special streams

# Server status

<Stream stat.html>
Format status

# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255

#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
</Stream>


# Redirect index.html to the appropriate site

<Redirect index.html>
URL http://www.ffmpeg.org/
</Redirect>


http://www.ffmpeg.org/

아무튼 적절한 코덱을 지원하는 동영상을 찾아서 테스트 해봐야 하겠지만,
해상도는 16의 배수, 프레임은 1이상 이어야 하는 것으로 보인다.
Posted by 구차니
Linux2009. 9. 23. 14:25

[링크 : http://www.gnashdev.org/]
[링크 : http://www.gnu.org/software/gnash/]
[링크 : http://en.wikipedia.org/wiki/Gnash]

Gnash is a GNU Flash movie player. Flash is an animation file format pioneered by Macromedia which continues to be supported by their successor company, Adobe. Flash has been extended to include audio and video content, and programs written in ActionScript, an ECMAScript-compatible language. Gnash is based on GameSWF, and supports most SWF v7 features and some SWF v8 and v9.


포팅기
[링크 : http://kelp.or.kr/korweblog/stories.php?story=08/02/12/8083653]


youtube 등의 포털에서 제공하는 swf 동영상은 무엇으로 플레이 할 수 있는지 모르겠따...





March 10, 2009

It has been a very long time since we last made a release and many did not think we would make one again but, back by popular demand, we are proud to announce a new release: FFmpeg 0.5. Check out the release notes and changelog.

It is codenamed "half-way to world domination A.K.A. the belligerent blue bike shed" to give an idea where we stand in the grand scheme of things and to commemorate the many fruitful discussions we had during its development.

This release includes a very extensive number of changes, but some of the highlights are:

  • Significant work to support at least decoding of all widespread mainstream proprietary codecs, such as:
    • decoders and encoders
      • ALAC
      • Flash Screen Video
      • WMAv2 decoder fixed, WMAv1/v2 encoder
    • decoders
      • Atrac3
      • MLP/TrueHD
      • On2 VP3 improvements and VP5/VP6 support
      • RealAudio Cooker and fixes for 14.4 and 28.8
      • RealVideo RV30/40
      • WMV3/WMV9/VC-1 and IntraX8 frame support for WMV2/VC-1

[링크 : http://ffmpeg.org/]

 비디오 종류
    * FLV1:Sorenson H.263
    * FLV4:On2 TrueMotion VP6

[링크 : http://ko.wikipedia.org/wiki/%ED%94%8C%EB%9E%98%EC%8B%9C_%EB%B9%84%EB%94%94%EC%98%A4]

'Linux' 카테고리의 다른 글

mount() 이용하기 - mount cifs using mount()  (2) 2009.10.22
execl()로 mount 실행하기 - samba  (2) 2009.10.14
/ 는 root // 는?  (0) 2009.09.22
User Mode Linux - UML  (0) 2009.09.15
Avahi daemon은 머하는 넘인고?  (0) 2009.09.14
Posted by 구차니