Opened 10 years ago

Closed 10 years ago

#3813 closed defect (fixed)

Unable to isolate a single line of video with latest ffmpeg

Reported by: Matthew Austin Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
I am attempting to use a filter chain to take only line 31 of a video, resize it to 720x576, and run it through the black detection filter, in an effort to detect Teletext subtitles in the Vertical Blanking Interval of my input video (console output is redirected into a script variable and then tested). The video output is to be sent to Null, as I am only interested in the [Blackdetect...] reports. This worked under Windows build N-60329-ge708424 built Feb 3 2014 22:01:02, but does not work with current 64-bit Windows version - full console output is given below.

The issue does not occur if the height of the crop is greater than 1, but line 32 is the first line of active picture so I cannot make my crop output any taller.

How to reproduce:

% ffmpeg -i file.mxf -filter_complex "crop=x=0:y=31:w=iw:h=1, scale=w=iw:h=576, blackdetect=d=0.04:pix_th=0.05" -an -f null -

Console output as follows;
ffmpeg version N-65085-g4f91bb0 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul 28 2014 22:10:25 with gcc 4.8.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
opencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge
r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 92.101 / 52. 92.101
  libavcodec     55. 71.100 / 55. 71.100
  libavformat    55. 49.100 / 55. 49.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.102 /  4. 11.102
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Guessed Channel Layout for  Input Stream #0.1 : 7.1
Input #0, mxf, from 'File.mxf':
  Metadata:
    uid             : 9d6ee811-d617-11e3-83be-ac162dbbc568
    generation_uid  : 9d6ee812-d617-11e3-bd75-ac162dbbc568
    company_name    : Telestream
    product_name    : FlipFactory
    product_version : 3.0
    application_platform: win32
    product_uid     : ffeeddcc-bbaa-9988-7766-554433221100
    modification_date: 2014-05-07 18:44:26
    timecode        : 00:00:24:24
  Duration: 00:00:30.00, start: 0.000000, bitrate: 62572 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt470bg), 720x608 [SAR 608:405 DAR 16:9], max. 50000 kb/s, 25 fp
s, 25 tbr, 25 tbn, 50 tbc
    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s
[NULL @ 00000000047655c0] ignoring invalid SAR: 38912/45
[null @ 0000000004764920] Aspect ratio mismatch between muxer (38912/45) and encoder layer (0/1)
Output #0, null, to 'pipe:':
  Metadata:
    uid             : 9d6ee811-d617-11e3-83be-ac162dbbc568
    generation_uid  : 9d6ee812-d617-11e3-bd75-ac162dbbc568
    company_name    : Telestream
    product_name    : FlipFactory
    product_version : 3.0
    application_platform: win32
    product_uid     : ffeeddcc-bbaa-9988-7766-554433221100
    modification_date: 2014-05-07 18:44:26
    timecode        : 00:00:24:24
    Stream #0:0: Video: rawvideo (Y42B / 0x42323459), yuv422p, 720x576, q=2-31, 200 kb/s, SAR 38912:45 DAR 9728:9, 25 fp
s, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc55.71.100 rawvideo
Stream mapping:
  Stream #0:0 (mpeg2video) -> crop
  blackdetect -> Stream #0:0 (rawvideo)
Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred

ffmpeg version N-65085-g4f91bb0
built on Jul 28 2014 22:10:25

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (4)

comment:1 by Kieran Kunhya, 10 years ago

FWIW the proper way of doing this is to use libzvbi to detect teletext. You could make a filter that does this.

Also why do you have teletext past line 23?

comment:2 by Matthew Austin, 10 years ago

@ kierank - my programming ability doesn't extend as far as writing a filter for ffmpeg. As to why the data I want is on line 31, I may be using "Teletext" incorrectly from a technical perspective; the point is, there is data on line 31 of some of the files we receive, and we want an automated means of examining that line, and only that line, to see if we need to copy the file into our subs processor or if we can move it on to the next step straight away.

comment:3 by Carl Eugen Hoyos, 10 years ago

Should be fixed in 355121bc - thank you for the report!

comment:4 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Resolution: fixed
Status: newclosed
Version: unspecifiedgit-master
Note: See TracTickets for help on using tickets.