[FFmpeg-devel] [PATCH 1/3] lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters

Michael Niedermayer michael at niedermayer.cc
Wed Jul 13 02:27:16 EEST 2016


On Tue, Jul 12, 2016 at 03:41:38PM -0700, Jon Toohill wrote:
> I'm having a hard time finding software that uses this via simple GitHub
> searches.

FFmpeg itself uses it


>
> I think this should be considered a bugfix, since the struct field states
> that it only represents encoder delay, not decoder delay. I'll send out an
> updated patchset that splits this into more patches, including
> documentation and another minor version bump.

heres a case that this patch breaks:
./ffmpeg -i  ~/videos/matrixbench_mpeg2.mpg  -acodec mp3 -vn -t 1 file.mp4
./ffprobe -show_packets -print_format compact file.mp4

this seems to require libmp3lame which is why it doesnt show up in fate

--- 3-old       2016-07-13 01:19:50.338105803 +0200
+++ 3-new       2016-07-13 01:18:59.354104729 +0200
@@ -1,43 +1,43 @@
-packet|codec_type=audio|stream_index=0|pts=-1105|pts_time=-0.023021|dts=-1105|dts_time=-0.023021|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=44|flags=K
-packet|codec_type=audio|stream_index=0|pts=47|pts_time=0.000979|dts=47|dts_time=0.000979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=428|flags=K
-packet|codec_type=audio|stream_index=0|pts=1199|pts_time=0.024979|dts=1199|dts_time=0.024979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=812|flags=K
-packet|codec_type=audio|stream_index=0|pts=2351|pts_time=0.048979|dts=2351|dts_time=0.048979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1196|flags=K
-packet|codec_type=audio|stream_index=0|pts=3503|pts_time=0.072979|dts=3503|dts_time=0.072979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1580|flags=K
-packet|codec_type=audio|stream_index=0|pts=4655|pts_time=0.096979|dts=4655|dts_time=0.096979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1964|flags=K
-packet|codec_type=audio|stream_index=0|pts=5807|pts_time=0.120979|dts=5807|dts_time=0.120979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=2348|flags=K
-packet|codec_type=audio|stream_index=0|pts=6959|pts_time=0.144979|dts=6959|dts_time=0.144979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=2732|flags=K
-packet|codec_type=audio|stream_index=0|pts=8111|pts_time=0.168979|dts=8111|dts_time=0.168979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3116|flags=K
-packet|codec_type=audio|stream_index=0|pts=9263|pts_time=0.192979|dts=9263|dts_time=0.192979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3500|flags=K
-packet|codec_type=audio|stream_index=0|pts=10415|pts_time=0.216979|dts=10415|dts_time=0.216979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3884|flags=K
-packet|codec_type=audio|stream_index=0|pts=11567|pts_time=0.240979|dts=11567|dts_time=0.240979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=4268|flags=K
-packet|codec_type=audio|stream_index=0|pts=12719|pts_time=0.264979|dts=12719|dts_time=0.264979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=4652|flags=K
-packet|codec_type=audio|stream_index=0|pts=13871|pts_time=0.288979|dts=13871|dts_time=0.288979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5036|flags=K
-packet|codec_type=audio|stream_index=0|pts=15023|pts_time=0.312979|dts=15023|dts_time=0.312979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5420|flags=K
-packet|codec_type=audio|stream_index=0|pts=16175|pts_time=0.336979|dts=16175|dts_time=0.336979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5804|flags=K
-packet|codec_type=audio|stream_index=0|pts=17327|pts_time=0.360979|dts=17327|dts_time=0.360979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6188|flags=K
-packet|codec_type=audio|stream_index=0|pts=18479|pts_time=0.384979|dts=18479|dts_time=0.384979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6572|flags=K
-packet|codec_type=audio|stream_index=0|pts=19631|pts_time=0.408979|dts=19631|dts_time=0.408979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6956|flags=K
-packet|codec_type=audio|stream_index=0|pts=20783|pts_time=0.432979|dts=20783|dts_time=0.432979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=7340|flags=K
-packet|codec_type=audio|stream_index=0|pts=21935|pts_time=0.456979|dts=21935|dts_time=0.456979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=7724|flags=K
-packet|codec_type=audio|stream_index=0|pts=23087|pts_time=0.480979|dts=23087|dts_time=0.480979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8108|flags=K
-packet|codec_type=audio|stream_index=0|pts=24239|pts_time=0.504979|dts=24239|dts_time=0.504979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8492|flags=K
-packet|codec_type=audio|stream_index=0|pts=25391|pts_time=0.528979|dts=25391|dts_time=0.528979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8876|flags=K
-packet|codec_type=audio|stream_index=0|pts=26543|pts_time=0.552979|dts=26543|dts_time=0.552979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=9260|flags=K
-packet|codec_type=audio|stream_index=0|pts=27695|pts_time=0.576979|dts=27695|dts_time=0.576979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=9644|flags=K
-packet|codec_type=audio|stream_index=0|pts=28847|pts_time=0.600979|dts=28847|dts_time=0.600979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10028|flags=K
-packet|codec_type=audio|stream_index=0|pts=29999|pts_time=0.624979|dts=29999|dts_time=0.624979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10412|flags=K
-packet|codec_type=audio|stream_index=0|pts=31151|pts_time=0.648979|dts=31151|dts_time=0.648979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10796|flags=K
-packet|codec_type=audio|stream_index=0|pts=32303|pts_time=0.672979|dts=32303|dts_time=0.672979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11180|flags=K
-packet|codec_type=audio|stream_index=0|pts=33455|pts_time=0.696979|dts=33455|dts_time=0.696979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11564|flags=K
-packet|codec_type=audio|stream_index=0|pts=34607|pts_time=0.720979|dts=34607|dts_time=0.720979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11948|flags=K
-packet|codec_type=audio|stream_index=0|pts=35759|pts_time=0.744979|dts=35759|dts_time=0.744979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=12332|flags=K
-packet|codec_type=audio|stream_index=0|pts=36911|pts_time=0.768979|dts=36911|dts_time=0.768979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=12716|flags=K
-packet|codec_type=audio|stream_index=0|pts=38063|pts_time=0.792979|dts=38063|dts_time=0.792979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13100|flags=K
-packet|codec_type=audio|stream_index=0|pts=39215|pts_time=0.816979|dts=39215|dts_time=0.816979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13484|flags=K
-packet|codec_type=audio|stream_index=0|pts=40367|pts_time=0.840979|dts=40367|dts_time=0.840979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13868|flags=K
-packet|codec_type=audio|stream_index=0|pts=41519|pts_time=0.864979|dts=41519|dts_time=0.864979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=14252|flags=K
-packet|codec_type=audio|stream_index=0|pts=42671|pts_time=0.888979|dts=42671|dts_time=0.888979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=14636|flags=K
-packet|codec_type=audio|stream_index=0|pts=43823|pts_time=0.912979|dts=43823|dts_time=0.912979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15020|flags=K
-packet|codec_type=audio|stream_index=0|pts=44975|pts_time=0.936979|dts=44975|dts_time=0.936979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15404|flags=K
-packet|codec_type=audio|stream_index=0|pts=46127|pts_time=0.960979|dts=46127|dts_time=0.960979|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15788|flags=K
-packet|codec_type=audio|stream_index=0|pts=47279|pts_time=0.984979|dts=47279|dts_time=0.984979|duration=1826|duration_time=0.038042|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=16172|flags=K
+packet|codec_type=audio|stream_index=0|pts=-576|pts_time=-0.012000|dts=-576|dts_time=-0.012000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=44|flags=K
+packet|codec_type=audio|stream_index=0|pts=576|pts_time=0.012000|dts=576|dts_time=0.012000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=428|flags=K
+packet|codec_type=audio|stream_index=0|pts=1728|pts_time=0.036000|dts=1728|dts_time=0.036000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=812|flags=K
+packet|codec_type=audio|stream_index=0|pts=2880|pts_time=0.060000|dts=2880|dts_time=0.060000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1196|flags=K
+packet|codec_type=audio|stream_index=0|pts=4032|pts_time=0.084000|dts=4032|dts_time=0.084000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1580|flags=K
+packet|codec_type=audio|stream_index=0|pts=5184|pts_time=0.108000|dts=5184|dts_time=0.108000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=1964|flags=K
+packet|codec_type=audio|stream_index=0|pts=6336|pts_time=0.132000|dts=6336|dts_time=0.132000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=2348|flags=K
+packet|codec_type=audio|stream_index=0|pts=7488|pts_time=0.156000|dts=7488|dts_time=0.156000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=2732|flags=K
+packet|codec_type=audio|stream_index=0|pts=8640|pts_time=0.180000|dts=8640|dts_time=0.180000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3116|flags=K
+packet|codec_type=audio|stream_index=0|pts=9792|pts_time=0.204000|dts=9792|dts_time=0.204000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3500|flags=K
+packet|codec_type=audio|stream_index=0|pts=10944|pts_time=0.228000|dts=10944|dts_time=0.228000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=3884|flags=K
+packet|codec_type=audio|stream_index=0|pts=12096|pts_time=0.252000|dts=12096|dts_time=0.252000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=4268|flags=K
+packet|codec_type=audio|stream_index=0|pts=13248|pts_time=0.276000|dts=13248|dts_time=0.276000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=4652|flags=K
+packet|codec_type=audio|stream_index=0|pts=14400|pts_time=0.300000|dts=14400|dts_time=0.300000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5036|flags=K
+packet|codec_type=audio|stream_index=0|pts=15552|pts_time=0.324000|dts=15552|dts_time=0.324000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5420|flags=K
+packet|codec_type=audio|stream_index=0|pts=16704|pts_time=0.348000|dts=16704|dts_time=0.348000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=5804|flags=K
+packet|codec_type=audio|stream_index=0|pts=17856|pts_time=0.372000|dts=17856|dts_time=0.372000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6188|flags=K
+packet|codec_type=audio|stream_index=0|pts=19008|pts_time=0.396000|dts=19008|dts_time=0.396000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6572|flags=K
+packet|codec_type=audio|stream_index=0|pts=20160|pts_time=0.420000|dts=20160|dts_time=0.420000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=6956|flags=K
+packet|codec_type=audio|stream_index=0|pts=21312|pts_time=0.444000|dts=21312|dts_time=0.444000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=7340|flags=K
+packet|codec_type=audio|stream_index=0|pts=22464|pts_time=0.468000|dts=22464|dts_time=0.468000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=7724|flags=K
+packet|codec_type=audio|stream_index=0|pts=23616|pts_time=0.492000|dts=23616|dts_time=0.492000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8108|flags=K
+packet|codec_type=audio|stream_index=0|pts=24768|pts_time=0.516000|dts=24768|dts_time=0.516000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8492|flags=K
+packet|codec_type=audio|stream_index=0|pts=25920|pts_time=0.540000|dts=25920|dts_time=0.540000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=8876|flags=K
+packet|codec_type=audio|stream_index=0|pts=27072|pts_time=0.564000|dts=27072|dts_time=0.564000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=9260|flags=K
+packet|codec_type=audio|stream_index=0|pts=28224|pts_time=0.588000|dts=28224|dts_time=0.588000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=9644|flags=K
+packet|codec_type=audio|stream_index=0|pts=29376|pts_time=0.612000|dts=29376|dts_time=0.612000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10028|flags=K
+packet|codec_type=audio|stream_index=0|pts=30528|pts_time=0.636000|dts=30528|dts_time=0.636000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10412|flags=K
+packet|codec_type=audio|stream_index=0|pts=31680|pts_time=0.660000|dts=31680|dts_time=0.660000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=10796|flags=K
+packet|codec_type=audio|stream_index=0|pts=32832|pts_time=0.684000|dts=32832|dts_time=0.684000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11180|flags=K
+packet|codec_type=audio|stream_index=0|pts=33984|pts_time=0.708000|dts=33984|dts_time=0.708000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11564|flags=K
+packet|codec_type=audio|stream_index=0|pts=35136|pts_time=0.732000|dts=35136|dts_time=0.732000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=11948|flags=K
+packet|codec_type=audio|stream_index=0|pts=36288|pts_time=0.756000|dts=36288|dts_time=0.756000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=12332|flags=K
+packet|codec_type=audio|stream_index=0|pts=37440|pts_time=0.780000|dts=37440|dts_time=0.780000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=12716|flags=K
+packet|codec_type=audio|stream_index=0|pts=38592|pts_time=0.804000|dts=38592|dts_time=0.804000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13100|flags=K
+packet|codec_type=audio|stream_index=0|pts=39744|pts_time=0.828000|dts=39744|dts_time=0.828000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13484|flags=K
+packet|codec_type=audio|stream_index=0|pts=40896|pts_time=0.852000|dts=40896|dts_time=0.852000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=13868|flags=K
+packet|codec_type=audio|stream_index=0|pts=42048|pts_time=0.876000|dts=42048|dts_time=0.876000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=14252|flags=K
+packet|codec_type=audio|stream_index=0|pts=43200|pts_time=0.900000|dts=43200|dts_time=0.900000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=14636|flags=K
+packet|codec_type=audio|stream_index=0|pts=44352|pts_time=0.924000|dts=44352|dts_time=0.924000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15020|flags=K
+packet|codec_type=audio|stream_index=0|pts=45504|pts_time=0.948000|dts=45504|dts_time=0.948000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15404|flags=K
+packet|codec_type=audio|stream_index=0|pts=46656|pts_time=0.972000|dts=46656|dts_time=0.972000|duration=1152|duration_time=0.024000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=15788|flags=K
+packet|codec_type=audio|stream_index=0|pts=47808|pts_time=0.996000|dts=47808|dts_time=0.996000|duration=768|duration_time=0.016000|convergence_duration=N/A|convergence_duration_time=N/A|size=384|pos=16172|flags=K


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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160713/45200903/attachment.sig>


More information about the ffmpeg-devel mailing list