Re: [FFmpeg-trac] #1178(avcodec:reopened): tiff enc: odd-sized yuv410p tiff image decodes in other apps with visible green dots (was: tiff enc: visible green dots with odd width and -pix_fmt yuv410p)

2023-10-09 Thread FFmpeg
#1178: tiff enc: odd-sized yuv410p tiff image decodes in other apps with visible
green dots
+
 Reporter:  ami_stuff   |Owner:  (none)
 Type:  defect  |   Status:  reopened
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  tif |   Blocked By:
 Blocking:  |  Reproduced by developer:  1
Analyzed by developer:  0   |
+
Changes (by ami_stuff):

 * status:  closed => reopened
 * resolution:  fixed =>
 * summary:  tiff enc: visible green dots with odd width and -pix_fmt
 yuv410p =>
 tiff enc: odd-sized yuv410p tiff image decodes in other apps with
 visible green dots

Comment:

 actually this issue is not fixed, because this ticket is not about how
 ffmpeg decodes "out.tif" file, but how other apps like tiff2rgba and gimp
 decodes it, and green dots are still visible there
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #1178(avcodec:closed): tiff enc: visible green dots with odd width and -pix_fmt yuv410p

2023-10-09 Thread FFmpeg
#1178: tiff enc: visible green dots with odd width and -pix_fmt yuv410p
+---
 Reporter:  ami_stuff   |Owner:  (none)
 Type:  defect  |   Status:  closed
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:  fixed
 Keywords:  tif |   Blocked By:
 Blocking:  |  Reproduced by developer:  1
Analyzed by developer:  0   |
+---
Changes (by ami_stuff):

 * status:  reopened => closed
 * resolution:   => fixed

Comment:

 it looks like something has fixed this issue, but

 there is now a green line with

 {{{
 ffmpeg -i yuv410p.avi -vcodec svq1 svq1.mov
 ffmpeg -i svq1.mov out.bmp
 }}}

 conversion

 oh well
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #5482(avcodec:open): g721 (g726): fix audiable artefacts

2023-10-09 Thread FFmpeg
#5482: g721 (g726): fix audiable artefacts
+---
 Reporter:  ami_stuff   |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  g726|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by ami_stuff):

 * Attachment "sin8k.wav" added.

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #5482(avcodec:open): g721 (g726): fix audiable artefacts

2023-10-09 Thread FFmpeg
#5482: g721 (g726): fix audiable artefacts
+---
 Reporter:  ami_stuff   |Owner:  (none)
 Type:  defect  |   Status:  open
 Priority:  normal  |Component:  avcodec
  Version:  git-master  |   Resolution:
 Keywords:  g726|   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by ami_stuff):

 this also decodes into terrible quality:

 {{{
 ./ffmpeg -i sin8k.wav -acodec g726  -y g726.wav
 ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  58. 27.100 / 58. 27.100
   libavcodec 60. 30.101 / 60. 30.101
   libavformat60. 15.100 / 60. 15.100
   libavdevice60.  2.101 / 60.  2.101
   libavfilter 9. 11.100 /  9. 11.100
   libswscale  7.  4.100 /  7.  4.100
   libswresample   4. 11.100 /  4. 11.100
 [aist#0:0/pcm_s16le @ 0x555b18bafb80] Guessed Channel Layout: mono
 Input #0, wav, from 'sin8k.wav':
   Metadata:
 encoder : Lavf60.15.100
   Duration: 00:00:30.00, bitrate: 128 kb/s
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1
 channels, s16, 128 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> adpcm_g726 (g726))
 Press [q] to stop, [?] for help
 Output #0, wav, to 'g726.wav':
   Metadata:
 ISFT: Lavf60.15.100
   Stream #0:0: Audio: adpcm_g726 (E[0][0][0] / 0x0045), 8000 Hz, mono,
 s16, 32 kb/s
 Metadata:
   encoder : Lavc60.30.101 g726
 [out#0/wav @ 0x555b18baf980] video:0kB audio:117kB subtitle:0kB other
 streams:0kB global headers:0kB muxing overhead: 0.076667%
 size= 117kB time=00:00:29.95 bitrate=  32.1kbits/s speed=1.75e+03x
 }}}

 {{{
 ./ffmpeg -i g726.wav -y out.wav
 ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  58. 27.100 / 58. 27.100
   libavcodec 60. 30.101 / 60. 30.101
   libavformat60. 15.100 / 60. 15.100
   libavdevice60.  2.101 / 60.  2.101
   libavfilter 9. 11.100 /  9. 11.100
   libswscale  7.  4.100 /  7.  4.100
   libswresample   4. 11.100 /  4. 11.100
 Input #0, wav, from 'g726.wav':
   Metadata:
 encoder : Lavf60.15.100
   Duration: 00:00:30.00, bitrate: 32 kb/s
   Stream #0:0: Audio: adpcm_g726 (E[0][0][0] / 0x0045), 8000 Hz, mono,
 s16, 32 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (adpcm_g726 (g726) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 Output #0, wav, to 'out.wav':
   Metadata:
 ISFT: Lavf60.15.100
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono,
 s16, 128 kb/s
 Metadata:
   encoder : Lavc60.30.101 pcm_s16le
 [out#0/wav @ 0x55a97e71dac0] video:0kB audio:469kB subtitle:0kB other
 streams:0kB global headers:0kB muxing overhead: 0.016250%
 size= 469kB time=00:00:29.69 bitrate= 129.3kbits/s speed= 986x
 }}}

 the problem does not happen with "-acodec g722"
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #9958(avcodec:closed): thd encoder bug: Plex and LG C9 have same artefacts

2023-10-09 Thread FFmpeg
#9958: thd encoder bug: Plex and LG C9 have same artefacts
+---
 Reporter:  Balling |Owner:  (none)
 Type:  defect  |   Status:  closed
 Priority:  minor   |Component:  avcodec
  Version:  git-master  |   Resolution:  fixed
 Keywords:  thd |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Comment (by Elon Musk):

 Added back somehow limited stereo decorrelation code, to help compress
 fully mono/out of phase stereo parts and when left is rational multiple of
 right channel.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10613(ffprobe:new): ffprobe outputs invalid xml

2023-10-09 Thread FFmpeg
#10613: ffprobe outputs invalid xml
+---
 Reporter:  nuro|Owner:  (none)
 Type:  defect  |   Status:  new
 Priority:  normal  |Component:  ffprobe
  Version:  git-master  |   Resolution:
 Keywords:  |   Blocked By:
 Blocking:  |  Reproduced by developer:  0
Analyzed by developer:  0   |
+---
Changes (by nuro):

 * component:  undetermined => ffprobe

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10613(undetermined:new): ffprobe outputs invalid xml

2023-10-09 Thread FFmpeg
#10613: ffprobe outputs invalid xml
-+-
 Reporter:  nuro |Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:
 |  undetermined
  Version:  git-master   |   Resolution:
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Changes (by nuro):

 * version:  unspecified => git-master

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10613(undetermined:new): ffprobe outputs invalid xml

2023-10-09 Thread FFmpeg
#10613: ffprobe outputs invalid xml
-+-
 Reporter:  nuro |Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:
 |  undetermined
  Version:  unspecified  |   Resolution:
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Description changed by nuro:

Old description:

> Summary of the bug:
>
> Because of recent change
> [https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d2d3a83ad932161a2c572416d7ddfe460a15bba5/],
> ffprobe outputs invalid xml. (null)
>
> {{{
> 
> 
> 
>  codec_tag="0x" width="320" height="240" coded_width="0"
> coded_height="0" closed_captions="0" film_grain="0" has_b_frames="1"
> sample_aspect_ratio="49:33" display_aspect_ratio="196:99"
> pix_fmt="yuv420p" level="-99" color_range="tv" chroma_location="center"
> field_order="progressive" refs="1" r_frame_rate="60/1"
> avg_frame_rate="25/1" time_base="1/120" duration_ts="35563887"
> duration="29.636572" bit_rate="1638400" extradata_size="12">
>  lyrics="0" karaoke="0" forced="0" hearing_impaired="0"
> visual_impaired="0" clean_effects="0" attached_pic="0"
> timed_thumbnails="0" captions="0" descriptions="0" metadata="0"
> dependent="0" still_image="0"/>
> 
> <(null) key="side_data_type" value="CPB properties"/>
>  max_bitrate="0" min_bitrate="0" avg_bitrate="0" buffer_size="327680"
> vbv_delay="-1"
> 
> 
>
>  format_name="mpegvideo" format_long_name="raw MPEG video"
> duration="29.636573" size="6069570" bit_rate="1638399" probe_score="51"/>
> 
> }}}
>
> How to reproduce:
>
> {{{
> % ffprobe -show_streams -show_format -print_format xml -v quiet
> nostartinfo.mpeg
> }}}

New description:

 Summary of the bug:

 Because of recent change
 
[https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d2d3a83ad932161a2c572416d7ddfe460a15bba5],
 ffprobe outputs invalid xml. (null)

 {{{
 
 
 
 
 
 
 <(null) key="side_data_type" value="CPB properties"/>
  max_bitrate="0" min_bitrate="0" avg_bitrate="0" buffer_size="327680"
 vbv_delay="-1"
 
 

 
 
 }}}

 How to reproduce:

 {{{
 % ffprobe -show_streams -show_format -print_format xml -v quiet
 nostartinfo.mpeg
 }}}

--
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-trac] #10613(undetermined:new): ffprobe outputs invalid xml

2023-10-09 Thread FFmpeg
#10613: ffprobe outputs invalid xml
-+-
 Reporter:  nuro | Type:  defect
   Status:  new  | Priority:  normal
Component:   |  Version:
  undetermined   |  unspecified
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
 Summary of the bug:

 Because of recent change
 
[https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d2d3a83ad932161a2c572416d7ddfe460a15bba5/],
 ffprobe outputs invalid xml. (null)

 {{{
 
 
 
 
 
 
 <(null) key="side_data_type" value="CPB properties"/>
  max_bitrate="0" min_bitrate="0" avg_bitrate="0" buffer_size="327680"
 vbv_delay="-1"
 
 

 
 
 }}}

 How to reproduce:

 {{{
 % ffprobe -show_streams -show_format -print_format xml -v quiet
 nostartinfo.mpeg
 }}}
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10612(undetermined:new): ra_144 encoded in rm has no duration info

2023-10-09 Thread FFmpeg
#10612: ra_144 encoded in rm has no duration info
-+-
 Reporter:  ami_stuff|Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:
 |  undetermined
  Version:  unspecified  |   Resolution:
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Comment (by ami_stuff):

 the same problem with "-acodec aac"

 with default "-acodec ac3" duration info is available
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10612(undetermined:new): ra_144 encoded in rm has no duration info

2023-10-09 Thread FFmpeg
#10612: ra_144 encoded in rm has no duration info
-+-
 Reporter:  ami_stuff|Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:
 |  undetermined
  Version:  unspecified  |   Resolution:
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Changes (by ami_stuff):

 * Attachment "8k.wav" added.

-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-trac] #10612(undetermined:new): ra_144 encoded in rm has no duration info

2023-10-09 Thread FFmpeg
#10612: ra_144 encoded in rm has no duration info
-+-
 Reporter:  ami_stuff| Type:  defect
   Status:  new  | Priority:  normal
Component:   |  Version:
  undetermined   |  unspecified
 Keywords:   |   Blocked By:
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
 {{{
 ./ffmpeg -i 8k.wav -acodec ra_144 ra144.ra
 ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  58. 27.100 / 58. 27.100
   libavcodec 60. 30.101 / 60. 30.101
   libavformat60. 15.100 / 60. 15.100
   libavdevice60.  2.101 / 60.  2.101
   libavfilter 9. 11.100 /  9. 11.100
   libswscale  7.  4.100 /  7.  4.100
   libswresample   4. 11.100 /  4. 11.100
 [aist#0:0/pcm_s16le @ 0x55ef35dccdc0] Guessed Channel Layout: mono
 Input #0, wav, from '8k.wav':
   Metadata:
 encoder : Lavf55.2.100
   Duration: 00:00:10.50, bitrate: 128 kb/s
   Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1
 channels, s16, 128 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> ra_144 (real_144))
 Press [q] to stop, [?] for help
 Output #0, rm, to 'ra144.ra':
   Metadata:
 encoder : Lavf60.15.100
   Stream #0:0: Audio: ra_144 (lpcJ / 0x4A63706C), 8000 Hz, mono, s16, 8
 kb/s
 Metadata:
   encoder : Lavc60.30.101 real_144
 [out#0/rm @ 0x55ef35df9a40] video:0kB audio:10kB subtitle:0kB other
 streams:0kB global headers:0kB muxing overhead: 62.538023%
 size=  17kB time=00:00:10.48 bitrate=  13.1kbits/s speed=58.3x
 }}}

 {{{
 ./ffmpeg -i ra144.ra
 ffmpeg version N-112362-g4c422de1db Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  58. 27.100 / 58. 27.100
   libavcodec 60. 30.101 / 60. 30.101
   libavformat60. 15.100 / 60. 15.100
   libavdevice60.  2.101 / 60.  2.101
   libavfilter 9. 11.100 /  9. 11.100
   libswscale  7.  4.100 /  7.  4.100
   libswresample   4. 11.100 /  4. 11.100
 Input #0, rm, from 'ra144.ra':
   Duration: 00:00:00.00, start: 0.00, bitrate: N/A
   Stream #0:0: Audio: ra_144 (lpcJ / 0x4A63706C), 8000 Hz, mono, s16, 8
 kb/s
 At least one output file must be specified
 }}}


 it's some old regression:

 {{{
 ./ffmpeg -i 8k.wav -acodec ra_144 -y out.ra
 ffmpeg version N-72719-g0dbea4642f Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  54. 27.100 / 54. 27.100
   libavcodec 56. 41.100 / 56. 41.100
   libavformat56. 34.100 / 56. 34.100
   libavdevice56.  4.100 / 56.  4.100
   libavfilter 5. 16.101 /  5. 16.101
   libswscale  3.  1.101 /  3.  1.101
   libswresample   1.  2.100 /  1.  2.100
 Guessed Channel Layout for  Input Stream #0.0 : mono
 Input #0, wav, from '8k.wav':
   Metadata:
 encoder : Lavf55.2.100
   Duration: 00:00:10.50, bitrate: 128 kb/s
 Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, 1
 channels, s16, 128 kb/s
 Output #0, rm, to 'out.ra':
   Metadata:
 encoder : Lavf56.34.100
 Stream #0:0: Audio: ra_144 (real_144) (lpcJ / 0x4A63706C), 8000 Hz,
 mono, s16, 8 kb/s
 Metadata:
   encoder : Lavc56.41.100 real_144
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_s16le (native) -> ra_144 (real_144))
 Press [q] to stop, [?] for help
 size=  17kB time=00:00:10.50 bitrate=  13.0kbits/s
 video:0kB audio:10kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 62.538021%
 }}}

 {{{
 ./ffmpeg -i out.ra
 ffmpeg version N-72719-g0dbea4642f Copyright (c) 2000-2015 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  54. 27.100 / 54. 27.100
   libavcodec 56. 41.100 / 56. 41.100
   libavformat56. 34.100 / 56. 34.100
   libavdevice56.  4.100 / 56.  4.100
   libavfilter 5. 16.101 /  5. 16.101
   libswscale  3.  1.101 /  3.  1.101
   libswresample   1.  2.100 /  1.  2.100
 Input #0, rm, from 'out.ra':
   Metadata:
 title   :
 author  :
 copyright   :
 comment :
   Duration: 00:00:10.52, start: 0.00, bitrate: 13 kb/s
 Stream #0:0: Audio: ra_144 (lpcJ / 0x4A63706C), 8000 Hz, mono, s16, 8
 kb/s
 At least one output file must be specified
 }}}





 {{{
 ./ffmpeg -i 8k.wav -acodec ra_144 -y out.ra
 ffmpeg version N-79286-g6f69f7a8bf Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil  55. 20.100 

Re: [FFmpeg-trac] #10611(undetermined:new): ff_g723_1_gen_dirac_train function enters dead loop

2023-10-09 Thread FFmpeg
#10611: ff_g723_1_gen_dirac_train function enters dead loop
-+-
 Reporter:  songtao  |Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:
 |  undetermined
  Version:  5.1.3|   Resolution:
 Keywords:  G723_1,  |   Blocked By:
  dead loop  |
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Description changed by songtao:

Old description:

> Summary of the bug:
> How to reproduce:
> i create 5 threads to encode/decode G723_1 from different rtp session,
> when there's a high concurrent, it enters died loop.
>
> pstack output, `pitch_lag=0` cases the died loop
> ```
> Thread 1 (Thread 0x7f70ab7fe700 (LWP 640449)):
> #0  ff_g723_1_gen_dirac_train (buf=buf@entry=0x7f70ab7fc850, pitch_lag=0)
> at src/libavcodec/g723_1.c:1154
> #1  0x00642096 in get_fcb_param
> (optim=optim@entry=0x7f70ab7fd2b0,
> impulse_resp=impulse_resp@entry=0x7f70ab7fcf50,
> buf=buf@entry=0x7f709401d238, pulse_cnt=pulse_cnt@entry=5,
> pitch_lag=) at src/libavcodec/g723_1enc.c:840
> #2  0x00646489 in fcb_search (index=1, buf=0x7f709401d238,
> impulse_resp=0x7f70ab7fcf50, p=) at
> src/libavcodec/g723_1enc.c:1022
> #3  g723_1_encode_frame (avctx=, avpkt=,
> frame=, got_packet_ptr=) at
> src/libavcodec/g723_1enc.c:1198
> #4  0x005ea2e1 in encode_simple_internal (avpkt=0x7f70a420c980,
> avctx=0x7f70a44534c0) at src/libavcodec/encode.c:214
> #5  encode_simple_receive_packet (avpkt=, avctx= out>) at src/libavcodec/encode.c:269
> #6  encode_receive_packet_internal (avctx=avctx@entry=0x7f70a44534c0,
> avpkt=0x7f70a420c980) at src/libavcodec/encode.c:303
> #7  0x005ea727 in avcodec_send_frame
> (avctx=avctx@entry=0x7f70a44534c0, frame=frame@entry=0x7f70a40cee00) at
> src/libavcodec/encode.c:380
> ```
> my code, it reads 160 samples from rtp, resamples to 240 samples, then
> send samples to G723_1 encoder
> ```
> static void encode(AVCodecContext *ctx, AVAudioFifo *fifo, AVFrame
> *frame,
>AVPacket *pkt, uint8_t *out, size_t *out_size) {
>   int ret;
>   *out_size = 0;
>   // need resample to 240
>   if (fifo != NULL) {
> add_samples_to_fifo(fifo, >data[0], frame->nb_samples);
> if (av_audio_fifo_size(fifo) < 240) {
>   return;
> }
> // read out 240
> if (av_audio_fifo_read(fifo, (void **)>data, 240) < 240) {
>   log_error("Could not read data from FIFO");
>   return;
> }
> frame->nb_samples = 240;
>   }
>
>   /* send the frame for encoding */
>   ret = avcodec_send_frame(ctx, frame);
>   if (ret < 0) {
> log_error("Error sending the frame to the encoder");
> exit(1);
>   }
>
>   /* read all the available output packets (in general there may be any
>* number of them */
>   while (ret >= 0) {
> ret = avcodec_receive_packet(ctx, pkt);
> if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
>   return;
> } else if (ret < 0) {
>   log_error("Error encoding audio frame");
>   exit(1);
> }
>
> memcpy(out, pkt->data, pkt->size);
> *out_size = pkt->size;
> av_packet_unref(pkt);
>   }
> }
>
> int ff_encoder_input(ff_encoder_ctx *ff_ctx, uint16_t *data, size_t
> data_size,
>  uint8_t *out, size_t *out_size) {
>
>   int ret = av_frame_make_writable(ff_ctx->frame);
>   if (ret < 0) {
> exit(1);
>   }
>   uint16_t *samples = (uint16_t *)ff_ctx->frame->data[0];
>   memcpy(samples, data, data_size * sizeof(uint16_t));
>   ff_ctx->frame->nb_samples = data_size;
>   encode(ff_ctx->c, ff_ctx->fifo, ff_ctx->frame, ff_ctx->pkt, out,
> out_size);
>   return 0;
> }
> ```
>
> {{{
> % git status
> HEAD detached at n5.1
> }}}
> Patches should be submitted to the ffmpeg-devel mailing list and not this
> bug tracker.

New description:

 Summary of the bug:
 How to reproduce:
 i create 5 threads to encode/decode G723_1 from different rtp session,
 when there's a high concurrent, it enters died loop.

 pstack output, `pitch_lag=0` cases the died loop
 {{{
 Thread 1 (Thread 0x7f70ab7fe700 (LWP 640449)):
 #0  ff_g723_1_gen_dirac_train (buf=buf@entry=0x7f70ab7fc850, pitch_lag=0)
 at src/libavcodec/g723_1.c:1154
 #1  0x00642096 in get_fcb_param (optim=optim@entry=0x7f70ab7fd2b0,
 impulse_resp=impulse_resp@entry=0x7f70ab7fcf50,
 buf=buf@entry=0x7f709401d238, pulse_cnt=pulse_cnt@entry=5,
 pitch_lag=) at src/libavcodec/g723_1enc.c:840
 #2  0x00646489 in fcb_search (index=1, buf=0x7f709401d238,
 impulse_resp=0x7f70ab7fcf50, p=) at
 src/libavcodec/g723_1enc.c:1022
 #3  g723_1_encode_frame (avctx=, avpkt=,
 frame=, got_packet_ptr=) at
 

[FFmpeg-trac] #10611(undetermined:new): ff_g723_1_gen_dirac_train function enters dead loop

2023-10-09 Thread FFmpeg
#10611: ff_g723_1_gen_dirac_train function enters dead loop
-+-
 Reporter:  songtao  | Type:  defect
   Status:  new  | Priority:  normal
Component:   |  Version:  5.1.3
  undetermined   |
 Keywords:  G723_1,  |   Blocked By:
  dead loop  |
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
 Summary of the bug:
 How to reproduce:
 i create 5 threads to encode/decode G723_1 from different rtp session,
 when there's a high concurrent, it enters died loop.

 pstack output, `pitch_lag=0` cases the died loop
 ```
 Thread 1 (Thread 0x7f70ab7fe700 (LWP 640449)):
 #0  ff_g723_1_gen_dirac_train (buf=buf@entry=0x7f70ab7fc850, pitch_lag=0)
 at src/libavcodec/g723_1.c:1154
 #1  0x00642096 in get_fcb_param (optim=optim@entry=0x7f70ab7fd2b0,
 impulse_resp=impulse_resp@entry=0x7f70ab7fcf50,
 buf=buf@entry=0x7f709401d238, pulse_cnt=pulse_cnt@entry=5,
 pitch_lag=) at src/libavcodec/g723_1enc.c:840
 #2  0x00646489 in fcb_search (index=1, buf=0x7f709401d238,
 impulse_resp=0x7f70ab7fcf50, p=) at
 src/libavcodec/g723_1enc.c:1022
 #3  g723_1_encode_frame (avctx=, avpkt=,
 frame=, got_packet_ptr=) at
 src/libavcodec/g723_1enc.c:1198
 #4  0x005ea2e1 in encode_simple_internal (avpkt=0x7f70a420c980,
 avctx=0x7f70a44534c0) at src/libavcodec/encode.c:214
 #5  encode_simple_receive_packet (avpkt=, avctx=) at src/libavcodec/encode.c:269
 #6  encode_receive_packet_internal (avctx=avctx@entry=0x7f70a44534c0,
 avpkt=0x7f70a420c980) at src/libavcodec/encode.c:303
 #7  0x005ea727 in avcodec_send_frame
 (avctx=avctx@entry=0x7f70a44534c0, frame=frame@entry=0x7f70a40cee00) at
 src/libavcodec/encode.c:380
 ```
 my code, it reads 160 samples from rtp, resamples to 240 samples, then
 send samples to G723_1 encoder
 ```
 static void encode(AVCodecContext *ctx, AVAudioFifo *fifo, AVFrame *frame,
AVPacket *pkt, uint8_t *out, size_t *out_size) {
   int ret;
   *out_size = 0;
   // need resample to 240
   if (fifo != NULL) {
 add_samples_to_fifo(fifo, >data[0], frame->nb_samples);
 if (av_audio_fifo_size(fifo) < 240) {
   return;
 }
 // read out 240
 if (av_audio_fifo_read(fifo, (void **)>data, 240) < 240) {
   log_error("Could not read data from FIFO");
   return;
 }
 frame->nb_samples = 240;
   }

   /* send the frame for encoding */
   ret = avcodec_send_frame(ctx, frame);
   if (ret < 0) {
 log_error("Error sending the frame to the encoder");
 exit(1);
   }

   /* read all the available output packets (in general there may be any
* number of them */
   while (ret >= 0) {
 ret = avcodec_receive_packet(ctx, pkt);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
   return;
 } else if (ret < 0) {
   log_error("Error encoding audio frame");
   exit(1);
 }

 memcpy(out, pkt->data, pkt->size);
 *out_size = pkt->size;
 av_packet_unref(pkt);
   }
 }

 int ff_encoder_input(ff_encoder_ctx *ff_ctx, uint16_t *data, size_t
 data_size,
  uint8_t *out, size_t *out_size) {

   int ret = av_frame_make_writable(ff_ctx->frame);
   if (ret < 0) {
 exit(1);
   }
   uint16_t *samples = (uint16_t *)ff_ctx->frame->data[0];
   memcpy(samples, data, data_size * sizeof(uint16_t));
   ff_ctx->frame->nb_samples = data_size;
   encode(ff_ctx->c, ff_ctx->fifo, ff_ctx->frame, ff_ctx->pkt, out,
 out_size);
   return 0;
 }
 ```

 {{{
 % git status
 HEAD detached at n5.1
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #9009(ffmpeg:new): SIGINT ignored while awaiting RTP data

2023-10-09 Thread FFmpeg
#9009: SIGINT ignored while awaiting RTP data
--+--
 Reporter:  Juan Navarro  |Owner:  (none)
 Type:  defect|   Status:  new
 Priority:  normal|Component:  ffmpeg
  Version:  git-master|   Resolution:
 Keywords:  sigint, exit  |   Blocked By:
 Blocking:|  Reproduced by developer:  0
Analyzed by developer:  0 |
--+--
Comment (by Juan Navarro):

 Bug reporter here. I'd just want to mention that for the internal project
 that needed it, I've been successfully using the patched branch provided
 in comment:4, without issues, for the last 2 years.

 My real-world use case has been a program that records incoming RTP, with
 a command that looks like this:

 {{{
 ffmpeg \
 -protocol_whitelist file,rtp,udp \
 -fflags +discardcorrupt+genpts \
 -use_wallclock_as_timestamps 1 \
 -i input.sdp \
 -map 0:a:0 -c:a copy \
 -map 0:v:0 -c:v copy \
 -f webm -flags +global_header \
 -y recording.webm
 }}}

 So I'd like to endorse the changes proposed in the mentioned branch.

 The issue seemed to be, from what I understood in the patchwork
 conversation (comment:8), that the current code design of FFmpeg around
 signal handling does make a difference between handling signals for the
 main loop, and handling them within nested loops (and that's where the
 need for ''two'' signals came from, and the motivation for this report)

 I'd agree that the user experience of requiring two signals is already
 strange, but requiring them ''only some times'', makes it even more
 confusing. IMO it's all due to an internal implementation detail, which
 should not leak to the user.
-- 
Ticket URL: 
FFmpeg 
FFmpeg issue tracker___
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-trac] #10586(avfilter:new): Impossible to retrieve libvmaf result from AVFrame at the output of filter graph

2023-10-09 Thread FFmpeg
#10586: Impossible to retrieve libvmaf result from AVFrame at the output of 
filter
graph
-+-
 Reporter:  ichlubna |Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:  avfilter
  Version:  git-master   |   Resolution:
 Keywords:  libvmaf  |   Blocked By:
  frame filter libav psnr|
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Description changed by ichlubna:

Old description:

> There is no way to retrieve vmaf score from the resulting frame produced
> at the end of the filter graph. The same approach which works for psnr
> and ssim filters is not working.
>
> When I use [https://ffmpeg.org/ffmpeg-filters.html#psnr psnr] or
> [https://ffmpeg.org/ffmpeg-filters.html#psnr ssim] filter I can list the
> result from the [https://ffmpeg.org/doxygen/4.1/structAVFrame.html frame]
> read from the sink buffer of the filter graph which is stored in the
> metadata [https://ffmpeg.org/doxygen/4.1/structAVDictionary.html
> dictionary] as:
> {{{
> char *entries = nullptr;
> av_dict_get_string(resultFrame->metadata, , ',', '|');
> std::cout << entries;
> }}}
>
> I use this filter:
> {{{
> const AVFilter *vmafFilter  = avfilter_get_by_name("libvmaf");
> }}}
>
> The same cannot be used for [https://ffmpeg.org/ffmpeg-
> filters.html#libvmaf libvmaf]. The metadata dictionary is empty. I
> searched the whole frame structure and couldn't find the result anywhere.
> Shouldn't this be unified?
>
> I don't see the storing of the result in the frame anywhere in the
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_libvmaf.c
> source code]. Storing to the frame is visible in the
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_psnr.c#L223
> code of psnr] and
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_ssim.c#L388
> code of ssim]. I think that the storing of the vmaf score is just missing
> in the code.
>
> The only workaround is to call the
> [https://github.com/FFmpeg/FFmpeg/blob/9e531370b3da27aa72703b9bb40cdd697e88607e/libavfilter/vf_libvmaf.c#L654
> uninit] function of the vmaf filter which triggers the log message with
> vmaf score (having set the log level to AV_LOG_INFO) but this is not
> usable for per-frame vmaf result which would be similar to psnr and ssim.
> It would require a new construction of the filters in the graph after
> processing each frame.
>
> I think that something like this this is missing in the
> [https://github.com/FFmpeg/FFmpeg/blob/9e531370b3da27aa72703b9bb40cdd697e88607e/libavfilter/vf_libvmaf.c#L142
> do_vmaf] function:
>
> {{{
> double vmaf_score;
> vmaf_score_pooled(s->vmaf, s->model[0], pool_method_map(s->pool),
> _score, 0, s->frame_cnt - 1);
> set_meta(>metadata, "lavfi.vmaf", 0, vmaf_score);
> }}}
>
> I have tried doing so but got this error with increasing index for each
> frame:
>
> {{{
> libvmaf ERROR vmaf_predict_score_at_index(): no feature '��%�}U' at index
> 1
> }}}

New description:

 There is no way to retrieve vmaf score from the resulting frame produced
 at the end of the filter graph. The same approach which works for psnr and
 ssim filters is not working.

 When I use [https://ffmpeg.org/ffmpeg-filters.html#psnr psnr] or
 [https://ffmpeg.org/ffmpeg-filters.html#psnr ssim] filter I can list the
 result from the [https://ffmpeg.org/doxygen/4.1/structAVFrame.html frame]
 read from the sink buffer of the filter graph which is stored in the
 metadata [https://ffmpeg.org/doxygen/4.1/structAVDictionary.html
 dictionary] as:
 {{{
 char *entries = nullptr;
 av_dict_get_string(resultFrame->metadata, , ',', '|');
 std::cout << entries;
 }}}

 I use this filter:
 {{{
 const AVFilter *vmafFilter  = avfilter_get_by_name("libvmaf");
 }}}

 The same cannot be used for [https://ffmpeg.org/ffmpeg-
 filters.html#libvmaf libvmaf]. The metadata dictionary is empty. I
 searched the whole frame structure and couldn't find the result anywhere.
 Shouldn't this be unified?

 I don't see the storing of the result in the frame anywhere in the
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_libvmaf.c
 source code]. Storing to the frame is visible in the
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_psnr.c#L223
 code of psnr] and
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_ssim.c#L388
 code of ssim]. I think that the storing of the vmaf score is just missing
 in the code.

 The only workaround is to call the
 

Re: [FFmpeg-trac] #10586(avfilter:new): Impossible to retrieve libvmaf result from AVFrame at the output of filter graph

2023-10-09 Thread FFmpeg
#10586: Impossible to retrieve libvmaf result from AVFrame at the output of 
filter
graph
-+-
 Reporter:  ichlubna |Owner:  (none)
 Type:  defect   |   Status:  new
 Priority:  normal   |Component:  avfilter
  Version:  git-master   |   Resolution:
 Keywords:  libvmaf  |   Blocked By:
  frame filter libav psnr|
 Blocking:   |  Reproduced by developer:  0
Analyzed by developer:  0|
-+-
Description changed by ichlubna:

Old description:

> There is no way to retrieve vmaf score from the resulting frame produced
> at the end of the filter graph. The same approach which works for psnr
> and ssim filters is not working.
>
> When I use [https://ffmpeg.org/ffmpeg-filters.html#psnr psnr] or
> [https://ffmpeg.org/ffmpeg-filters.html#psnr ssim] filter I can list the
> result from the [https://ffmpeg.org/doxygen/4.1/structAVFrame.html frame]
> read from the sink buffer of the filter graph which is stored in the
> metadata [https://ffmpeg.org/doxygen/4.1/structAVDictionary.html
> dictionary] as:
> {{{
> char *entries = nullptr;
> av_dict_get_string(resultFrame->metadata, , ',', '|');
> std::cout << entries;
> }}}
>
> I use this filter:
> {{{
> const AVFilter *vmafFilter  = avfilter_get_by_name("libvmaf");
> }}}
>
> The same cannot be used for [https://ffmpeg.org/ffmpeg-
> filters.html#libvmaf libvmaf]. The metadata dictionary is empty. I
> searched the whole frame structure and couldn't find the result anywhere.
> Shouldn't this be unified?
>
> I don't see the storing of the result in the frame anywhere in the
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_libvmaf.c
> source code]. Storing to the frame is visible in the
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_psnr.c#L223
> code of psnr] and
> [https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_ssim.c#L388
> code of ssim]. I think that the storing of the vmaf score is just missing
> in the code.
>
> The only workaround is to call the
> [https://github.com/FFmpeg/FFmpeg/blob/9e531370b3da27aa72703b9bb40cdd697e88607e/libavfilter/vf_libvmaf.c#L654
> uninit] function of the vmaf filter which triggers the log message with
> vmaf score (having set the log level to AV_LOG_INFO) but this is not
> usable for per-frame vmaf result which would be similar to psnr and ssim.
> It would require a new construction of the filters in the graph after
> processing each frame.
>
> I think that something like this this is missing in the
> [https://github.com/FFmpeg/FFmpeg/blob/9e531370b3da27aa72703b9bb40cdd697e88607e/libavfilter/vf_libvmaf.c#L142
> do_vmaf] function:
>
> {{{
> double vmaf_score;
> vmaf_score_pooled(s->vmaf, s->model[0], pool_method_map(s->pool),
> _score, 0, s->frame_cnt - 1);
> set_meta(>metadata, "lavfi.vmaf", 0, vmaf_score);
> }}}

New description:

 There is no way to retrieve vmaf score from the resulting frame produced
 at the end of the filter graph. The same approach which works for psnr and
 ssim filters is not working.

 When I use [https://ffmpeg.org/ffmpeg-filters.html#psnr psnr] or
 [https://ffmpeg.org/ffmpeg-filters.html#psnr ssim] filter I can list the
 result from the [https://ffmpeg.org/doxygen/4.1/structAVFrame.html frame]
 read from the sink buffer of the filter graph which is stored in the
 metadata [https://ffmpeg.org/doxygen/4.1/structAVDictionary.html
 dictionary] as:
 {{{
 char *entries = nullptr;
 av_dict_get_string(resultFrame->metadata, , ',', '|');
 std::cout << entries;
 }}}

 I use this filter:
 {{{
 const AVFilter *vmafFilter  = avfilter_get_by_name("libvmaf");
 }}}

 The same cannot be used for [https://ffmpeg.org/ffmpeg-
 filters.html#libvmaf libvmaf]. The metadata dictionary is empty. I
 searched the whole frame structure and couldn't find the result anywhere.
 Shouldn't this be unified?

 I don't see the storing of the result in the frame anywhere in the
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_libvmaf.c
 source code]. Storing to the frame is visible in the
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_psnr.c#L223
 code of psnr] and
 
[https://github.com/FFmpeg/FFmpeg/blob/13a3e2a9b4697a1403d3e58eb5e8ef9c72561d54/libavfilter/vf_ssim.c#L388
 code of ssim]. I think that the storing of the vmaf score is just missing
 in the code.

 The only workaround is to call the
 
[https://github.com/FFmpeg/FFmpeg/blob/9e531370b3da27aa72703b9bb40cdd697e88607e/libavfilter/vf_libvmaf.c#L654
 uninit] function of the vmaf filter which triggers the log message with