- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在使用 LibAV 进行视频编码,无法理解 linesize
的用途。
例如,LibAV 中 av_image_alloc
函数的声明将行大小作为参数:
int av_image_alloc ( uint8_t * pointers[4],
int linesizes[4],
int w,
int h,
enum AVPixelFormat pix_fmt,
int align
)
我是 LibAV 和视频编码的新手。请随意提供任何链接,这也可以给我一些视频编码的背景知识。
最佳答案
linesize
是内存中每个颜色 channel 的图像宽度。对于内存对齐问题,它可能大于或等于 w
。
检查 ffmpeg av frame doc :
For video the linesizes should be multiples of the CPUs alignment preference, this is 16 or 32 for modern desktop CPUs. Some code requires such alignment other code can be slower without correct alignment, for yet other it makes no difference.
The linesize may be larger than the size of usable data – there may be extra padding present for performance reasons.
关于c++ - LibAV 中的 `linesize` 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53257213/
来自Linux背景。我只是想知道在 OSX 上安装 avprobe 的最佳方法是什么? 我尝试安装 libav:http://libav.org/download.html但这似乎使用了avconf。
如何在FFmpeg C API中编码之前为帧计算正确的PTS值? 为了进行编码,我使用了avcodec_encode_video2函数,然后通过av_interleaved_write_frame编写
使用 libav 保存视频中的帧。 问题是,如果你多次调用 decode 函数,然后调用 2nd,然后就没有正确处理。 第一次这样的结论(一切正常): [swscaler @ 0x8b48510]No
我正在尝试制作一个简单的 av 播放器,在某些情况下,我可以正确获取如下值: checking /media/timecapsule/Music/02 Baawre.mp3 [mp3 @ 0x7f06
我在OS X Mavericks上没有安装libav的运气。我已经尝试了一切。 我正在遵循此指南:http://earthwithsun.com/questions/568464/install-la
尝试使用 ffmpeg 打开网络摄像头(ffplay -f video4linux2/dev/video0 有效 pFormatCtx = NULL; av_register_all(
我使用下面的命令来转换文件 ./avconv -i inputFile -vcodec libx264 -trellis 2 -crf 23 -tune psnr -vf Crop='trunc(iw
我试图通过使用代码将 MP2 文件转换为原始 PCM 来获得与 ffmpeg/avconv 相同的输出。我使用了 the tutorial included in the FFmpeg/Libav d
我正在关注 ffmpeg 文档中的音频编码示例:https://www.ffmpeg.org/doxygen/0.6/api-example_8c-source.html 但我想解码 .wav 文件,
我正在尝试使用 libav(ffmpeg) 创建带有 MJPEG 视频负载的 RTP 流示例代码非常简单,适用于 MPEG1我看到 MJPEG 中的编码有效,但是当我需要发送 mjpeg 时帧 RTP
有没有办法使用 libav/avconv 来复制 FFMPEG 中瓦片过滤器的效果? 我正在尝试为每十秒的视频输入创建一个从左到右的图像 strip 。 我的计划是首先生成图像,然后创建图像条。最好我
我正在尝试使用 libav 在我的应用程序中删除视频的某些部分,例如在长度为 00:08:00 的视频中,我尝试删除帧 100-250 和 400-500(仅作为示例)。 我写了这段代码来复制 AVP
我有一个能够同时生成 5 个 mpeg 传输流的程序。每个流都有自己的上下文,并在独立的线程中完成。当只有一个流处于事件状态时,一切都很好。一旦我激活另一个流,我的帧速率就会大大下降。两个流仍然可以正
我有一系列编码数据包、H.264 视频和 AAC 音频。当它们出现时,我正在使用 av_write_frame 将它们写入视频文件。 连续给定以下情况 10秒视频,然后 10 秒的视频和音频,然后 1
我看到了这个答案,Libav (ffmpeg) copying decoded video timestamps to encoder 但我仍然不明白为什么我们需要流时基和编解码器时基。目前我正在尝试
我正在尝试学习使用 libav。我遵循了 dranger.com 上的第一个教程,但有一次我有点困惑。 // Write pixel data for(y=0; ydata[0]+y*pFrame->
我有一个从我的手机以纵向模式拍摄的视频。以下是有关视频的转储信息: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.MOV': Metadata: maj
我有一个带有卡住(热)像素的视频,我想修复它,比如说用相邻像素的平均值替换像素。我在 Ubuntu 上,所以我想使用 libav/ffmpeg,但我真的不知道该怎么做。谁能提供一个简单的解决方案? 最
这个问题在这里已经有了答案: FFMPEG (libx264) "height not divisible by 2" (7 个回答) 5年前关闭。 我需要批量处理一堆视频以将它们的高度缩放到 240
我目前正在使用 libav 将视频的音频流提取到原始 PCM 文件中。 此代码适用于 mp3,但当我尝试使用 mp4 视频时,Audacity 上导入的原始格式显示奇怪的 0 到 -1 之间的规则下降
我是一名优秀的程序员,十分优秀!