Discussion:
H264 video and AVPacket::duration
Alex Sukhanov
2013-11-19 22:27:55 UTC
Permalink
Hi Michael and ffmpeg-devel,

I recently found that for H264 video ffmpeg demuxers and ffprobe doesn't
set AVPacket::duration field.
This is typical ffprobe output for H264 video packed into FLV container:

packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_


I found following patch, which may be related:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
I understand the problem with interlaced video which you fixed in this
patch, but I wanted to ask you If it's possible to move back calculation of
AVPacket::duration for codecs which support Interlace?

I would like to solve my problem and rollback aforementioned patch, but
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?


Thanks for you help in advance
Michael Niedermayer
2013-11-20 01:58:10 UTC
Permalink
Post by Alex Sukhanov
Hi Michael and ffmpeg-devel,
I recently found that for H264 video ffmpeg demuxers and ffprobe doesn't
set AVPacket::duration field.
packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
I understand the problem with interlaced video which you fixed in this
patch, but I wanted to ask you If it's possible to move back calculation of
AVPacket::duration for codecs which support Interlace?
I would like to solve my problem and rollback aforementioned patch, but
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?
if you have a file with mixed interlaced and progressive packets
does reverting the commit produce correct durations?
what if a parser is initialized ?

also can you share the/a file that is affected (its always useful
if everyone can look at the same data insteda of everyone using a
different file)

[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
Alex Sukhanov
2013-11-20 03:18:13 UTC
Permalink
See my replies inline please.
Post by Alex Sukhanov
Post by Alex Sukhanov
Hi Michael and ffmpeg-devel,
I recently found that for H264 video ffmpeg demuxers and ffprobe doesn't
set AVPacket::duration field.
packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
Post by Alex Sukhanov
I understand the problem with interlaced video which you fixed in this
patch, but I wanted to ask you If it's possible to move back calculation
of
Post by Alex Sukhanov
AVPacket::duration for codecs which support Interlace?
I would like to solve my problem and rollback aforementioned patch, but
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?
if you have a file with mixed interlaced and progressive packets
does reverting the commit produce correct durations?
what if a parser is initialized ?
Unfortunately I don't have file which is a mix of interlace/progressive
frames. May I ask you also to share this file with me?
I tried to find issue1756, which you mentioned in the patch and get the
file, but link https://trac.ffmpeg.org/ticket/1756 leads to Winter website
logo contest.
Post by Alex Sukhanov
also can you share the/a file that is affected (its always useful
if everyone can look at the same data insteda of everyone using a
different file)
Sure, will do. Right now I don't have access to my computer, will update
this thread tomorrow once I have uploaded it.
Post by Alex Sukhanov
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
_______________________________________________
ffmpeg-devel mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Carl Eugen Hoyos
2013-11-20 12:07:04 UTC
Permalink
Post by Alex Sukhanov
I tried to find issue1756, which you mentioned in
http://thread.gmane.org/gmane.comp.video.ffmpeg.issues/9152
Post by Alex Sukhanov
the patch and get the file
http://samples.ffmpeg.org/ffmpeg-bugs/roundup/issue1756/

Carl Eugen
Alex Sukhanov
2013-11-20 19:02:10 UTC
Permalink
Post by Alex Sukhanov
Post by Alex Sukhanov
Hi Michael and ffmpeg-devel,
I recently found that for H264 video ffmpeg demuxers and ffprobe doesn't
set AVPacket::duration field.
packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
Post by Alex Sukhanov
I understand the problem with interlaced video which you fixed in this
patch, but I wanted to ask you If it's possible to move back calculation
of
Post by Alex Sukhanov
AVPacket::duration for codecs which support Interlace?
I would like to solve my problem and rollback aforementioned patch, but
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?
if you have a file with mixed interlaced and progressive packets
does reverting the commit produce correct durations?
what if a parser is initialized ?
also can you share the/a file that is affected (its always useful
if everyone can look at the same data insteda of everyone using a
different file)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
_______________________________________________
ffmpeg-devel mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Hi,
I was told that I can share file only with Michael. File sent directly to
him. Sorry that I can not share it with everyone.
I had some time yesterday to study FFmpeg version which we use currently
(It's a few years old), and I found that we modified our FFmpeg and moved
AVPacket::duration computation back. Now we are updating FFmpeg and we
faced with this problem again. As long as we computed AVPacket::duration
all the time, looks like it's safe to rollback
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb

I saw that Carl's email how to retrieve your file. Let me try it also.

Thanks for your help
Michael Niedermayer
2013-11-20 22:35:23 UTC
Permalink
Post by Alex Sukhanov
Post by Alex Sukhanov
Post by Alex Sukhanov
Hi Michael and ffmpeg-devel,
I recently found that for H264 video ffmpeg demuxers and ffprobe doesn't
set AVPacket::duration field.
packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
Post by Alex Sukhanov
I understand the problem with interlaced video which you fixed in this
patch, but I wanted to ask you If it's possible to move back calculation
of
Post by Alex Sukhanov
AVPacket::duration for codecs which support Interlace?
I would like to solve my problem and rollback aforementioned patch, but
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?
if you have a file with mixed interlaced and progressive packets
does reverting the commit produce correct durations?
what if a parser is initialized ?
also can you share the/a file that is affected (its always useful
if everyone can look at the same data insteda of everyone using a
different file)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
_______________________________________________
ffmpeg-devel mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Hi,
I was told that I can share file only with Michael. File sent directly to
him. Sorry that I can not share it with everyone.
I had some time yesterday to study FFmpeg version which we use currently
(It's a few years old), and I found that we modified our FFmpeg and moved
AVPacket::duration computation back. Now we are updating FFmpeg and we
faced with this problem again. As long as we computed AVPacket::duration
all the time, looks like it's safe to rollback
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
what about PAFF
PAFF means mixed fields and frames
the code sets duration to a constant, how is a constant going to
equal 2 different durations ?
also a packet can contain a frame that is supposed to be displayed
for 3 fields time
i must be missing something, as to me it looks like this works just
because such cases are rare


[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
Alex Sukhanov
2013-11-21 00:07:36 UTC
Permalink
Post by Alex Sukhanov
Post by Alex Sukhanov
Post by Michael Niedermayer
Post by Alex Sukhanov
Hi Michael and ffmpeg-devel,
I recently found that for H264 video ffmpeg demuxers and ffprobe
doesn't
Post by Alex Sukhanov
Post by Michael Niedermayer
Post by Alex Sukhanov
set AVPacket::duration field.
This is typical ffprobe output for H264 video packed into FLV
packet|codec_type=audio|stream_index=1|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=103|flags=K_
*packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=4188|pos=132|flags=K_*
packet|codec_type=audio|stream_index=1|pts=23|pts_time=0.023000|dts=23|dts_time=0.023000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4337|flags=K_
*packet|codec_type=video|stream_index=0|pts=37|pts_time=0.037000|dts=37|dts_time=0.037000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=43|pos=4366|flags=__*
packet|codec_type=audio|stream_index=1|pts=46|pts_time=0.046000|dts=46|dts_time=0.046000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=9|pos=4426|flags=K_
packet|codec_type=audio|stream_index=1|pts=70|pts_time=0.070000|dts=70|dts_time=0.070000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=56|pos=4452|flags=K_
*packet|codec_type=video|stream_index=0|pts=73|pts_time=0.073000|dts=73|dts_time=0.073000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=26|pos=4528|flags=__*
packet|codec_type=audio|stream_index=1|pts=93|pts_time=0.093000|dts=93|dts_time=0.093000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=607|pos=4571|flags=K_
*packet|codec_type=video|stream_index=0|pts=110|pts_time=0.110000|dts=110|dts_time=0.110000|duration=N/A|duration_time=N/A|convergence_duration=N/A|convergence_duration_time=N/A|size=31|pos=5198|flags=__*
packet|codec_type=audio|stream_index=1|pts=116|pts_time=0.116000|dts=116|dts_time=0.116000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=599|pos=5246|flags=K_
packet|codec_type=audio|stream_index=1|pts=139|pts_time=0.139000|dts=139|dts_time=0.139000|duration=23|duration_time=0.023000|convergence_duration=N/A|convergence_duration_time=N/A|size=611|pos=5862|flags=K_
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
Post by Alex Sukhanov
Post by Michael Niedermayer
Post by Alex Sukhanov
I understand the problem with interlaced video which you fixed in
this
Post by Alex Sukhanov
Post by Michael Niedermayer
Post by Alex Sukhanov
patch, but I wanted to ask you If it's possible to move back
calculation
Post by Alex Sukhanov
Post by Michael Niedermayer
of
Post by Alex Sukhanov
AVPacket::duration for codecs which support Interlace?
I would like to solve my problem and rollback aforementioned patch,
but
Post by Alex Sukhanov
Post by Michael Niedermayer
Post by Alex Sukhanov
before that I wanted to check with you and probably encourage some
discussion.
What do you think? Should I elaborate a fix in different way?
if you have a file with mixed interlaced and progressive packets
does reverting the commit produce correct durations?
what if a parser is initialized ?
also can you share the/a file that is affected (its always useful
if everyone can look at the same data insteda of everyone using a
different file)
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas
make
Post by Alex Sukhanov
Post by Michael Niedermayer
their appearance in the world. -- Aristotle
_______________________________________________
ffmpeg-devel mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Hi,
I was told that I can share file only with Michael. File sent directly to
him. Sorry that I can not share it with everyone.
I had some time yesterday to study FFmpeg version which we use currently
(It's a few years old), and I found that we modified our FFmpeg and moved
AVPacket::duration computation back. Now we are updating FFmpeg and we
faced with this problem again. As long as we computed AVPacket::duration
all the time, looks like it's safe to rollback
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=497431a5b645ffc39cf3acbd333c9ff0f3031adb
what about PAFF
PAFF means mixed fields and frames
the code sets duration to a constant, how is a constant going to
equal 2 different durations ?
also a packet can contain a frame that is supposed to be displayed
for 3 fields time
i must be missing something, as to me it looks like this works just
because such cases are rare
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
_______________________________________________
ffmpeg-devel mailing list
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Michael,

I think you are right: our old FFmpeg works just because it's a rare case.
In worst scenario I can copy duration computation from old ffmpeg to new
one in our private repository, but as I said, I would be happy to elaborate
some universal solution here in public repository, which would fix issue
1756 and set duration for each frame packet at the same time.

What if FFmpeg could distinguish fields and frames and reset packet
duration only if it's a field? That would work for me, because I don't deal
with fields at all. What do you think?
I'm not familiar with Ffmpeg yet, so I also would like to ask if it's
possible and how better to do that?

Thanks again

Loading...