152 sao GitHub và vẫn tăng — OptimalBits/navcodec là dự án C++ mà TopGit đang theo dõi trên nền tảng. nodejs extension for libavcodec
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
navcodec provides a high level and flexible javascript module for video and audio transcoding based on the excelent libavcodec(from the FFmpeg team) library.
This module can transcode almost any known video and audio format efficiently, it can generate multiple thumbnails or output video in multiple resolutions in parallel quickly with low memory consumption while also optimizing the output for web reproduction.
Follow optimalbits for news and updates regarding this library.
This will transcode myinput.mov into myoutput.mp4 according to the given options. The callback will be called with a progress variable between 0 and 100.
Since the transcode uses mostly libavcodec optimized functions, the above example will run really fast.
Available options (and their defaults):
// Input
itsoffset (n/a)
y (true)
stats (true)
logLevel (n/a)
// Output
streamCopy (n/a, nullfies a videoBitrate, videoCodec, audioBitrate, audioCodec, sampleRate)
// Video
width (input width)
height (input height)
videoBitrate (input bitrate if available, 0 otherwise)
videoCodec (standard codec for current file container)
keepAspectRatio (true)
rotate ('clock' for clockwise, 'cclock' for counter clockwise)
fps (specify the output frames per second)
minFps (specify the output minimum frames per second)
skipVideo (false)
skipVideoFrames (0)*
videoBSF (n/a)
format (n/a)
// Audio
audioBitrate (input bitrate if available, 0 otherwise)
sampleRate (44100)
channels (2)
audioCodec (standard codec for current file container)
skipAudio (false)
format (n/a)
// Thumbnails
keepAspectRatio (true)
width (input width)
height (input height)
*Experimental feature.
Multiple outputs
Several outputs can be added to the media object, and when transcoding the data will be processed in parallel. This is quite convenient when generating thumbnails (which will be very cheap to generate), or if several output formats are required (will only require one decoding process of the input file):
You can use Navcodec to transcode a video into multiple resolutions, forming
a pyramid of resolutions, than can later be used to deliver the most efficient version for a given client in terms of screen resolution or bandwidth.
This will produce a pyramid of videos like the following:
1080-new.mp4
70
##Jpeg Thumbnails
A very common use case is the generation of a jpeg thumbnail to represent some video sequence. This can be easily accomplished by calling the function thumbnail. It can be called once or several times if different options are required. See the following example, where for every generated thumbnail a time offset is choosen:
Normally, a mp4 file created by ffmpeg or any other transcoder, places the index at the end of the file (moov block). This makes impossible for a web browser to perform seeking until the whole file has been downloaded.
Navcodec includes a useful utility called relocateMoov that will move the moov atom at the begining of the file, thus making it better for seeking in a web based player. Example:
navcodec depends on libavcodec, and this library
must be installed before you can install this module using npm.
The current version of libavcodec needed by navcodec is 0.9.1 and above.
For most unixes there are packages available, in ubuntu for example use libavcodec-dev. If you want you can also compile the source code with your preferred settings, this can be useful if you want to get the maximum performance from the library.
For Mac OSX use brew and install the ffmpeg package.
brew install ffmpeg
Note that version 0.9.x of libavcodec is brand new and the afore mentioned package managers may not have yet updated it.
When the libavcodec dependencies are fulfilled, just use npm to install the package:
npm install navcodec
Compiling libavcodec (Recommended)
Download the latest stable 0.9.x release from libav.org
you can get a list of other configuration options using:
./configure --help
Compile the libraries:
make
Install
make install
Notes
Mac users will need to install Xcode in order to be able to compile libavcodec by themselves.
It may be needed to install libvpx separatelly if you need WebM support (in Mac):
brew install libvpx
References
Ubuntu HOWTO: Install and use the latest FFmpeg and x264
Roadmap
Multiple pass encoding
Support presets
Support for filters
License
Copyright(c) 2012 Optimal Bits Sweden AB. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/OptimalBits/navcodec là nguồn chính thức.
OptimalBits/navcodec có bao nhiêu sao?
OptimalBits/navcodec có 152 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/OptimalBits/navcodec. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
OptimalBits/navcodec có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho OptimalBits/navcodec. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
OptimalBits/navcodec còn đang phát triển không?
Commit gần nhất trên OptimalBits/navcodec là 10.0 năm trước (theo timestamp GitHub). Repo có 19 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
OptimalBits/navcodec là gì?
OptimalBits/navcodec (OptimalBits/navcodec) là dự án C++ trên GitHub. Theo mô tả gốc: nodejs extension for libavcodec
Đọc đầy đủ README ở tab phía trên.
Chưa chắc navcodec có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về navcodec.