wiki:TicketQuery

TicketQuery Wiki Macro

The TicketQuery macro lets you display ticket information anywhere that accepts WikiFormatting. The query language used by the [[TicketQuery]] macro is described in the TracQuery page.

Usage

[[TicketQuery]]

Wiki macro listing tickets that match certain criteria.

This macro accepts a comma-separated list of keyed parameters, in the form "key=value".

If the key is the name of a field, the value must use the syntax of a filter specifier as defined in TracQuery#QueryLanguage. Note that this is not the same as the simplified URL syntax used for query: links starting with a ? character. Commas (,) can be included in field values by escaping them with a backslash (\).

Groups of field constraints to be OR-ed together can be separated by a literal or argument.

In addition to filters, several other named parameters can be used to control how the results are presented. All of them are optional.

The format parameter determines how the list of tickets is presented:

  • list -- the default presentation is to list the ticket ID next to the summary, with each ticket on a separate line.
  • compact -- the tickets are presented as a comma-separated list of ticket IDs.
  • count -- only the count of matching tickets is displayed
  • rawcount -- only the count of matching tickets is displayed, not even with a link to the corresponding query (since 1.1.1)
  • table -- a view similar to the custom query view (but without the controls)
  • progress -- a view similar to the milestone progress bars

The max parameter can be used to limit the number of tickets shown (defaults to 0, i.e. no maximum).

The order parameter sets the field used for ordering tickets (defaults to id).

The desc parameter indicates whether the order of the tickets should be reversed (defaults to false).

The group parameter sets the field used for grouping tickets (defaults to not being set).

The groupdesc parameter indicates whether the natural display order of the groups should be reversed (defaults to false).

The verbose parameter can be set to a true value in order to get the description for the listed tickets. For table format only. deprecated in favor of the rows parameter

The rows parameter can be used to specify which field(s) should be viewed as a row, e.g. rows=description|summary

The col parameter can be used to specify which fields should be viewed as columns. For table format only.

For compatibility with Trac 0.10, if there's a last positional parameter given to the macro, it will be used to specify the format. Also, using "&" as a field separator still works (except for order) but is deprecated.

Examples

Example Result Macro
Number of Triage tickets: 1475 [[TicketQuery(status=new&milestone=,count)]]
Number of new tickets: 1475 [[TicketQuery(status=new,count)]]
Number of reopened tickets: 150 [[TicketQuery(status=reopened,count)]]
Number of assigned tickets: 0 [[TicketQuery(status=assigned,count)]]
Number of invalid tickets: 1439 [[TicketQuery(status=closed,resolution=invalid,count)]]
Number of worksforme tickets: 223 [[TicketQuery(status=closed,resolution=worksforme,count)]]
Number of duplicate tickets: 475 [[TicketQuery(status=closed,resolution=duplicate,count)]]
Number of wontfix tickets: 216 [[TicketQuery(status=closed,resolution=wontfix,count)]]
Number of fixed tickets: 4262 [[TicketQuery(status=closed,resolution=fixed,count)]]
Number of untriaged tickets (milestone unset): 2254 [[TicketQuery(status!=closed,milestone=,count)]]
Total number of tickets: 9423 [[TicketQuery(count)]]
Number of tickets reported or owned by current user: 0 [[TicketQuery(reporter=$USER,or,owner=$USER,count)]]
Number of tickets created this month: 40 [[TicketQuery(created=thismonth..,count)]]
Number of closed Firefox tickets: 0 [[TicketQuery(status=closed,keywords~=firefox,count)]]
Number of closed Opera tickets: 0 [[TicketQuery(status=closed,keywords~=opera,count)]]
Number of closed tickets affecting Firefox and Opera: 0 [[TicketQuery(status=closed,keywords~=firefox opera,count)]]
Number of closed tickets affecting Firefox or Opera: 0 [[TicketQuery(status=closed,keywords~=firefox|opera,count)]]
Number of tickets that affect Firefox or are closed and affect Opera: 0 [[TicketQuery(status=closed,keywords~=opera,or,keywords~=firefox,count)]]
Number of closed Firefox tickets that don't affect Opera: 0 [[TicketQuery(status=closed,keywords~=firefox -opera,count)]]
Last 3 modified tickets: #9439, #9440, #9167 [[TicketQuery(max=3,order=modified,desc=1,compact)]]

Details of ticket #1:

[[TicketQuery(id=1,col=id|owner|reporter,rows=summary,table)]]

Ticket Owner Reporter
#1 Michael Niedermayer Michael Niedermayer
Summary Test

Format: list

[[TicketQuery(version=0.6|0.7&resolution=duplicate)]]

This is displayed as:

No results

[[TicketQuery(id=123)]]

This is displayed as:

#123
Fuzzed sample crashes ffplay

Format: compact

[[TicketQuery(version=0.6|0.7&resolution=duplicate, compact)]]

This is displayed as:

No results

Format: count

[[TicketQuery(version=0.6|0.7&resolution=duplicate, count)]]

This is displayed as:

0

Format: progress

[[TicketQuery(milestone=0.12.8&group=type,format=progress)]]

This is displayed as:

defect

6230 / 7801

enhancement

886 / 1496

task

31 / 44

license violation

8 / 66

art

12 / 12

sponsoring request

2 / 4

Format: table

You can choose the columns displayed in the table format (format=table) using col=<field>. You can specify multiple fields and the order they are displayed by placing pipes (|) between the columns:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter)]]

This is displayed as:

Results (1 - 3 of 7169)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#9439 fixed videotoolbox DTS is invalid Paul Pacifico
#9436 invalid Strange subtitles "Chapter 01" added when input has chapters and output is mp4 Andre
#9434 fixed silenceremove filter stopped working kmamal
1 2 3 4 5 6 7 8 9 10 11

Full rows

In table format you can specify full rows using rows=<field>:

[[TicketQuery(max=3,status=closed,order=id,desc=1,format=table,col=resolution|summary|owner|reporter,rows=description)]]

This is displayed as:

Results (1 - 3 of 7169)

1 2 3 4 5 6 7 8 9 10 11
Ticket Resolution Summary Owner Reporter
#9439 fixed videotoolbox DTS is invalid Paul Pacifico
Description


Summary of the bug:

videotoolbox is not working with the latest git version.

Tested on a Mac M1, h264_videotoolbox and hevc_videotoolbox both show DTS is invalid

How to reproduce:

% ffmpeg -f lavfi -i nullsrc -t 1 -c:v hevc_videotoolbox -s 640x360 -f null -

Using ffmpeg version N-103813-g970264a74f built on Mac OS Big Sur 11.5.2 with clang 12.0.5

#9436 invalid Strange subtitles "Chapter 01" added when input has chapters and output is mp4 Andre
Description

I am trying to remux from MKV to MP4.

A tx3g stream containing subtitles keeps appearing out of nowhere.

Same bug is described here: https://www.reddit.com/r/ffmpeg/comments/o0ve8e/when_changing_from_mkv_to_mp4_a_subtitle_tx3g/

Summary of the bug:

When an input video has chapters and the output format is mp4, an undesired subtitles stream is added, containing the texts "Chapter 01", "Chapter 02" etc.

How to reproduce:

ffmpeg -v 9 -loglevel 99 -i /t/chap.mkv -c copy /t/sub.mp4
ffmpeg version 2021-09-22-git-447cf53774-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  6.100 / 57.  6.100
  libavcodec     59.  9.100 / 59.  9.100
  libavformat    59.  5.100 / 59.  5.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8.  9.100 /  8.  9.100
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input url with argument 'T:/chap.mkv'.
Reading option '-c' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'T:/sub.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input url T:/chap.mkv.
Successfully parsed a group of options.
Opening an input file: T:/chap.mkv.
[NULL @ 0000020f5076f000] Opening 'T:/chap.mkv' for reading
[file @ 0000020f5076f5c0] Setting default whitelist 'file,crypto,data'
Probing matroska,webm score:100 size:2048
[matroska,webm @ 0000020f5076f000] Format matroska,webm probed with size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0000020f5076f000] Before avformat_find_stream_info() pos: 2198 bytes read:32768 seeks:0 nb_streams:1
[mpeg2video @ 0000020f50773500] Format yuv420p chosen by get_format().
[matroska,webm @ 0000020f5076f000] All info found
[matroska,webm @ 0000020f5076f000] stream 0: start_time: 0.509 duration: NOPTS
[matroska,webm @ 0000020f5076f000] format: start_time: 0.509 duration: 2.443 (estimate from stream) bitrate=5429 kb/s
[matroska,webm @ 0000020f5076f000] After avformat_find_stream_info() pos: 140585 bytes read:147318 seeks:0 frames:2
Input #0, matroska,webm, from 'T:/chap.mkv':
  Metadata:
    title           : TROPA_DE_ELITE_II
    ENCODER         : Lavf59.4.102
  Duration: 00:00:02.44, start: 0.509000, bitrate: 5429 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 134.241500
      Metadata:
        title           : Chapter 02
    Chapter #0:1: start 134.241500, end 519.626500
      Metadata:
        title           : Chapter 03
    Chapter #0:2: start 519.626500, end 1015.121500
      Metadata:
        title           : Chapter 04
    Chapter #0:3: start 1015.121500, end 1428.034000
      Metadata:
        title           : Chapter 05
    Chapter #0:4: start 1428.034000, end 1773.379000
      Metadata:
        title           : Chapter 06
    Chapter #0:5: start 1773.379000, end 2151.256500
      Metadata:
        title           : Chapter 07
    Chapter #0:6: start 2151.256500, end 2989.093500
      Metadata:
        title           : Chapter 08
    Chapter #0:7: start 2989.093500, end 3444.048000
      Metadata:
        title           : Chapter 09
    Chapter #0:8: start 3444.048000, end 3865.969500
      Metadata:
        title           : Chapter 10
    Chapter #0:9: start 3865.969500, end 4014.117500
      Metadata:
        title           : Chapter 11
    Chapter #0:10: start 4014.117500, end 4422.025000
      Metadata:
        title           : Chapter 12
    Chapter #0:11: start 4422.025000, end 4832.435000
      Metadata:
        title           : Chapter 13
    Chapter #0:12: start 4832.435000, end 5077.179500
      Metadata:
        title           : Chapter 14
    Chapter #0:13: start 5077.179500, end 5429.531500
      Metadata:
        title           : Chapter 15
    Chapter #0:14: start 5429.531500, end 5512.114000
      Metadata:
        title           : Chapter 16
    Chapter #0:15: start 5512.114000, end 5961.563000
      Metadata:
        title           : Chapter 17
    Chapter #0:16: start 5961.563000, end 6280.214667
      Metadata:
        title           : Chapter 18
  Stream #0:0(eng), 2, 1/1000: Video: mpeg2video (Main), 1 reference frame, yuv420p(tv, smpte170m, progressive, left), 720x480 [SAR 32:27 DAR 16:9], 0/1, 7000 kb/s, SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn
    Metadata:
      BPS-eng         : 6998906
      DURATION-eng    : 01:54:48.214666666
      NUMBER_OF_FRAMES-eng: 206440
      NUMBER_OF_BYTES-eng: 6026245570
      SOURCE_ID-eng   : 0100E0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-20 00:45:38
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      DURATION        : 00:00:02.443000000
    Side data:
      cpb: bitrate max/min/avg: 7000000/0/0 buffer size: 1835008 vbv_delay: N/A
Successfully opened the file.
Parsing a group of options: output url T:/sub.mp4.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: T:/sub.mp4.
[file @ 0000020f50777740] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
Output #0, mp4, to 'T:/sub.mp4':
  Metadata:
    title           : TROPA_DE_ELITE_II
    encoder         : Lavf59.5.100
  Chapters:
    Chapter #0:0: start 0.000000, end 133.732500
      Metadata:
        title           : Chapter 02
    Chapter #0:1: start 133.732500, end 519.117500
      Metadata:
        title           : Chapter 03
    Chapter #0:2: start 519.117500, end 1014.612500
      Metadata:
        title           : Chapter 04
    Chapter #0:3: start 1014.612500, end 1427.525000
      Metadata:
        title           : Chapter 05
    Chapter #0:4: start 1427.525000, end 1772.870000
      Metadata:
        title           : Chapter 06
    Chapter #0:5: start 1772.870000, end 2150.747500
      Metadata:
        title           : Chapter 07
    Chapter #0:6: start 2150.747500, end 2988.584500
      Metadata:
        title           : Chapter 08
    Chapter #0:7: start 2988.584500, end 3443.539000
      Metadata:
        title           : Chapter 09
    Chapter #0:8: start 3443.539000, end 3865.460500
      Metadata:
        title           : Chapter 10
    Chapter #0:9: start 3865.460500, end 4013.608500
      Metadata:
        title           : Chapter 11
    Chapter #0:10: start 4013.608500, end 4421.516000
      Metadata:
        title           : Chapter 12
    Chapter #0:11: start 4421.516000, end 4831.926000
      Metadata:
        title           : Chapter 13
    Chapter #0:12: start 4831.926000, end 5076.670500
      Metadata:
        title           : Chapter 14
    Chapter #0:13: start 5076.670500, end 5429.022500
      Metadata:
        title           : Chapter 15
    Chapter #0:14: start 5429.022500, end 5511.605000
      Metadata:
        title           : Chapter 16
    Chapter #0:15: start 5511.605000, end 5961.054000
      Metadata:
        title           : Chapter 17
    Chapter #0:16: start 5961.054000, end 6279.705667
      Metadata:
        title           : Chapter 18
  Stream #0:0(eng), 0, 1/16000: Video: mpeg2video (Main), 1 reference frame (mp4v / 0x7634706D), yuv420p(tv, smpte170m, progressive, left), 720x480 (0x0) [SAR 186:157 DAR 279:157], 0/1, q=2-31, 7000 kb/s, 29.97 fps, 29.97 tbr, 16k tbn
    Metadata:
      BPS-eng         : 6998906
      DURATION-eng    : 01:54:48.214666666
      NUMBER_OF_FRAMES-eng: 206440
      NUMBER_OF_BYTES-eng: 6026245570
      SOURCE_ID-eng   : 0100E0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.4 win(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-09-20 00:45:38
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
      DURATION        : 00:00:02.443000000
    Side data:
      cpb: bitrate max/min/avg: 7000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.e=-00:00:00.03 bitrate=N/A speed=N/A
frame=   58 fps=0.0 q=-1.0 Lsize=    1620kB time=00:00:01.86 bitrate=7102.9kbits/s speed= 588x
video:1616kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.203237%
Input file #0 (T:/chap.mkv):
  Input stream #0:0 (video): 58 packets read (1655211 bytes);
  Total: 58 packets (1655211 bytes) demuxed
Output file #0 (T:/sub.mp4):
  Output stream #0:0 (video): 58 packets muxed (1655211 bytes);
  Total: 58 packets (1655211 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0000020f507992c0] Statistics: 2 seeks, 10 writeouts
[AVIOContext @ 0000020f50777a80] Statistics: 1657989 bytes read, 0 seeks

Checking the extra subtitle stream:

ffprobe /t/sub.mp4
ffprobe version 2021-09-22-git-447cf53774-full_build-www.gyan.dev Copyright (c) 2007-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  6.100 / 57.  6.100
  libavcodec     59.  9.100 / 59.  9.100
  libavformat    59.  5.100 / 59.  5.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8.  9.100 /  8.  9.100
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'T:/sub.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    title           : TROPA_DE_ELITE_II
    encoder         : Lavf59.5.100
  Duration: 01:44:39.71, start: 0.000000, bitrate: 2 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 133.733000
      Metadata:
        title           : Chapter 02
    Chapter #0:1: start 133.733000, end 519.118000
      Metadata:
        title           : Chapter 03
    Chapter #0:2: start 519.118000, end 1014.613000
      Metadata:
        title           : Chapter 04
    Chapter #0:3: start 1014.613000, end 1427.525000
      Metadata:
        title           : Chapter 05
    Chapter #0:4: start 1427.525000, end 1772.870000
      Metadata:
        title           : Chapter 06
    Chapter #0:5: start 1772.870000, end 2150.748000
      Metadata:
        title           : Chapter 07
    Chapter #0:6: start 2150.748000, end 2988.585000
      Metadata:
        title           : Chapter 08
    Chapter #0:7: start 2988.585000, end 3443.539000
      Metadata:
        title           : Chapter 09
    Chapter #0:8: start 3443.539000, end 3865.461000
      Metadata:
        title           : Chapter 10
    Chapter #0:9: start 3865.461000, end 4013.609000
      Metadata:
        title           : Chapter 11
    Chapter #0:10: start 4013.609000, end 4421.516000
      Metadata:
        title           : Chapter 12
    Chapter #0:11: start 4421.516000, end 4831.926000
      Metadata:
        title           : Chapter 13
    Chapter #0:12: start 4831.926000, end 5076.671000
      Metadata:
        title           : Chapter 14
    Chapter #0:13: start 5076.671000, end 5429.023000
      Metadata:
        title           : Chapter 15
    Chapter #0:14: start 5429.023000, end 5511.605000
      Metadata:
        title           : Chapter 16
    Chapter #0:15: start 5511.605000, end 5961.054000
      Metadata:
        title           : Chapter 17
    Chapter #0:16: start 5961.054000, end 6279.706000
      Metadata:
        title           : Chapter 18
  Stream #0:0[0x1](eng): Video: mpeg2video (Main) (mp4v / 0x7634706D), yuv420p(tv, smpte170m, progressive), 720x480 [SAR 32:27 DAR 16:9], 6846 kb/s, SAR 186:157 DAR 279:157, 29.99 fps, 29.97 tbr, 16k tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
    Side data:
      cpb: bitrate max/min/avg: 7000000/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:1[0x2](eng): Data: bin_data (text / 0x74786574)
    Metadata:
      handler_name    : SubtitleHandler
Unsupported codec with id 98314 for input stream 1
#9434 fixed silenceremove filter stopped working kmamal
Description

I'm running the following command to remove all silence >1s from a file (attached):

ffmpeg -i sine3.wav -filter_complex 'silenceremove=stop_periods=-1:stop_threshold=-25dB:stop_duration=1' out.wav

This used to work, until commit 3b331468dae2e88ee6c87c257ac159ad662efcac which changes something with the period handling. Now the above command does not remove any silence.

1 2 3 4 5 6 7 8 9 10 11


See also: TracQuery, TracTickets, TracReports

Last modified 5 months ago Last modified on Apr 17, 2021, 4:33:53 PM
Note: See TracWiki for help on using the wiki.