<p>I need to compress some videos about laboratory experiments which contain motions of some objects. </p>

<p>Since in analysis time intervalls on the video are needed as accurate as the camera captured them, it is important that the conversation doesn't introduce any time stretching, shifting or any other inaccuraries.</p>

<p>I am using <code>ffmpeg</code> (or <code>avconv</code>) for conversion and <code>vp8</code> or <code>h264</code> as video codec. Audo is irrelevant in my case. </p>

<p>Since I am not a video expert, my first question is, if there are any problems regarding time accuracy to expect at all. </p>

<p>If so, my second question is, what I should have in mind to bypass those problems when compressing a video.</p>

<p>To make it more concrete, my first attempts where:</p>

<p><code>avconv -i input{.MP4,webm}</code> </p>

<p>and</p>

<p><code>ffmpeg -vcodec h264 -i input{.MP4,mp4}</code></p>

CC BY-SA 3.0
2015-07-27T09:09:40.500Z
As timing is crucial in your experiment, I suggest that you keep the initial frame rate of the captured source video. Then I would suggest to use a video codec that only uses Intra frames (no prediction). You don't mention which is the original codec/format of your video.
audionuma
CC BY-SA 3.0
2015-07-27T11:25:11.283Z
The original codec was h264 (mp4).
student
CC BY-SA 3.0
2015-07-28T09:15:25.980Z
I wouldn't try to transcode a video that is already in a lossy format as your original source is. Are you having a file size issue that requires transcoding ?
audionuma
CC BY-SA 3.0
2015-07-28T10:29:05.160Z
@audionuma Yes, it's about filesize.
student
<ffmpeg><codec><avconv>
Converting videos and time accuracy; pitfalls and solutions
student
# Converting videos and time accuracy; pitfalls and solutions

(Asked by: username_0 on 2015-07-26)

I need to compress some videos about laboratory experiments which contain motions of some objects.

Since in analysis time intervalls on the video are needed as accurate as the camera captured them, it is important that the conversation doesn't introduce any time stretching, shifting or any other inaccuraries.

I am using `ffmpeg` (or `avconv`) for conversion and `vp8` or `h264` as video codec. Audo is irrelevant in my case.

Since I am not a video expert, my first question is, if there are any problems regarding time accuracy to expect at all.

If so, my second question is, what I should have in mind to bypass those problems when compressing a video.

To make it more concrete, my first attempts where:

`avconv -i input{.MP4,webm}`

and

`ffmpeg -vcodec h264 -i input{.MP4,mp4}`

**Tags:** ffmpeg, codec, avconv

> **Comments:**
> **username_1**: As timing is crucial in your experiment, I suggest that you keep the initial frame rate of the captured source video. Then I would suggest to use a video codec that only uses Intra frames (no prediction). You don't mention which is the original codec/format of your video.  
> **username_0**: The original codec was h264 (mp4).  
> **username_1**: I wouldn't try to transcode a video that is already in a lossy format as your original source is. Are you having a file size issue that requires transcoding ?  
> **username_0**: @username_1 Yes, it's about filesize.  

---

## 0 answers

