It's time to show advantages for FFMPEG when your media player can not play some media with certain codecs or formats.The tutorial leads you to convert the media from m2ts to avi.
1 Install extra libs(If you need)
sudo apt-get install libxvidcore-dev libfaad-dev libfaac-dev2 Build the ffmpegcd ffmpeg./configure --enable-gpl --enable-libxvid --enable-libfaac --enable-nonfree makesudo make install3 Check information of the input filedjstava@Gateway:~/ffmpeg$ ffmpeg -i ~/Videos/samsum-1080P.m2ts
FFmpeg version SVN-r25137, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 19 2010 10:50:36 with gcc 4.4.3
configuration: --enable-gpl --enable-libxvid --enable-libfaac --enable-nonfree
libavutil 50.27. 0 / 50.27. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.89. 0 / 52.89. 0
libavformat 52.78. 5 / 52.78. 5
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.39. 0 / 1.39. 0
libswscale 0.11. 0 / 0.11. 0
Input #0, mpegts, from '/home/djstava/Videos/samsum-1080P.m2ts':
Duration: 00:00:29.80, start: 599.958300, bitrate: 14510 kb/s
Program 1
Stream #0.0[0x1011](eng): Video: h264, yuv420p, 1920x1080, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc
Stream #0.1[0x1100](eng): Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
At least one output file must be specified
- video bitrate = 14510 kb/s
- video codec = h264
- audio bitrate = 256 kb/s
- audio codec = ac3
4 convert from m2ts to aviffmpeg -i
/home/djstava/Videos/samsum-1080P.m2ts -vcodec mpeg4 -acodec ac3 -ac 2 -ab 256k -deinterlace -s 1920x1080 output.avi
video codec:change h264 to mpeg4
audio codec:the same
5 Check information of the output filedjstava@Gateway:~/ffmpeg$ ffmpeg -i djstava.avi
FFmpeg version SVN-r25137, Copyright (c) 2000-2010 the FFmpeg developers
built on Sep 19 2010 10:50:36 with gcc 4.4.3
configuration: --enable-gpl --enable-libxvid --enable-libfaac --enable-nonfree
libavutil 50.27. 0 / 50.27. 0
libavcore 0. 9. 0 / 0. 9. 0
libavcodec 52.89. 0 / 52.89. 0
libavformat 52.78. 5 / 52.78. 5
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.39. 0 / 1.39. 0
libswscale 0.11. 0 / 0.11. 0
Seems stream 0 codec frame rate differs from container frame rate: 24000.00 (24000/1) -> 23.98 (24000/1001)
Input #0, avi, from 'djstava.avi':
Metadata:
ISFT : Lavf52.78.5
Duration: 00:00:17.72, start: 0.000000, bitrate: 2136 kb/s
Stream #0.0: Video: mpeg4, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 256 kb/s
At least one output file must be specified
djstava
阅读(2896) | 评论(0) | 转发(0) |