[FFmpeg-user] Compressibility Check

Brendan Brewster brendan.brewster at gmail.com
Mon Apr 2 00:08:20 CEST 2012


On Sun, Apr 1, 2012 at 6:06 PM, Brendan Brewster <brendan.brewster at gmail.com
> wrote:

> On Wed, Mar 28, 2012 at 11:42 AM, Brendan Brewster <
> brendan.brewster at gmail.com> wrote:
>
>> On Tue, Mar 27, 2012 at 10:14 PM, dE . <de.techno at gmail.com> wrote:
>>
>>> On 03/27/12 21:34, Brendan Brewster wrote:
>>>
>>>> On Mon, Mar 26, 2012 at 11:53 PM, dE .<de.techno at gmail.com>  wrote:
>>>>
>>>>  On 03/27/12 04:52, Brendan Brewster wrote:
>>>>>
>>>>>  Hi,
>>>>>>
>>>>>> I am trying to implement a compressibility check via ffmpeg to
>>>>>> determine
>>>>>> an
>>>>>> appropriate resolution for the full encode.
>>>>>>
>>>>>>  Can you please be more clear about what you're trying to do? What do
>>>>> you
>>>>> mean by 'compressibility'. Changing resolution is just one of changing
>>>>> compression level.
>>>>>
>>>>>  The idea is to take some percentage of the input, say 5%, at various
>>>> points
>>>> throughout and encode this with the default (input) resolution and
>>>> bitrate.
>>>> I have a specific file size to meet, such as DVD5, and therefore know
>>>> the
>>>> bitrate cap in order to fit my output onto the destination media (given
>>>> a
>>>> certain audio bitrate). I can then determine the number of bits per
>>>> pixel
>>>> for the default encode and prepare ratios with regard to lesser
>>>> resolutions
>>>> with the enforced bitrate. We choose a lower resolution if the ratio is
>>>> poor. This is what I mean by a compressibility check. Similar
>>>> functionality
>>>> was implemented by the legacy Gordian Knot as well as within Tuxrip.
>>>>
>>>> I would just like to speed up my analysis by avoiding the majority of
>>>> the
>>>> seek time incurred especially in passes that pinpoint points later in
>>>> the
>>>> input video stream. I was really hoping that there might be a way to
>>>> achieve the same end via one pass.
>>>>
>>>> Thanks,
>>>> Brendan
>>>> ______________________________**_________________
>>>> ffmpeg-user mailing list
>>>> ffmpeg-user at ffmpeg.org
>>>> http://ffmpeg.org/mailman/**listinfo/ffmpeg-user<http://ffmpeg.org/mailman/listinfo/ffmpeg-user>
>>>>
>>>
>>> From what I understand, you're asking for CBR, but that can be done
>>> using a combination of -maxrate and -minrate. That will reduce on the
>>> quality not resolution. This way you can keep the resolution constant.
>>>
>>> ______________________________**_________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/**listinfo/ffmpeg-user<http://ffmpeg.org/mailman/listinfo/ffmpeg-user>
>>>
>>
>> I appreciate your response but no, I'm not looking for guidance on
>> achieving CBR. My intent is to pick an appropriate resolution for the given
>> bitrate. I have no issues staying within my target output size during the
>> full encode no matter the resolution. All I'm trying to do is optimize my
>> current solution for the initial analysis prior to the actual full encode.
>>
>> Maybe someone else has some thoughts for me :)
>>
>> Thanks,
>> Brendan
>>
>
> Just putting this out there in case it's helpful for anyone else since I
> found a solution that works for me per my initial requirements.
>
> Basically, the following command will encode approximately 5%, 15 seconds
> every 5 min segment except the latter dependent on its size, of the input
> source (knowing the source frame rate is as indicated). This is a much more
> efficient solution and affords the same analysis I was looking for.
>
> ffmpeg -i 'VTS_01_PGC_01_1.VOB -filter:v 'select=lt(mod(t\,300)\,15),
> setpts=N/(29.97*TB), yadif' -target ntsc-dvd -f mpeg2video -q 1 -mbd rd
> -trellis 1 -cmp 2 -subcmp 2 -g 15 -an - 2>/dev/null | wc -c
>
> -Brendan
>
>
Sorry, I had a single quote floating in front of VTS that shouldn't have
been there. Corrected:

ffmpeg -i VTS_01_PGC_01_1.VOB -filter:v 'select=lt(mod(t\,300)\,15),
setpts=N/(29.97*TB), yadif' -target ntsc-dvd -f mpeg2video -q 1 -mbd rd
-trellis 1 -cmp 2 -subcmp 2 -g 15 -an - 2>/dev/null | wc -c

-Brendan


More information about the ffmpeg-user mailing list