Bug 109739 - yuvscaler error in digikam
Summary: yuvscaler error in digikam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-VideoSlideshow (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-28 01:31 UTC by Anthony Tantillo
Modified: 2017-06-30 07:33 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.0


Attachments
patch to have it working as comment #3 (949 bytes, patch)
2006-02-03 16:17 UTC, Angelo Naselli
Details
new patch (1.27 KB, patch)
2006-02-07 09:49 UTC, Angelo Naselli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Tantillo 2005-07-28 01:31:44 UTC
Version:           0.1.1 (using KDE 3.4.1-1.3.fc4.kde, Fedora)
Compiler:          Target: i386-redhat-linux
OS:                Linux (i686) release 2.6.12-1.1398_FC4

I get the following error when I attempt create the MPEG slideshow.  My version of mjpegtools follows the error.


THE COMMAND LINE IS :

images2mpg --with-gui  -f XVCD -n NTSC -d 10 -c 000 -T /tmp/kde-tony/kipi-mpegencoderplugin-3822/ -M /usr/bin -I /usr/bin -o /home/tony/test/test -i  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0594.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0595.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0596.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0597.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0598.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0599.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0600.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0601.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0602.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0603.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0604.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0605.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0606.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0607.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0608.JPG  /home/tony/MyPhotos/2005_July_26_FORD_Meeting/IMG_0609.JPG 
-----------------------------------------------
Initialising...

Encoding image files...

Images encoding (%) : 0      [0      
   INFO: [yuvscaler] yuvscaler 1.6.3-rc1 (15-02-2004) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2004 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
Images encoding (%) : 0      [1      
**ERROR: [yuvscaler] Could'nt read YUV4MPEG header!
-----------------------------------------------

EXIT STATUS : error during encoding process.

Name        : mjpegtools                   Relocations: (not relocatable)
Version     : 1.6.3                             Vendor: Freshrpms.net
Release     : 0.1.rc1.2.fc4                 Build Date: Sun 05 Jun 2005 12:51:14 PM EDT
Install Date: Wed 06 Jul 2005 10:55:11 PM EDT      Build Host: python2.freshrpms.net
Group       : Applications/Multimedia       Source RPM: mjpegtools-1.6.3-0.1.rc1.2.fc4.src.rpm
Size        : 1801264                          License: GPL
Signature   : DSA/SHA1, Sun 05 Jun 2005 12:57:51 PM EDT, Key ID 692ac459e42d547bPackager    : Matthias Saou <matthias@rpmforge.net>
URL         : http://mjpeg.sourceforge.net/
Summary     : Tools for recording, editing, playing and encoding mpeg video
Description :
Comment 1 Tung NGUYEN 2005-08-15 13:13:40 UTC
The problem comes from mjpegtools-1.6.3-rcX. The MPEG slideshow works fine with 
mjpegtools-1.6.2. See http://qa.mandriva.com/show_bug.cgi?id=17555 for more informations.
Comment 2 Tom Albers 2005-09-14 18:16:19 UTC
*** Bug 112550 has been marked as a duplicate of this bug. ***
Comment 3 Anthony Tantillo 2005-09-15 01:40:50 UTC
Comment 1 is correct.  I found out that if you have mjpegtools 1.6.3 and you change the following line in /usr/bin/images2mpg from

 done | $PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT | $YUVSCALER_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -O $VIDEO_FORMAT | $MPEG2ENC_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -b $BIT_RATE -V $BUFFER_SIZE -f $VIDEO_FORMAT_NUMBER -o "$TMPFILENAME.tmp.m2v"

to 

done | $PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT -S 420mpeg2 | $YUVSCALER_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -O $VIDEO_FORMAT | $MPEG2ENC_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -b $BIT_RATE -V $BUFFER_SIZE -f $VIDEO_FORMAT_NUMBER -o "$TMPFILENAME.tmp.m2v"

the mpeg slideshow function works.  The /usr/bin/ppmtoy4m needs the -S 420mpeg2 argument.

I found this out while tracing an error in dvdstyler to mjpegtools. 
Comment 4 Tung NGUYEN 2005-09-15 10:45:30 UTC
Anthony,

Thank you very much for this correction in the command line for mjpegtools 1.6.3.
Comment 5 caulier.gilles 2005-09-15 10:48:07 UTC
"-S 420mpeg2" works with old 1.6.x mjpegtools release ?

If yes, can you make a patch to apply on plugin ?

Thanks in advance.

Gilles Caulier

Comment 6 Tom Albers 2005-10-02 17:24:37 UTC
*** Bug 113722 has been marked as a duplicate of this bug. ***
Comment 7 Angelo Naselli 2005-10-08 16:43:19 UTC
to Comment #5 it seems not to work (or at least it founds error):
Initialising...

Encoding image files...

Images encoding (%) : 0      [0
**ERROR: [ppmtoy4m] Unknown subsampling mode option:  420mpeg2
**ERROR: [ppmtoy4m] For usage hints, use option '-h'.  Please take a hint.
   INFO: [yuvscaler] yuvscaler 1.6.2 (31-12-2003) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2003 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
**ERROR: [yuvscaler] Could'nt read YUV4MPEG header!
**ERROR: [mpeg2enc] Could not read YUV4MPEG2 header: system error (failed read/write)!
/usr/bin/images2mpg: line 831: 29106 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     29107                       | cat
Comment 8 Angelo Naselli 2005-10-08 16:46:14 UTC
ppmtoy4m -h

usage:  ppmtoy4m [options] [ppm-file]

Reads RAW PPM image(s), and produces YUV4MPEG2 stream on stdout.
Converts computer graphics R'G'B' colorspace to digital video Y'CbCr,
 and performs chroma subsampling.

If 'ppm-file' is not specified, reads from stdin.

 options:  (defaults specified in [])
[...]
  -S mode  chroma subsampling mode [420_jpeg]
            '420_jpeg' -> 4:2:0, JPEG/MPEG-1, interstitial siting
            '420_mpeg2' -> 4:2:0, MPEG-2, horizontal cositing
[...]
Is the suggested option right? or it should be  -S 420_mpeg2 instead?

Comment 9 Angelo Naselli 2005-10-08 17:05:06 UTC
I answer by myself: (mjpegtools-1.6.3-0.rc3.3mdk)
  -S mode  chroma subsampling mode [444]
            '420jpeg' -> 4:2:0 JPEG/MPEG-1 (interstitial)
            '420mpeg2' -> 4:2:0 MPEG-2 (horiz. cositing)
            '444' -> 4:4:4 (no subsampling)
Comment 10 Angelo Naselli 2005-10-08 17:33:42 UTC
Can we add something like that?
ADDITIONAL_OPT="420mpeg2"
testcmd=`$PPMTOY4M_BIN -h | grep $option`
if [ "$testcmd" == "" ]; then
	ADDITIONAL_OPT="420_mpeg2"
fi

[...]
... $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT -S $ADDITIONAL_OPT | ...
Comment 11 Angelo Naselli 2005-10-08 17:53:00 UTC
I meant
testcmd=`$PPMTOY4M_BIN -h | grep $ADDITIONAL_OPT`
:(
Comment 12 Joern Ahrens 2005-11-05 00:24:31 UTC
*** Bug 115705 has been marked as a duplicate of this bug. ***
Comment 13 Tom Albers 2005-11-10 19:10:33 UTC
*** Bug 116040 has been marked as a duplicate of this bug. ***
Comment 14 Winfried Diehm 2005-12-04 14:29:57 UTC
had the same problem with mjpegtools 1.8.0.
Solved the problem making changes to the images2mpg-script according comment #3 from Anthony Tantillo
Thanks to Anthony

Winfried
Comment 15 Angelo Naselli 2005-12-04 21:44:32 UTC
Unfortunatly it seems not to work with mandriva 2006
and mjpegtools-1.6.3-0
Comment 16 nico mennel 2005-12-04 22:21:33 UTC
who can explain me how to fix this bug excuse i am a beginner


LA LIGNE DE COMMANDE EST :

images2mpg --with-gui  -f XVCD -n PAL -d 1 -t 2 -c 000 -T /home/nico/tmp/kde-nico/kipi-mpegencoderplugin-11367/ -M /usr/bin -I /usr/bin -w "/mnt/windows/Claude Barzotti - Le Rital(2).mp3" -o "/home/nico/Vidéo/diapo.mpg" -i  "/home/nico/Images/2005, Octobre, 23/IMG_0690.JPG" 
-----------------------------------------------
Initialising...

Encoding image files...

Images encoding (%) : 0      [0      
   INFO: [yuvscaler] yuvscaler 1.8.0 (15-02-2004) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2004 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
Images encoding (%) : 1      [0      
/usr/bin/images2mpg: line 831: 14820 Relais brisé (pipe)     $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     14821                       | cat
Images encoding (%) : 2      [0      
...............
...............
/usr/bin/images2mpg: line 831: 14793 Exit 141                while test $CPT -lt $NBFRAMETOTAL; do
    CPT=`echo $(($CPT+1))`; if [ $WITHGUI = 0 ]; then
        echo -ne "Frame Num. $CPT / $NBFRAMETOTAL      \r" 1>&2;
    else
        COUNTERGUI=`echo $((($CPT*100)/$NBFRAMETOTAL))`; echo -ne "Images encoding (%) : $COUNTERGUI      [`echo $(($CPF-1))`      \n" 1>&2;
    fi; if [ $TRANSITIONENABLE = 0 ]; then
        if [ $CPT = `echo $((($CPF*$NBFRAMEIMAGE)-$NBFRAMEIMAGE+1))` ]; then
            $MONTAGE_BIN -type TrueColor -quality 100 -geometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg"; $CONVERT_BIN -type TrueColor -quality 100 "$TMPFILENAME.tmp.jpg" "$TMPFILENAME.tmp.pnm"; CPF=`echo $(($CPF+1))`;
        fi;
    else
        if [ $[$CPT >= `echo $((($CPF*($NBFRAMEIMAGE+$NBFRAMETRANSITION)-$NBFRAMEIMAGE-$NBFRAMETRANSITION)))`] = 1 ]; then
            if [ $[$CPT <= `echo $((($CPF*($NBFRAMEIMAGE+$NBFRAMETRANSITION)-$NBFRAMEIMAGE)))`] = 1 ]; then
                if [ $DISSOLVEVALUE = 99 ]; then
                    $MONTAGE_BIN -type TrueColor -quality 100 -geometry 768x576 -texture "$MASK" "${INPUT_IMAGE_FILES[`echo $(($CPF-1))`]}" "$TMPFILENAME.tmp.jpg"; $CONVERT_BIN -type TrueColor -quality 100 "$TMPFILENAME.tmp.jpg" "$TMPFILENAME.next_trans.tmp.pnm";
                fi; $COMPOSITE_BIN "$TMPFILENAME.prev_trans.tmp.pnm" "$TMPFILENAME.next_trans.tmp.pnm" -type TrueColor -quality 100 -dissolve $DISSOLVEVALUE "$TMPFILENAME.tmp.pnm"; if [ $CPD = `echo $(($NBFRAMETRANSITION-1))` ]; then
                    CPF=`echo $(($CPF+1))`; DISSOLVEVALUE=99; CPD=0; cp -f "$TMPFILENAME.next_trans.tmp.pnm" "$TMPFILENAME.prev_trans.tmp.pnm"; mv -f "$TMPFILENAME.next_trans.tmp.pnm" "$TMPFILENAME.tmp.pnm";
                else
                    CPD=`echo $(($CPD+1))`; DISSOLVEVALUE=`echo $((100-($CPD*$DISSOLVEVALUEINC)))`;
                fi;
            fi;
        fi;
    fi; $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" - | cat;
done
     14801 Relais brisé (pipe)     | $PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT -S 420mpeg2
     14802 Relais brisé (pipe)     | $YUVSCALER_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -O $VIDEO_FORMAT
     14803 Instruction illégale    | $MPEG2ENC_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -b $BIT_RATE -V $BUFFER_SIZE -f $VIDEO_FORMAT_NUMBER -o "$TMPFILENAME.tmp.m2v"

Encoding audio file...

/usr/bin/images2mpg: line 855: /usr/bin/mpg123: Aucun fichier ou répertoire de ce type
cat: 
-----------------------------------------------

ETAT DE SORTIE : erreur pendant le processus d'encodage.
Comment 17 Angelo Naselli 2005-12-05 21:40:37 UTC
You've probably had the same problem I have e.g. the broken pipe. Some commands
dows not work correctly. Which is your system?
Comment 18 Tom Albers 2005-12-13 19:07:49 UTC
*** Bug 101110 has been marked as a duplicate of this bug. ***
Comment 19 Joern Ahrens 2005-12-17 17:01:17 UTC
*** Bug 118343 has been marked as a duplicate of this bug. ***
Comment 20 Marcus Schimmelpfennig 2005-12-27 23:51:22 UTC
I have the same problems with mjepegtools 1:1.8.0-0.0
I am not very familar in working with bug tracking systems, so my question is.

Is there a fix for this problem.
Thanks for your help!!

Die Befehlszeile ist:

images2mpg --with-gui  -f SVCD -n PAL -d 10 -t 1 -c 000 -T /tmp/kde-marsch/kipi-mpegencoderplugin-974/ -M /usr/bin -I /usr/bin -w "/home/marsch/Musik Mosel/Mix_fuer_Moselbilder.wav" -o "/home/marsch/weihn2005.mpg" -i  "/home/marsch/Pictures/Weihnachten 2005/CIMG1067.JPG" 
-----------------------------------------------
Initialising...

Encoding image files...

Images encoding (%) : 0      [0      
   INFO: [yuvscaler] yuvscaler 1.8.0 (15-02-2004) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2004 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
**ERROR: [yuvscaler] Could'nt read YUV4MPEG header!
-----------------------------------------------

EXIT STATUS: Fehler während des Kodierungsvorgang.

Comment 21 Tom Albers 2005-12-27 23:58:34 UTC
Tung NGUYEN 2005-12-15 00:10 wrote in another report:
Currently, if you want to create MPEG slideshow, you MUST USE mjpegtools-1.6.2 (no mjpegtools-1.6.3.rcXX, no mjpegtools-1.8.0... your mjpegtools version is 1.8.0 and it does not work). 
Comment 22 Marcus Schimmelpfennig 2005-12-28 00:05:58 UTC
I tried the bug fix Additional Comment #3 From Anthony Tantillo 2005-09-15 01:40

and it works also in mjpegtools 1.1.8.

Is it possible to fix this for the future comming versions?
Comment 23 Thommi 2006-01-29 22:14:36 UTC
Hi anybody!

On the tryout of this wonderful tool it cames up the same problem like any other discribes here. My fix is: Add the -S '420jpeg' option to the commandline of ppmto4m to fix the problem.

Best regards

Thommi
Comment 24 Thiago Macieira 2006-02-02 20:11:40 UTC
*** Bug 121045 has been marked as a duplicate of this bug. ***
Comment 25 Angelo Naselli 2006-02-03 16:17:12 UTC
Created attachment 14529 [details]
patch to have it working as comment #3

Since the most seem to say this solution works i believe it could be released.
I'm not sure we have to continue being back compatible. 
I tested it on mandriva 2006 again and it works as well. 
ASAP I'll try it on mandriva cooker.
Comment 26 Angelo Naselli 2006-02-03 16:53:55 UTC
About comment #16 the problem should be due to:
-w "/mnt/windows/Claude Barzotti - Le Rital(2).mp3"

e.g. -w is for wav -a for mpeg 2 audio. 
Comment 27 Angelo Naselli 2006-02-07 09:49:48 UTC
Created attachment 14586 [details]
new patch

Hi, before going on and eventually commit (or ask to) this patch i'd
like you to test this one. I'd like to have also a special feed-back 
from who has not the problem to see if there's no regressions.
Comment 28 Angelo Naselli 2006-02-07 09:51:45 UTC
the audio problem should be discussed in other bug.
Comment 29 Scott Grayban 2006-02-24 14:29:44 UTC
This still does not work in Mandriva 2006.

mjpegtools-1.6.3-0.rc3.3mdk is what we have and there is no update.
Comment 30 Angelo Naselli 2006-02-24 14:36:43 UTC
Scott, even with my patch?
That patch seems to work here with mandriva 2006. Not in cooker though.
Comment 31 Scott Grayban 2006-02-24 14:37:40 UTC
Nope and I tried the patch at http://bugs.kde.org/attachment.cgi?id=14586&action=view doesn't work either.
Comment 32 Scott Grayban 2006-02-24 14:38:59 UTC
My debug output from my box.....


$ images2mpg -d 3 -o crests.mpg -i Graban-crest.gif Lampe-crest.gif Malinowski-crest.gif
Initialising...

Encoding image files...

   INFO: [yuvscaler] yuvscaler 1.6.3-rc3 (15-02-2004) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2004 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
Images encoding (%) : 0      [0
   INFO: [ppmtoy4m] Command-line Parameters:
   INFO: [ppmtoy4m]              framerate:  30000:1001
   INFO: [ppmtoy4m]     pixel aspect ratio:  1:1
   INFO: [ppmtoy4m]          pixel packing:  RGB
   INFO: [ppmtoy4m]              interlace:  none/progressive
   INFO: [ppmtoy4m]         starting frame:  0
   INFO: [ppmtoy4m]            # of frames:  270, or until input exhausted
   INFO: [ppmtoy4m]     chroma subsampling:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
--DEBUG: [ppmtoy4m] Got PPM header:  768x576
--DEBUG: [ppmtoy4m] Initializing PPM read_frame
--DEBUG: [ppmtoy4m] Alloc'ing buffers
--DEBUG: [ppmtoy4m] Reading rows
   INFO: [ppmtoy4m] Output Stream parameters:
   INFO: [ppmtoy4m]     frame size:  768x576 pixels (663552 bytes)
   INFO: [ppmtoy4m]         chroma:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [ppmtoy4m]     frame rate:  30000/1001 fps (~29.970030)
   INFO: [ppmtoy4m]      interlace:  none/progressive
   INFO: [ppmtoy4m]   sample aspect ratio:  1:1
   INFO: [yuvscaler] input:   frame size:  768x576 pixels (663552 bytes)
   INFO: [yuvscaler] input:       chroma:  4:2:0 MPEG-2 (horiz. cositing)
   INFO: [yuvscaler] input:   frame rate:  30000/1001 fps (~29.970030)
   INFO: [yuvscaler] input:    interlace:  none/progressive
   INFO: [yuvscaler] input: sample aspect ratio:  1:1
   INFO: [yuvscaler] from 768x576, take 768x576+0+0, NOT_INTERLACED/PROGRESSIVE
   INFO: [yuvscaler] scale to 720x480, 720x480 being displayed
   INFO: [yuvscaler] Scaling uses the RESAMPLE algorithm,
   INFO: [yuvscaler] frame rate: 29.970 fps
--DEBUG: [yuvscaler] divider,i_w_s,o_w_s = 48,16,15
--DEBUG: [yuvscaler] divider,i_w_s,o_w_s = 96,6,5
--DEBUG: [yuvscaler] Diviseur=96
   INFO: [yuvscaler] Scaling ratio for width is 16 to 15
   INFO: [yuvscaler] and is 6 to 5 for height
--DEBUG: [yuvscaler] before alignement: divide=0x8055008
--DEBUG: [yuvscaler] after alignement: divide=0x8055010
--DEBUG: [yuvscaler] before alignement: input=0xb7ced008 output=0xb7c6e008
--DEBUG: [yuvscaler] after alignement: input=0xb7ced010 output=0xb7c6e010
--DEBUG: [yuvscaler] End of Initialisation
Images encoding (%) : 0      [1
/usr/bin/images2mpg: line 838: 22257 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     22258                       | cat
Images encoding (%) : 1      [1
/usr/bin/images2mpg: line 838: 22263 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     22264                       | cat
Images encoding (%) : 1      [1
/usr/bin/images2mpg: line 838: 22269 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     22270                       | cat
Images encoding (%) : 1      [1
/usr/bin/images2mpg: line 838: 22275 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     22276                       | cat
Images encoding (%) : 2      [1
/usr/bin/images2mpg: line 838: 22281 Broken pipe             $CONVERT_BIN -depth 8 ppm:"$TMPFILENAME.tmp.pnm" -
     22282                       | cat
Images encoding (%) : 2      [1
Comment 33 Scott Grayban 2006-02-24 14:45:29 UTC
line 838 is      done | $PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT $PPMTOY4M_OPT | $YUVSCALER_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -O $VIDEO_FORMAT | $MPEG2ENC_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -b $BIT_RATE -V $BUFFER_SIZE -f $VIDEO_FORMAT_NUMBER -o "$TMPFILENAME.tmp.m2v"

after I applied the last patch here
Comment 34 Angelo Naselli 2006-02-24 14:49:58 UTC
Ok, that shows what i was afraid of, the "-S 420mpeg2" does not work
for everybody even in the same distro :(

As soon as possible i try to re-write the script so that i can try to
understand better in which step it fails. 
I suppose the same as in my cooker.
Comment 35 Scott Grayban 2006-02-24 15:12:20 UTC
Well if I knew where the broken pipe was happening at I might be able to do more debugging.

I wonder why this wont work...???
Comment 36 Angelo Naselli 2006-02-24 15:28:23 UTC
- > Well if I knew where the broken pipe was happening at I might be able to do more debugging.
That's why i'd like to re write the script, i cannot understand which is the command that fails
and breaks the pipe.

I wonder if a friend of mine is reading this thread by now :p 
Comment 37 Scott Grayban 2006-02-24 16:38:56 UTC
It's happening in the first pipe | $PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT $PPMTOY4M_OPT |

Comment 38 Angelo Naselli 2006-02-24 16:46:34 UTC
Ok let's see if it is my patch or not try to remove my patch and change the line with -S 420mpeg2 as 
below:
$PPMTOY4M_BIN -v $VERBOSE -n $NBFRAMETOTAL -F $IMAGES_SEC_FORMAT -S 420mpeg2 |

What happens?
Comment 39 Scott Grayban 2006-02-24 16:55:18 UTC
Same thing happens. Broken pipe. I think I'm getting close to the problem... I think.
Comment 40 Scott Grayban 2006-02-24 16:57:18 UTC
Ok its happening between the first pipe and second.

I'm not sure if the problem is the convert or not yet. But if I just use the first pipe the image does get converted without any problems. Of course no mpg is made but I'm doing this step-by-step here to track this down.
Comment 41 Scott Grayban 2006-02-24 17:01:02 UTC
Nope.... yuvscaler is working just fine... has to be the encoding part.

Images encoding (%) : 32      [1
   INFO: [yuvscaler] Frame number 27
FRAME
--DEBUG: [yuvscaler] Start of average
--DEBUG: [yuvscaler] Non-interlaced downscaling
--DEBUG: [yuvscaler] End of average
--DEBUG: [yuvscaler] Start of average
--DEBUG: [yuvscaler] Non-interlaced downscaling
--DEBUG: [yuvscaler] End of average
--DEBUG: [yuvscaler] Start of average
--DEBUG: [yuvscaler] Non-interlaced downscaling
--DEBUG: [yuvscaler] End of average
--DEBUG: [ppmtoy4m] Got PPM header:  768x576
--DEBUG: [ppmtoy4m] Reading rows
Images encoding (%) : 33      [1
Comment 42 Scott Grayban 2006-02-24 17:22:55 UTC
Yup its breaking at the end of each done just before the encoding pipe.

I have no idea how to fix this either.
Comment 43 Scott Grayban 2006-02-24 18:11:21 UTC
ok found out that *.tmp.m2v is never created -- seems the pipe for the encoder is broken?
Comment 44 Scott Grayban 2006-02-24 18:17:45 UTC
ahhhhhh I think I got it....

27485 Illegal instruction     | $MPEG2ENC_BIN -v $VERBOSE -n $VIDEO_TYPE_LETTER -b $BIT_RATE -V $BUFFER_SIZE -f $VIDEO_FORMAT_NUMBER -o "$TMPFILENAME.tmp.m2v"
Comment 45 Angelo Naselli 2006-02-24 18:57:56 UTC
it could be also because the pipe is broken (e.g input wrong means output not made)

Anyway go on you're doing what i couldn't yet :) Thanks
Comment 46 Scott Grayban 2006-02-24 19:44:36 UTC
$ mpeg2enc -v 2 -n n -f 0 -o move.tmp.m2v
   INFO: [mpeg2enc] SETTING EXTENDED MMX for MOTION!
   INFO: [mpeg2enc] SETTING SSE and MMX for TRANSFORM!
Illegal instruction


Solved... Must be a bad compile from mandriva ?
Comment 47 Angelo Naselli 2006-02-25 16:43:06 UTC
Bingo!
In my athlon machine i had the same problem not in the 
centrino one:
http://qa.mandriva.com/show_bug.cgi?id=18242

Is your CPU an Athlon?
Comment 48 Angelo Naselli 2006-03-11 23:13:36 UTC
It should be fixed in svn adding a "-S" option to images2mpg and from a dialog.
Note for Mandriva users and Athlon k7 CPU, please follow http://qa.mandriva.com/show_bug.cgi?id=18242
Comment 49 Giovanni Venturi 2006-03-12 13:08:21 UTC
Well you can't close the bug saying: "It should be fixed in svn adding..." because all KDE applications is in SVN. Where exactly? Trunk? Branch? What branch? If I have to add manually a "-S" than the bug is not fixed at all.
Comment 50 Angelo Naselli 2006-03-12 13:53:21 UTC
As it was for cvs, when i say svn i refer to trunk i've been more precise if different, 
Anyway if you think it's not fixed you can always re-opne it.
We could take this bug open forever otherwise. I needed to delete
it from my check-list by now.
Angelo
Comment 51 Giovanni Venturi 2006-03-12 14:20:58 UTC
Why don't you backport to 0.8 branch? So I can very if it's fixed or not.
Comment 52 Giovanni Venturi 2006-03-12 14:21:46 UTC
Why don't you backport to 0.8 branch? So I can verify if it's fixed or not. :)
Comment 53 Tom Albers 2006-03-12 20:23:10 UTC
giovanni, there is no branch for the kipi-plugins. fyi: kipi-plugins != digikam 
Comment 54 Giovanni Venturi 2006-03-12 20:37:37 UTC
I updated and recompiled lib-kipi but the bug is still there:

THE COMMAND LINE IS :

images2mpg --with-gui  -f DVD -n PAL -d 2 -t 2 -c 000 -T /tmp/kde-slacky/kipi-mpegencoderplugin-12860/ -M /usr/bin -I /usr/bin -w "/home/slacky/audio/track02.cdda.wav" -o "/home/slacky/output.mpg" -i  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5410.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5410.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5412.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5423.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5425.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5426.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5429.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5430.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5431.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5432.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5433.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5434.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5435.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5447.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5448.JPG"  "/home/slacky/Immagini/Galleria/2006/02-Febbraio2006/IMG_5449.JPG"  -----------------------------------------------
Initialising...

Encoding image files...

Images encoding (%) : 0      [0      
   INFO: [yuvscaler] yuvscaler 1.8.0 (15-02-2004) is a general scaling utility for yuv frames
   INFO: [yuvscaler] (C) 2001-2004 Xavier Biquard <xbiquard@free.fr>, yuvscaler -h for help, or man yuvscaler
Images encoding (%) : 0      [0      
**ERROR: [yuvscaler] Could'nt read YUV4MPEG header!
-----------------------------------------------

EXIT STATUS : error during encoding process.
Comment 55 Tom Albers 2006-03-12 20:41:26 UTC
libkipi != kipiplugins

what did you recompile?
Comment 56 Giovanni Venturi 2006-03-12 20:51:22 UTC
I get all the directory from:
http://websvn.kde.org/trunk/extragear/libs/

than also kipi-plugins
Comment 57 Angelo Naselli 2006-03-12 21:57:03 UTC
Giovanni now i've got it you meant digikam 0.8 didn't you?
Tom told you what i tried to tell you in private.

To test kipi-plugins from svn you cannot simply rebuild
kipi-plugins. Which is your distro/system? did you install them?
did you changed KDEDIRS and run kbuildsycoca if installed locally?

Did you try to run  images2mpg --help
You should have found also this option:
 -S <mode>   :  Set chroma subsampling mode. (default value depend on ppmtoy4m version)
                [444 - 4:4:4 (no subsampling)
                420jpeg - 4:2:0 JPEG/MPEG-1, interstitial cositing
                420mpeg2 - 4:2:0 MPEG-2, horizontal cositing]
Since ppmtoy4m has changed the default behavior (i believe -S was unused first),
that option helps to understand which ones your system can manage. 
Mine, for instance does't manage the default one 444, but old distro and version
manage default option well (e.g. no need to add -S option).

I added, moreover, into kipi plugin a combo box to insert your right value.
By now the default is "default" i.e. no parameters, for back compatibility, 
but we can change it.

I have to change the man page though yet.

Anyway test it again but it's fixed, i believe.  

Angelo
Comment 58 Angelo Naselli 2006-03-12 23:06:02 UTC
SVN commit 518042 by anaselli:

- Changed project URL  
- Added a note why I inserted '-S' opiton

CCBUG:109739

 M  +7 -5      images2mpg  


--- trunk/extragear/libs/kipi-plugins/mpegencoder/images2mpg #518041:518042
@@ -477,7 +477,7 @@
    -t <num>                    : enable transition between images with the speed [1=slow, 2, 4, 5, 10, 20=fast].
    -T <Temporary folder>       : use a specific folder for creating the temporary files (ex: '/tmp').
    -f <Video format>           : video format  [DVD, XVCD=default, SVCD, VCD].
-   -S <mode>                   :  Set chroma subsampling mode. (default value depend on ppmtoy4m version)
+   -S <mode>                   :  Set chroma subsampling mode. (default value depends on ppmtoy4m version)
                                   [444 - 4:4:4 (no subsampling)
                                    420jpeg - 4:2:0 JPEG/MPEG-1, interstitial cositing
                                    420mpeg2 - 4:2:0 MPEG-2, horizontal cositing]
@@ -503,10 +503,12 @@
 
   - The input images files with the '-i' option must be the last command line parameters.
   - If you use some whitespaces in the path folders/files, use '"' around the complete path string.
-
+  - With mjpegtools > 1.6.2 ppmtoy4m seems to have changed the default behavior for chroma subsampling 
+    mode so '-S' option is needed
+    
 Examples :
 
-#./images2mpg -f SVCD -d 15 -w Music.wav -o MyPortfolio.mpg -i 01.jpg 02.jpg 03.jpg 04.jpg
+#./images2mpg -f SVCD -d 15 -S 420mpeg2 -w Music.wav -o MyPortfolio.mpg -i 01.jpg 02.jpg 03.jpg 04.jpg
 
    Build PAL (default) SVCD MPEG file with the 'Music.wav' sound file and this image files sequence :
 
@@ -527,8 +529,8 @@
    CAULIER Gilles <caulier.gilles@free.fr>
 
 Visit :
-   URL PROJECT : http://digikam.sourceforge.net/ # PENDING(blackie) UPDATE URL
-   WEBCVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/digikam/digikamplugins/mpegencoder/ # PENDING(blackie) update URL
+   URL PROJECT : http://extragear.kde.org/apps/kipi
+   WEBSVN : http://websvn.kde.org/trunk/extragear/libs/kipi-plugins/mpegencoder
 
 EOF
       exit 0
Comment 59 Giovanni Venturi 2006-03-13 00:56:30 UTC
Yes, I changed Chroma mode in the combo box and it works, but I think an hints that suggest to change the value used in the combo box and repeat the encoding if it fails could be helpful... Also some UI changes can be more clear putting onto the combo box the text of the kind of value that the combo rappresents, just for more clear IMHO:

Video Format        Format Type         Chroma Mode
   DVD>                PAL>              420mpeg2>


Do you think I have to add a new bug? When I use this feature the first time Digikam tell me no ImageMagick found and disable the Encode button, if I exec again the "Create MPEG SlideShow" all is ok and I can encode. I've got ImageMagik 6.2.6.
Comment 60 Angelo Naselli 2006-03-13 09:36:36 UTC
>  but I think an hints that suggest to change the value used in the 
>  combo box and repeat the encoding if it fails could be helpful... 

I don't think it is, I mean how can you expect it to try all the 
options, moreover of all the programs it needs?
In the future we can think to add some configuration tools that
help in choosing default options, but maybe I'm dreaming :) 
>  Also some UI changes can be more clear putting onto the combo 
>  box the text of the kind of value that the combo rappresents, 
>  just for more clear IMHO:    
> 
> Video Format        Format Type         Chroma Mode
>    DVD>                PAL>              420mpeg2>

That could be, i wanted to fix the bug to move on such a static 
situation. 
I planned to review the ui that is statically created by now, but
I'm not the maintainer, so who knows?

> Do you think I have to add a new bug? When I use this feature the 
> first time Digikam tell me no ImageMagick found and disable the 
> Encode button, if I exec again the "Create MPEG SlideShow" 
> all is ok and I can encode. I've got ImageMagik 6.2.6.   

I've never seen such a behavior, but remember since kipi-plugins
*are not* digikam, and one more time *not digikam*, you can test them
also with other kde graphics and viewer applications. Have a look
at the kipi site for that.

Angelo
Comment 61 Angelo Naselli 2006-04-12 13:05:53 UTC
*** Bug 125413 has been marked as a duplicate of this bug. ***
Comment 62 Angelo Naselli 2006-07-19 12:37:00 UTC
*** Bug 125413 has been marked as a duplicate of this bug. ***
Comment 63 Michael Leiser 2006-08-06 18:04:11 UTC
I use jpeg-tools 1.8.0 and i had the same problem like entry one. 
Solution: Additional Comment #3.
It works :)

KDE 3.5.4
SuSE 10.1

Thanks to all

 
Comment 64 Joe Biden 2006-10-10 03:07:32 UTC
Comment #1 worked great for me. Thank you very much.
Comment 65 Angelo Naselli 2006-10-10 09:22:14 UTC
Guys, this bug has been closed! 
It's fixed even in current stable.
Comment 66 Angelo Naselli 2006-12-31 00:23:22 UTC
*** Bug 119940 has been marked as a duplicate of this bug. ***
Comment 67 caulier.gilles 2017-06-30 07:33:17 UTC
digiKam has a new Video Slideshow tool based on QtAV and ffmpeg which do not
have this problem.

Gilles Caulier