Размер видео сжатия s и кодеки из JPEG

546
Vinny

Я строю регистратор данных с 3-мя камерами, которые выводят в формате jpeg (o.79MB / jpeg @ 24bit / pixel) со скоростью 24 кадра в секунду. Я хочу взять эти изображения и преобразовать их в видео. каждый

Для видео я пытаюсь оценить размер видео и формат кодирования, который я должен использовать для получения видео 1080p качества? И как оценить время, которое потребуется для кодирования видео?

Существует ли формула для оценки окончательного объема данных, который может быть достигнут?

0

1 ответ на вопрос

1
slhck

Is there a formula that exists to estimate, the final data size that can be achieved?

No. The size largely depends on the encoding settings you choose, that is, the rate control mode, the average bitrate or average quality, the framerate, the tradeoff between compression efficiency and speed, the specific encoder, etc.

Of course, if you have a trivial constant bitrate encoding process, then the output file size is easy to calculate. But in most cases you'd rather not want to force a fixed bitrate.

For the video I am trying to estimate the size of the video and the encoding format I should use to produce a 1080p video quality?

1080p just refers to a resolution of 1080 pixels vertically. There is no inherent "quality" attached to these dimensions. When you talk about quality you'd generally categorize it as:

  • lossless (mathematically lossless)
  • visually lossless (differences between original and encoded version not visible to the human eye)
  • lossy

When choosing a lossless codec like raw YUV, FFV1 or HuffYUV, your only worry is file size. When choosing a visually lossless codec like ProRes or DNxHD, you may still run into high file sizes that are unsuitable for online streaming.

For the lossy part, you should think about what your requirements are. Is fast encoding more important than low file size? Are you worried about compression artifacts or should the video be streamed through the web and therefore be compressed? Are you planning to just archive the stream to watch it later?

Depending on the answer to the above questions, you may prefer a single-pass fast encoding preset with low and constrained bitrate to enable web streaming. Or you maybe want a two-pass slow encoding preset with a constant quality mode (e.g., CRF in x264), if you care about fidelity but still want a rather small size.

And how to estimate the time it would take to encode the video?

This depends on your CPU capabilities, the pixel dimensions and frame rate of the video, its spatiotemporal complexity and the encoder options. With libx264, for example, you have various presets to choose from. See the FFmpeg H.264 encoding guide for some tips.

Большое спасибо за ответ. Как и мои исследования, мне кажется, что я собираю больше вопросов, чем ответов: D. Чтобы ответить на ваши вопросы, мои основные требования - качество видео и размер файла. Я пытаюсь вывести качество видео для экрана 1920x1080, и я уверен, что это будет сжатие с потерями, чем без потерь. Vinny 8 лет назад 0
Каковы ваши ограничения размера файла, точно? Вы транслируете по ограниченному каналу или экран напрямую подключен к источнику? Вы должны быть в состоянии сделать что-то простое, например, `ffmpeg -i-c: v libx264 -crf 20 -предустановить медленный вывод .mp4`. CRF 20 означает довольно высокое визуальное качество. Медленная предустановка обеспечит лучшее сжатие, но, как следует из названия, работает медленнее во время кодирования. Вы можете варьировать качество с помощью параметра CRF; ниже - лучше. 18 уже должно быть довольно визуально без потерь. CRF +/- 6 дает примерно половину или удвоенный размер файла. slhck 8 лет назад 0

Похожие вопросы