[FFmpeg-user] Slicing a 4K video to images and then encoding them back using the same codec

Liran Sharoni Liran.Sharoni at sandisk.com
Sun Oct 18 13:46:34 CEST 2015

I don’t have 2 files, I have only 1 movie , and thats it.
 If I had 2 files already the problem would be solved, I asked a question because I don’t know how to do it.
I followed up on Keiren's suggestion to try it , but didn't get the same properties .

When I mean "nearly identical" I mean EVERYTHING = contaminate the video as little as possible ( besides the superimposed numbers)
Instead of following the parameters Data-rate (constant\variable and quantity), Frame-rate(constant\variable and quantity) etc. I want a method to keep the previous encoding parameters of the video ( the original non-numbered one).

If a suggestion like Kieran would work with "-vcodec copy" I'd be a happy man , but this isn't the case , because I get an error ( for applying a filter)

-----Original Message-----
From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Moritz Barsnick
Sent: Friday, October 16, 2015 1:25 PM
To: FFmpeg user discussions
Subject: Re: [FFmpeg-user] Slicing a 4K video to images and then encoding them back using the same codec

On Thu, Oct 15, 2015 at 16:14:40 +0000, Liran Sharoni wrote:

> But the video created is not the same at all ( I can see this using
> media info) :The container format profile is not Base Media/Version 2
> , the codec ID is not mp42, some data is not even displayed here like
> Overall bit rate mode and the list goes on.

You weren't clear with what you meant by "a nearly identical video".

First of all, ffmpeg's encoder/muxer knows little about the demuxer/decoder. So YOU will have to provide the correct encoding parameters.

Secondly, you need to define what your constraints are. Same format/codec/profile? Same bitrate? Same codec parameters (there are many!)?

You didn't provide the full uncut console output, as requested by Kieran, so there is some guessing involved. And mediainfo output isn't always useful. Please (also) provide the output of ffprobe or "ffmpeg -i" for both files, and the correct command and the full console output for the conversion process.

Most importantly: How did you manage to create a 2-second output from a 3-minute input???? Your command line, the console output, and the file analysis (in this case: mediainfo output) must match, otherwise you are causing a lot of confusion!

> * also I couldn’t use the drawtext filter to display the numbers from
> 1 ( only from 0 , tried using expr but it only showed me "n+1}" on the
> video)

I think you used expressions incorrectly. And I needed more backslashes than you (only the "text=" is relevant to you):
  -vf "drawtext=fontsize=200:fontfile=c\\:\\\\Windows\\\\Fonts\\\\consola.ttf:box=1::text=%{eif\\:n+1\\:d}"
Works for me.

ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org


PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).

More information about the ffmpeg-user mailing list