mandvd cannot build animated menu when NTSC is selected.

Bug #420616 reported by spodhajecki
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mandvd (Ubuntu)
Fix Released
Medium
Alessio Treglia
Jaunty
Invalid
Undecided
Unassigned
Karmic
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: mandvd

mandvd - Installed: 2.5-4-0ubuntu1
mjpegtools - Installed: 1:1.9.0-0.0ubuntu3

Ubuntu 9.04 amd64. Packages are most current as of todays date.
Expected Result:
Dvd files with an animated menu are created when NTSC is selected.

What Happens:
When generating an animated menu under NTSC, the shell script, menu.sh, generated by mandvd passes 29 from jpeg2yuv to mpeg2enc. This is causing mpeg2enc to produce an error message "**ERROR: [mpeg2enc] Input stream with unknown frame-rate and no frame-rate specified with -a!" thus breaking the dvd creation process. The Mandvd error message is "Error generating menu. Check the console for more details." genmenu.m2v is not created and mplex also fails (due to missing genmenu.m2v).

Mandvd Console output:
--> Output from generation of menu ------------------------------------------------------------
1920+0 records in
1920+0 records out
7680 bytes (7.7 kB) copied, 0.00194892 s, 3.9 MB/s
Warning: unsupported audio format
   INFO: [jpeg2yuv] Parsing & checking input files.
   INFO: [jpeg2yuv] YUV colorspace detected.

   INFO: [jpeg2yuv] Starting decompression
   INFO: [jpeg2yuv] Image dimensions are 720x480
   INFO: [jpeg2yuv] Movie frame rate is: 29.000000 frames/second
   INFO: [jpeg2yuv] Non-interlaced/progressive frames.
   INFO: [jpeg2yuv] Frame size: 720 x 480
   INFO: [jpeg2yuv] Number of Loops 1
   INFO: [jpeg2yuv] Number of Frames -1
   INFO: [jpeg2yuv] Start at frame 0
   INFO: [jpeg2yuv] Now generating YUV4MPEG stream.
   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /home/steve/DVD//xxxgibmenanim000000.jpg, size 20639
   INFO: [jpeg2yuv] Rescaling color values.
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
   INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
   INFO: [mpeg2enc] Selecting Generic MPEG2 output profile
**ERROR: [mpeg2enc] Input stream with unknown frame-rate and no frame-rate specified with -a!
   INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
--verbose|-v num
    Level of verbosity. 0 = quiet, 1 = normal 2 = verbose/debug
--format|-f fmt
    Encoding profile
    [0 = Generic MPEG1, 1 = standard VCD, 2 = user VCD,
     3 = Generic MPEG2, 4 = standard SVCD, 5 = user SVCD,
     6 = VCD Stills sequences, 7 = SVCD Stills sequences, 8|9 = DVD,
     10 = ATSC 480i, 11 = ATSC 480p, 12 = ATSC 720p, 13 = ATSC 1080i]
--display-hsize|-x [32..16383]
   Set the the display-horizontal-size hint in MPEG-2 output to
   something other than the encoded image width
--display-vsize|-y [32..16383]
   Set the the display-vertical-size hint in MPEG-2 output to
   something other than the encoded image height
--aspect|-a num
    Set displayed image aspect ratio image (default: 2 = 4:3)
    [1 = 1:1, 2 = 4:3, 3 = 16:9, 4 = 2.21:1]
--frame-rate|-F num
    Set playback frame rate of encoded video
    (default: frame rate of input stream)
    0 = Display frame rate code table
--video-bitrate|-b num
    Set Bitrate of compressed video in KBit/sec
    (default: 1152.0 for VCD, 2500.0 for SVCD, 7500.0 for DVD)
--ratecontroller|-A [0..1] (default:0)
    Specify ratecontrol alorithm
--nonvideo-bitrate|-B num
    Non-video data bitrate to assume for sequence splitting
    calculations (see also --sequence-length).
--quantisation|-q num
    Image data quantisation factor [1..31] (1 is best quality, no default)
    When quantisation is set variable bit-rate encoding is activated and
    the --bitrate value sets an *upper-bound* video data-rate
--output|-o pathname
    Pathname of output file or fifo (REQUIRED!!!)
--target-still-size|-T size
    Size in KB of VCD stills
--interlace-mode|-I num
    Sets MPEG 2 motion estimation and encoding modes:
    0 = Progressive (non-interlaced)(Movies)
    1 = Interlaced source material (video)
    2 = Interlaced source material, per-field-encoding (video)
--motion-search-radius|-r num
    Motion compensation search radius [0..32] (default 16)
--reduction-4x4|-4 num
    Reduction factor for 4x4 subsampled candidate motion estimates
    [1..4] [1 = max quality, 4 = max. speed] (default: 2)
--reduction-2x2|-2 num
    Reduction factor for 2x2 subsampled candidate motion estimates
    [1..4] [1 = max quality, 4 = max. speed] (default: 3)
--min-gop-size|-g num
    Minimum size Group-of-Pictures (default depends on selected format)
--max-gop-size|-G num
    Maximum size Group-of-Pictures (default depends on selected format)
    If min-gop is less than max-gop, mpeg2enc attempts to place GOP
    boundaries to coincide with scene changes
--closed-gop|-c
    All Group-of-Pictures are closed. Useful for authoring multi-angle DVD
--force-b-b-p|-P
    Preserve two B frames between I/P frames when placing GOP boundaries
--quantisation-reduction|-Q num
    Max. quantisation reduction for highly active blocks
    [0.0 .. 4.0] (default: 0.0)
--quant-reduction-max-var|-X num
    Luma variance below which quantisation boost (-Q) is used
    [0.0 .. 2500.0](default: 0.0)
--video-buffer|-V num
    Target decoders video buffer size in KB (default 46)
--video-norm|-n n|p|s
    Tag output to suit playback in specified video norm
    (n = NTSC, p = PAL, s = SECAM) (default: PAL)
--sequence-length|-S num
    Place a sequence boundary in the video stream so they occur every
    num Mbytes once the video is multiplexed with audio etc.
    N.b. --non-video-bitrate is used to the bitrate of the other
    data that will be multiplexed with this video stream
--3-2-pulldown|-p
    Generate header flags for 3-2 pull down of 24fps movie material
--intra_dc_prec|-D [8..11]
    Set number of bits precision for DC (base colour) of blocks in MPEG-2
--reduce-hf|-N num
    [0.0..2.0] Reduce hf resolution (increase quantization) by num (default: 0.0)
--keep-hf|-H
    Maximise high-frequency resolution - useful for high quality sources
    and/or high bit-rates)
--sequence-header-every-gop|-s
    Include a sequence header every GOP if the selected format doesn't
    do so by default.
--no-dummy-svcd-SOF|-d
    Do not generate dummy SVCD scan-data for the ISO CD image
    generator "vcdimager" to fill in.
--playback-field-order|-z b|t
    Force setting of playback field order to bottom or top first
--multi-thread|-M num
    Activate multi-threading to optimise throughput on a system with num CPU's
    [0..32], 0=no multithreading, (default: 0)
--correct-svcd-hds|-C
    Force SVCD horizontal_display_size to be 480 - standards say 540 or 720
    But many DVD/SVCD players screw up with these values.
--no-constraints
    Deactivate constraints for maximum video resolution and sample rate.
    Could expose bugs in the software at very high resolutions!
--no-altscan-mpeg2
    Deactivate the use of the alternate block pattern for MPEG-2. This is
    A work-around for a Bug in an obscure hardware decoder.
--dualprime-mpeg2
    Turn ON use of dual-prime motion compensation. Default is OFF unless this option is used
--custom-quant-matrices|-K kvcd|tmpgenc|default|hi-res|file=inputfile|help
    Request custom or userspecified (from a file) quantization matrices
--unit-coeff-elim|-E num
    Skip picture blocks which appear to carry little information
    because they code to only unit coefficients. The number specifies
    how aggresively this should be done. A negative value means DC
    coefficients are included. Reasonable values -40 to 40
--b-per-refframe| -R 0|1|2
    The number of B frames to generate between each I/P frame
--cbr|-u
    For MPEG-2 force the use of (suboptimal) ConstantBitRate (CBR) encoding
--chapters X[,Y[,...]]
    Specifies which frames should be chapter points (first frame is 0)
    Chapter points are I frames on closed GOP's.
--help|-?
    Print this lot out!
   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /home/steve/DVD//xxxgibmenanim000001.jpg, size 20806
   INFO: [jpeg2yuv] Rescaling color values.
   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /home/steve/DVD//xxxgibmenanim000002.jpg, size 20902

----snip redundant info ------

   INFO: [jpeg2yuv] Processing non-interlaced/interleaved /home/steve/DVD//xxxgibmenanim000347.jpg, size 20191
   INFO: [jpeg2yuv] Rescaling color values.
   INFO: [jpeg2yuv] Read from '/home/steve/DVD//xxxgibmenanim000348.jpg' failed: No such file or directory
   INFO: [jpeg2yuv] No more frames. Stopping.
   INFO: [mplex] mplex version 1.9.0 (2.2.7 $Date: 2006/02/01 22:23:01 $)
**ERROR: [mplex] Unable to open file genmenu.m2v for reading.
DVDAuthor::spumux, version 0.6.14.
Build options: gnugetopt magick iconv freetype
Send bugs to <email address hidden>

INFO: Locale=en_US.UTF-8
INFO: Converting filenames to UTF-8
STAT: 0:00:00.000

INFO: Picture survolee.png had 2 colors
INFO: Picture cliquee.png had 2 colors
INFO: Constructing blank img
INFO: Pickbuttongroups, success with 1 groups, useimg=1
INFO: 0 subtitles added, 0 subtitles skipped, stream: 32, offset: -0.00

Statistics:
- Processed 0 subtitles.
- The longest display line had -1 characters.
- The maximum number of displayed lines was 0.
- The normal display height of the font arial.ttf was 0.
- The bottom display height of the font arial.ttf was 0.
- The biggest subtitle box had 0 bytes.

End console output --

I worked around this by hex editing the mandvd binary and commenting out "rm -f xxxgibmen*.*" and then running mandvd to the menu generation error point. menu.sh in the output dir is modified, replacing "jpeg2yuv -f 29" with "jpeg2yuv -f 29.97" or "jpeg2yuv -f 30" which allows mpeg2enc to be satisfied. "bash menu.sh genmenu" is run from a terminal window followed by "dvdauthor -x dvdauthor.xml" to manually generate the dvd structure.

xine dvd:/home/steve/DVD/DVD/

As a suggested fix, change mandvd.cpp at or about line 335, "projfps = 29;" to "projfps = 30;"

I do not have a KDE/Qt build system to test.

As packaged, selecting PAL instead of NTSC allows complete generation with no errors.

Related branches

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Is this still reproducible with the latest release available in Karmic?

Changed in mandvd (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Fixed version available here, please test: https://launchpad.net/~quadrispro/+archive/testing

Revision history for this message
spodhajecki (spodhajecki) wrote :

My fault, that does not work. It breaks tests in dvdbuild.cpp like for image sizing. Possibly a better solution is to change dvdbuild.cpp at or about line 963:
       else
  {
    tmp_001 =
      "jpeg2yuv -f " + QString::number (projfps) + " -I p -l " +
      QString::number (nbre_occur->value ()) + " -j \"" +
      wpathtotalproj +
      "/xxxgibmenanim%06d.jpg\" | mpeg2enc -f 3 -b " + tmp_006 +
      " -n n -o ${1}.m2v\n";
  }

to:
       else
  {
    tmp_001 =
      "jpeg2yuv -f 30 -I p -l " +
      QString::number (nbre_occur->value ()) + " -j \"" +
      wpathtotalproj +
      "/xxxgibmenanim%06d.jpg\" | mpeg2enc -f 3 -b " + tmp_006 +
      " -n n -o ${1}.m2v\n";
  }

Revision history for this message
Alessio Treglia (quadrispro) wrote :
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Proposed patched package already here: https://launchpad.net/~quadrispro/+archive/testing

Please test.

Revision history for this message
spodhajecki (spodhajecki) wrote :

Thank You, building a dvd with NTSC and animated menu successful.

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Can you confirm this on Karmic?

Revision history for this message
spodhajecki (spodhajecki) wrote : Re: [Bug 420616] Re: mandvd cannot build animated menu when NTSC is selected.
Download full text (10.6 KiB)

No I cannot confirm on Karmic, I am only running Jaunty.

On Mon, Sep 21, 2009 at 1:50 PM, Alessio Treglia <email address hidden>wrote:

> Can you confirm this on Karmic?
>
> --
> mandvd cannot build animated menu when NTSC is selected.
> https://bugs.launchpad.net/bugs/420616
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “mandvd” package in Ubuntu: Triaged
> Status in mandvd in Ubuntu Jaunty: New
>
> Bug description:
> Binary package hint: mandvd
>
> mandvd - Installed: 2.5-4-0ubuntu1
> mjpegtools - Installed: 1:1.9.0-0.0ubuntu3
>
> Ubuntu 9.04 amd64. Packages are most current as of todays date.
> Expected Result:
> Dvd files with an animated menu are created when NTSC is selected.
>
> What Happens:
> When generating an animated menu under NTSC, the shell script, menu.sh,
> generated by mandvd passes 29 from jpeg2yuv to mpeg2enc. This is causing
> mpeg2enc to produce an error message "**ERROR: [mpeg2enc] Input stream with
> unknown frame-rate and no frame-rate specified with -a!" thus breaking the
> dvd creation process. The Mandvd error message is "Error generating menu.
> Check the console for more details." genmenu.m2v is not created and mplex
> also fails (due to missing genmenu.m2v).
>
>
> Mandvd Console output:
> --> Output from generation of menu
> ------------------------------------------------------------
> 1920+0 records in
> 1920+0 records out
> 7680 bytes (7.7 kB) copied, 0.00194892 s, 3.9 MB/s
> Warning: unsupported audio format
> INFO: [jpeg2yuv] Parsing & checking input files.
> INFO: [jpeg2yuv] YUV colorspace detected.
>
> INFO: [jpeg2yuv] Starting decompression
> INFO: [jpeg2yuv] Image dimensions are 720x480
> INFO: [jpeg2yuv] Movie frame rate is: 29.000000 frames/second
> INFO: [jpeg2yuv] Non-interlaced/progressive frames.
> INFO: [jpeg2yuv] Frame size: 720 x 480
> INFO: [jpeg2yuv] Number of Loops 1
> INFO: [jpeg2yuv] Number of Frames -1
> INFO: [jpeg2yuv] Start at frame 0
> INFO: [jpeg2yuv] Now generating YUV4MPEG stream.
> INFO: [jpeg2yuv] Processing non-interlaced/interleaved
> /home/steve/DVD//xxxgibmenanim000000.jpg, size 20639
> INFO: [jpeg2yuv] Rescaling color values.
> INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
> INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
> INFO: [mpeg2enc] SETTING EXTENDED MMX for PREDICTION!
> INFO: [mpeg2enc] Selecting Generic MPEG2 output profile
> **ERROR: [mpeg2enc] Input stream with unknown frame-rate and no frame-rate
> specified with -a!
> INFO: [mpeg2enc] Progressive input - selecting progressive encoding.
> --verbose|-v num
> Level of verbosity. 0 = quiet, 1 = normal 2 = verbose/debug
> --format|-f fmt
> Encoding profile
> [0 = Generic MPEG1, 1 = standard VCD, 2 = user VCD,
> 3 = Generic MPEG2, 4 = standard SVCD, 5 = user SVCD,
> 6 = VCD Stills sequences, 7 = SVCD Stills sequences, 8|9 = DVD,
> 10 = ATSC 480i, 11 = ATSC 480p, 12 = ATSC 720p, 13 = ATSC 1080i]
> --display-hsize|-x [32..16383]
> Set the the display-horizontal-size hint in MPEG-2 output to
> something other than the encoded image width
> --display-vsize|-y [32..16383]
> Set the the d...

Changed in mandvd (Ubuntu):
status: Triaged → In Progress
importance: Low → Medium
assignee: nobody → Alessio Treglia (quadrispro)
Changed in mandvd (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mandvd - 2.5-5-0ubuntu2

---------------
mandvd (2.5-5-0ubuntu2) lucid; urgency=low

  * 01-ntsc_projects_fps.diff: Adjust FPS to fix building of animated menu
    when NTSC is selected, fixes LP: #420616.
  * Bump Standards.
  * Switch to debian 3.0 (quilt) format.
 -- Alessio Treglia <email address hidden> Thu, 15 Apr 2010 20:00:10 +0200

Changed in mandvd (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Alessio Treglia (quadrispro) wrote :

Forwarded to <email address hidden>

Revision history for this message
JC Hulce (soaringsky) wrote :

Thank you for taking the time to report this bug. This issue has been fixed in newer versions of Ubuntu, and Jaunty and Karmic EOL. Thus, I am closing this bugtask.

Changed in mandvd (Ubuntu Jaunty):
status: New → Invalid
Changed in mandvd (Ubuntu Karmic):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.