Bug 154363 - Encoding MPEG file error
Summary: Encoding MPEG file error
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-VideoSlideshow (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-20 08:03 UTC by Michael C. Vergallen
Modified: 2017-06-30 07:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael C. Vergallen 2007-12-20 08:03:59 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages

images2mpg --with-gui  -f DVD -n PAL -d 8 -t 4 -c 0945f9 -T /tmp/kde-mvergall/kipi-mpegencoderplugin-6030/ -M /usr/bin -I /usr/bin -w "/home/mvergall/usa-new.mp3" -o "/home/mvergall/usa.mpg" -i  "/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060002.jpg"  "/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060003.jpg"
...

Images encoding (%) : 99      [912      
Images encoding (%) : 99      [912      
913      

Encoding audio file...

cat: 
-----------------------------------------------

EXIT STATUS : error during encoding process.

What is the problem here this is the third time this happened .... when I generate the mpg without audio it works.
Comment 1 Angelo Naselli 2007-12-20 09:52:44 UTC
hmm, -w "/home/mvergall/usa-new.mp3" i believe... can you try the same command
line but with -a "/home/mvergall/usa-new.mp3" please?
Comment 2 Michael C. Vergallen 2007-12-20 10:09:26 UTC
Yes but would mean not using digikam  ? that is what I was using to generate the mpg file. because there are 912 pictures in the slideshow...

Michael
Comment 3 Angelo Naselli 2007-12-20 10:36:14 UTC
> Yes but would mean not using digikam  ? 
> that is what I was using to generate the mpg file. because there are 912 pictures in the slideshow... 

Please it's a test to understand the problem, you can try with a jpg alone after being sure
it fails as well.
Comment 4 Michael C. Vergallen 2007-12-20 10:56:09 UTC
ok no problem ... I didn't understand your request that's all.
Comment 5 Michael C. Vergallen 2007-12-20 11:06:56 UTC
mvergall@ws-2:~$ vi ./bugs.sh
mvergall@ws-2:~$ sh ./bugs.sh
------------------------------------------------

Number of image file(s)       :  3.
Processing sequence :
/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060002.jpg
/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060003.jpg
/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060004.jpg
Video format                  : 'DVD'.
Video type                    : 'PAL'.
MPEG audio file               : '/home/mvergall/usa-new.mp3'.
Frames per second             : '25'.
Image duration                :  8 s.
Total video sequence duration :  28 s .
Transition frames             :  25.
Total frames processing       :  700.
Background image file         : '1198144501.black.tmp.png'.
Verbosity                     : 'none'.

------------------------------------------------
Encoding 3 image(s) MPEG sequence with ImageMagick and MjpegTools.

   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
Frame Num. 700 / 700
MPEG encoding terminated [700 frames - Encoding time : 182 s].

Merging MPEG flux with MjpegTools.
**ERROR: [mplex] File /home/mvergall/usa-new.mp3 unrecogniseable!
**ERROR: [mplex] Unrecogniseable file(s)... exiting.

The video MPEG output file is '/home/mvergall/usa.mpg'.
Removing temporary files...
------
 
This is the output I get now...the mp3 file works fine with rythembox and other
mp3 playing software. It is music I created with audacity.
 
Comment 6 Angelo Naselli 2007-12-20 11:17:13 UTC
> mvergall ws-2:~$ vi ./bugs.sh
> mvergall ws-2:~$ sh ./bugs.sh


> Merging MPEG flux with MjpegTools.
> **ERROR: [mplex] File /home/mvergall/usa-new.mp3 unrecogniseable!
> **ERROR: [mplex] Unrecogniseable file(s)... exiting.

Sorry which is the test you made? 
have you used -a option and failed? or just test with -w?
Comment 7 Michael C. Vergallen 2007-12-20 11:29:22 UTC
Angelo Naselli wrote:
[bugs.kde.org quoted mail]
Sorry forgot to add the script :
#!/bin/sh
/usr/bin/images2mpg -f DVD -n PAL -d 8 -t 4 -c 0945f9 -M /usr/bin -I 
/usr/bin -a "/home/mvergall/usa-new.mp3" -o "/home/mvergall/usa.mpg" -i  
"/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060002.jpg"  
"/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060003.jpg"  
"/home/mvergall/Pictures/amerika 5 mei - 28 mei 2007/p5060004.jpg"
Comment 8 Angelo Naselli 2007-12-20 11:38:28 UTC
> /usr/bin -a "/home/mvergall/usa-new.mp3" -o "/home/mvergall/usa.mpg" -i  

Ok it wasn't the case i figured out :/
Comment 9 Arnd Baecker 2007-12-20 11:57:30 UTC
Hi Michael,

would it be possible to modify bugs.sh so that
  mplex -v 3 ....
is used to increase the level of verbosity to verbose/debug?

If you want to shorten the time for the testing, you might
just try out with a small number of images.

Sounds like a problem/bug of mplex.
Maybe re-encoding the sound file to a different format (ogg ?)
would be a work-around?

Most importantly: note, that Angelo asked you something different,
see his first comment #c1, so maybe that should be tested first.

Best, Arnd
Comment 10 Michael C. Vergallen 2007-12-20 12:40:03 UTC
Arnd Baecker wrote:
[bugs.kde.org quoted mail]
Yep will try to do that in  a bit. and report the results.
> If you want to shorten the time for the testing, you might
> just try out with a small number of images.
>   

Yep did that in bug.sh
> Sounds like a problem/bug of mplex.
> Maybe re-encoding the sound file to a different format (ogg ?)
> would be a work-around?
>   

can give that a test after I've run the other test you requested.
> Most importantly: note, that Angelo asked you something different,
> see his first comment #c1, so maybe that should be tested first.
>
>   

Did  test that and that was not the problem ...that's when I discovered
that mplex is causing some problem ...what the problem is I don't know yet.
Comment 11 Michael C. Vergallen 2007-12-20 13:01:49 UTC
It turns out that I can't get mplex to -v 3 due to the fact that images2mpg doesn't support verbosity level 3. Now I'll test with a .ogg file and see what happens...to me however it is starting to look like mplex is at fault for some reason. will report back when I've tested the .ogg file.

Michael 
Comment 12 Angelo Naselli 2007-12-20 15:00:25 UTC
> It turns out that I can't get mplex to -v 3 

hmm can you try -v 2, that one should go i believe
Comment 13 Arnd Baecker 2007-12-20 15:48:01 UTC
If that does not provide enough output, you could just copy 
images2mpg to your home directory, edit the corresponding place in the script
and run it via ./images2mpg
(For the edit: just add VERBOSE_=3, and replace the two lines with
$MPLEX_BIN -v $VERBOSE by $MPLEX_BIN -v $VERBOSE_)
Comment 14 Michael C. Vergallen 2007-12-20 16:46:27 UTC
Arnd Baecker wrote:
[bugs.kde.org quoted mail]
cheers that's what I needed to do !  I was looking for a way to do this 
but could not find it ... will do straight away.
tried to create a .mpg using .ogg as sound source. it worked ok and 
created the test .mpg  fine but when
playing back the .mpg file the audio played back ok but then the video 
output did not. So now I'll
do what you asked here...
Comment 15 Michael C. Vergallen 2007-12-20 17:39:50 UTC
Eh ... mplex 1.8.0 only has the max verbose level 2 will try with -v 2 and see what's up.
Comment 16 Michael C. Vergallen 2007-12-20 17:50:12 UTC
That is the required part of the trace I got :
--DEBUG: [mpeg2enc] Frame P A= 15222 974208.00: I =  54276 P =  3407 B =   nan
   INFO: [mpeg2enc] Frame   695   695 P q=8.00 sum act=38264.24732
--DEBUG: [mpeg2enc] Start 696 P 6 696
--DEBUG: [mpeg2enc] Frame P T=51856 A=897547  Xi=3382723.07 Xp=1022508.35 Xb=0.00
--DEBUG: [mpeg2enc] Frame P A= 14510 928640.00: I =  54276 P =  3424 B =   nan
   INFO: [mpeg2enc] Frame   696   696 P q=8.00 sum act=38293.02071
--DEBUG: [ppmtoy4m] Got PPM header:  768x576
--DEBUG: [ppmtoy4m] Reading rows
--DEBUG: [ppmtoy4m] Done.
   INFO: [yuvscaler] Frame number 699
--DEBUG: [yuvscaler] Start of average_specific 1
--DEBUG: [yuvscaler] Non interlaced and/or interlaced treatment
--DEBUG: [yuvscaler] End of average_specific
--DEBUG: [yuvscaler] Start of average_specific 1
--DEBUG: [yuvscaler] Non interlaced and/or interlaced treatment
--DEBUG: [yuvscaler] End of average_specific
--DEBUG: [yuvscaler] Start of average_specific 1
--DEBUG: [yuvscaler] Non interlaced and/or interlaced treatment
--DEBUG: [yuvscaler] End of average_specific
   INFO: [yuvscaler] End of stream!
   INFO: [yuvscaler] Normal exit: end of stream with frame number 700!
--DEBUG: [mpeg2enc] End of input stream detected
   INFO: [mpeg2enc] Signaling last frame = 699
--DEBUG: [mpeg2enc] Start 697 P 7 697
--DEBUG: [mpeg2enc] Frame P T=49848 A=864486  Xi=3382723.07 Xp=1012078.54 Xb=0.00
--DEBUG: [mpeg2enc] Frame P A= 14872 951808.00: I =  54276 P =  3441 B =   nan
   INFO: [mpeg2enc] Frame   697   697 P q=8.00 sum act=38317.93786
--DEBUG: [mpeg2enc] Start 698 P 8 698
--DEBUG: [mpeg2enc] Frame P T=47880 A=831424  Xi=3382723.07 Xp=1005381.81 Xb=0.00
--DEBUG: [mpeg2enc] Frame P A=  9666 618624.00: I =  54276 P =  3451 B =   nan
   INFO: [mpeg2enc] Frame   698   698 P q=8.00 sum act=38565.93786
--DEBUG: [mpeg2enc] Start 699 P 9 699
--DEBUG: [mpeg2enc] Frame P T=45582 A=798363  Xi=3382723.07 Xp=962408.72 Xb=0.00
--DEBUG: [mpeg2enc] Frame P A=   341 21824.00: I =  54276 P =  3446 B =   nan
   INFO: [mpeg2enc] Frame   699   699 P q=8.00 sum act=38577.93786
   INFO: [mpeg2enc] Sequence end inserted
   INFO: [mpeg2enc] Guesstimated final muxed size = 4801936

   INFO: [mplex] mplex version 1.8.0 (2.2.4 $Date: 2005/08/28 17:50:54 $)
**ERROR: [mplex] File /home/mvergall/usa-new.mp3 unrecogniseable!
   INFO: [mplex] File 1198168614.tmp.m2v looks like an MPEG Video stream.
**ERROR: [mplex] Unrecogniseable file(s)... exiting.
mvergall@ws-2:~$

that is all the program gave me.
Comment 17 Arnd Baecker 2007-12-20 18:26:56 UTC
Should mplex be able to deal with mp3 at all?
man mplex gives: 
"""Mplex is a general-purpose audio/video multiplexer  for     MPEG-1/MPEG-2.
   It accepts one or more MPEG-1/2 video stream, MPEG layer I/II/III, DTS,
   AC3 and LPCM audio streams and multiplexes them into  a  combined
   program/system  stream  according to the constraints specified."""

No mention of mp3?  Just wondering if this is relevant.
Comment 18 Angelo Naselli 2007-12-21 10:32:42 UTC
> No mention of mp3?  Just wondering if this is relevant.

mhmm don't know reaaly, sure i've found some mp3 that don't work..
There should be somewhere a tool called mp3check (i can't find it now here)
that should check mp3 integrity... maybe a check could say more...
>    It accepts one or more MPEG-1/2 video stream, MPEG layer I/II/III, DTS,

Doesn't MPEG layer III mean mp3 anyway? or am i wrong?
Comment 19 Arnd Baecker 2007-12-21 16:00:56 UTC
Angelo, of course you are right  - sorry, need a holiday it seems ;-)

To check mp3 inegrity: maybe checkmp3 ? (on debian: 'aptitude install checkmp3')
Comment 20 caulier.gilles 2017-06-30 07:32:45 UTC
digiKam has a new Video Slideshow tool based on QtAV and ffmpeg which do not
have this problem.

Gilles Caulier