Opened 7 years ago

Closed 7 years ago

#1181 closed defect (fixed)

dump_metadata should filter control-chars

Reported by: vogelchr Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: metadata
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

My mobile phone embedds a form-feed/Ctrl-L in the metadata of the recorded videos, shown as "CTRL-L" below. It messes up my unix-terminal and hides information I really wanted to see.

  Duration: 00:00:40.16, start: 0.000000, bitrate: 2593 kb/s
    Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 2524 kb/s, 29.70 fps, 29.97 tbr, 30k tbn, 60k tbc
    Metadata:
      handler_name    : **CTRL-L**VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono, s16, 62 kb/s
    Metadata:
      handler_name    : **CTRL-L**SoundHandler

Unfortunately, these control-chars are interpreted as "clear screen" in a normal unix-terminal, these chars (\1 ... \37) should be filtered on metadata dump.

Attached patch replaces these control chars with a question mark.

    Metadata:
      handler_name    : ?VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 16000 Hz, mono, s16, 62 kb/s
    Metadata:
      handler_name    : ?SoundHandler

Attachments (1)

0001-filter-ctrl-chars-on-dump.patch (1.4 KB) - added by vogelchr 7 years ago.
Patch to filter control-chars from metadata dumps.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by vogelchr

Patch to filter control-chars from metadata dumps.

comment:1 Changed 7 years ago by cehoyos

  • Component changed from avcodec to avformat

I cannot comment on the patch, but please provide a sample and complete, uncut console output, fix the indentation in the patch (you can use tools/patcheck to double-check your patch) and consider sending patches to ffmpeg-devel, they get more attention there.

comment:2 Changed 7 years ago by michael

I think the patch would mess up tabs

comment:3 Changed 7 years ago by michael

  • Resolution set to fixed
  • Status changed from new to closed

Code added that filters problematic chars.
If you use a custom av_log and this is not sufficient then please reopen the ticket

Note: See TracTickets for help on using tickets.