[FFmpeg-devel] Adding Rollup support in Closed caption
Anshul
anshul.ffmpeg at gmail.com
Sat Feb 7 06:39:28 CET 2015
On 02/07/2015 10:30 AM, Michael Niedermayer wrote:
> On Fri, Feb 06, 2015 at 08:22:40PM +0530, Anshul wrote:
>> On 01/30/2015 08:49 AM, Anshul wrote:
>>> On January 30, 2015 4:23:08 AM IST, Michael Niedermayer <michaelni at gmx.at> wrote:
>>>> @@ -426,10 +466,13 @@ static int process_cc608(CCaptionSubContext
>>>> *ctx, int64_t pts, uint8_t hi, uint8
>>>>> handle_delete_end_of_row(ctx, hi, lo);
>>>>> } else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x25 ) {
>>>>> ctx->rollup = 2;
>>>>> + ctx->mode = CCMODE_ROLLUP_2;
>>>>> } else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x26 ) {
>>>>> ctx->rollup = 3;
>>>>> + ctx->mode = CCMODE_ROLLUP_3;
>>>>> } else if ( COR3(hi, 0x14, 0x15, 0x1C) && lo == 0x27 ) {
>>>>> ctx->rollup = 4;
>>>>> + ctx->mode = CCMODE_ROLLUP_3;
>>>> is this intended to be CCMODE_ROLLUP_3 instead of CCMODE_ROLLUP_4 ?
>>>>
>>>> also do you have a file to test this and the other patches ?
>>>>
>>>> thanks
>>>>
>>>> [...]
>>> I tested this on bmd live video, all the rollup values were not tested, I implemented this feature when roll up 2 was coming.
>>>
>>> I will check the database of ccextractor, if I get some video with different rollup.
>>>
>>>
>>> -Anshul
>>>
>> I have attached the patch which were not commited, In the rollup
>> functionality there was one more
>> bug other then typo, the first line was lost while converting the cc.
>> I have corrected that.
>>
>> Here <http://gsocdev.ccextractor.org/%7Eanshul/test_video/Closedcaption_rollup.ts>
>> is video with rollup in closed caption.
> how can this be used for testing ?
> do you have a command line with that video that shows a difference
> with the patches ?
> the patches themselfs look good
>
> [...]
There is no different Command, its same as used to extract.
./ffmpeg_g -loglevel debug -f lavfi -i
movie=/home/anshul/test_video/Closedcaption_rollup.ts[out0+subcc] some.srt
The difference between the output is following
Without patch
<at xyz1 time>
some line 1
some line 2
<at xyz2 time>
some line 3
some line 4
with patch
<at xyz1 time>
some line 1
some line 2
<at xyz2 time>
some line 2
some line 3
<at xyz3 time>
some line 3
some line 4
And rollup functionality is specified in closed caption commands(inside
video).
So on same video rollup and without rollup is not possible.
>> @@ -187,7 +187,7 @@ static av_cold int init_decoder(AVCodecContext *avctx)
>> ret = AVERROR(ENOMEM);
>> }
>>
>> -
>> +fail:
>> return ret;
>> }
>>
> i moved this hunk to the 2nd patch and applied first and second
> with also module "avcodec/..." prefixes in the commit messages
>
> Thanks
>
> [...]
>
>
-Anshul
More information about the ffmpeg-devel
mailing list