To get info abaut video file content:
$ avprobe <file>
* .mp4 files
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './video_fps60.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.19.100
Duration: 01:41:19.63, start: 0.000000, bitrate: 4427 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 1280x720, 4285 kb/s, 59.94 fps, 90k tbn, 119.88 tbc
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, fltp, 125 kb/s
Did not allow keep aac audio codec:
encoder 'aac' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.
So I change it to ac3, set 2 audio chanels and 4 threads cause my CPU i5, I have 4 cores available:
$ avconv -i video_fps60.mp4 -threads 4 -r 24 -acodec ac3 -ac 2 video_fps24.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './video_fps24.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf54.20.4
Duration: 00:01:24.33, start: 0.000000, bitrate: 3246 kb/s
Stream #0.0(und): Video: h264 (High), yuv420p, 1280x720, 3053 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
Stream #0.1(eng): Audio: ac3, 44100 Hz, stereo, fltp, 191 kb/s
* .mkv files
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libvorbis)
Stream #0:2 -> #0:2 (? -> ass)
Error while opening encoder for output stream #0:2 - maybe incorrect parameters such as bit_rate, rate, width or height
First stream is video, second audio, I don't event know what the third stream is, i guess i don't need it. So I use map, to specify only streams I want to include.
$ avconv -i video_fps60.mkv -map 0:0 -map 0:1 -threads 4 -r 30 video_fps24.mkv
$ avconv -i video_fps60.mkv -map 0:0 -map 0:1 -s 480x800 -threads 4 -r 24 video_fps24.mkv
From 4.3 GB file I get 3.6 GB (30 fps ) and 1.9 GB (480x800 and 24 fps).
To see all supported codecs
$ avconv -codecs
No comments:
Post a Comment