2010. 7. 13. 16:04
모바일/안드로이드
출처(Source) : http://yinhsin.blogspot.com/2005/12/how-to-make-mp4-for-streaming.html
Friday, December 16, 2005
how to make mp4 for streaming
Use ffmpeg, FAAC and MPEG4IP to make mp4 for streaming
- To extract the audio track from the source
ffmpeg -i input_file -vn output_file - To encode the raw PCM audio track split by FFmpeg: (use FAAC)
faac -m4 -b64 -r48000 -pLC input_file output_file # for older version
faac -m 4 -b 123 input_file output_file # for newer version
- encoding to ISO MPEG-4 video (bitrate: 300 kbps):
- One pass
ffmpeg -i input_file -an -b 300 -vcodec mpeg4 output_file - first pass
ffmpeg -i input_file -an -pass 1 -passlogfile log_file -qscale 2 -vcodec mpeg4 output_file
second pass
ffmpeg -i input_file -an -pass 2 -passlogfile log_file -b 300 -vcodec mpeg4 output_file
- One pass
- Multiplexing: combining the Audio and Video (using MPEG4IP)
adding a video track
mp4creator -c myvideo.avi -hint mytest.mp4
adding a audio track, -interleave not needed for MP3
mp4creator -c myaudio.aac -hint -interleave mytest.mp4
optimize it
mp4creator -optimize mytest.mp4
Ref: Streaming MPEG-4 with Linux, 2003-03-13
'모바일 > 안드로이드' 카테고리의 다른 글
| Audio Capture (0) | 2010.09.24 |
|---|---|
| How to implement Swipe action in Android (0) | 2010.09.23 |
| 안드로이드 UI (0) | 2010.07.13 |
| Play MediaPlayer with Authentication on Android (0) | 2010.07.08 |
| Audio and Video (0) | 2010.07.08 |