k9copy doesn't encode mpeg4

Bug #228001 reported by nobull
This bug report is a duplicate of:  Bug #180710: k9copy crashes towards end of film. Edit Remove
8
Affects Status Importance Assigned to Milestone
k9copy (Ubuntu)
New
Undecided
Unassigned

Bug Description

After backing up a DVD to the drive as an ISO file, an mpeg4 file cannot be created from the image file. It seems to have started after the Hardy release.

Revision history for this message
J. Kary (jkary-98) wrote :

Verified copying a dvd to hd and then trying to encode aborts with a zero length file.

Revision history for this message
J. Kary (jkary-98) wrote :

Running this from the command line gave the following output about half way through the encoding...

[Seek failed
]
[Seek failed
Seek failed
Seek failed
Seek failed
Seek failed
Seek failed
Seek failed
Seek failed
Seek failed
]
[Seek failed
Seek failed
Seek failed
]
[Audio format 0x10001 is incompatible with '-oac copy', please try '-oac pcm' instead or use '-fafmttag' to override it.
]

Revision history for this message
zac (zac-wheeler) wrote :

I'm having a similar issue, but it is when encoding to mp4 straight from DVD. The temp files appear to get about 160 MB and then disappear. In the end either the encoding hangs at ~96% or the encoding completes, but either way no .mp4 file is created.

I think it stems from this:
[Option lavfopts: Unknown suboption i_certify_that_my_video_stream_does_not_use_b_frames
Error parsing option on the command line: -lavfopts
]

Why mencoder decided to error out on a previously acceptable option is a bit of a stumper for me, but they decided to. This command line option is hard-coded in k9copy.

I commented out:
libk9copy/k9mp4enc.cpp:286: //*m_process << "-lavfopts" << "i_certify_that_my_video_stream_does_not_use_b_frames";
after reading the mplayer mailing list archives and compiled.

That doesn't seem to work either. Now the encoder complains about the possible issues surrounding the b frames and mplayer, which it previously would not allow me to specify a command line argument for.

I am also now getting a problem in my compiled version that seems to prevent it from working:
$ k9copy
QSettings: failed to open file '/etc/qt3/qt_plugins_3.3rc'
QComboBox::setCurrentItem: (cbInputDev) Index 0 out of range
KCrash: Application 'k9copy' crashing...
QSettings: failed to open file '/etc/qt3/qt_plugins_3.3rc'

So I'm not sure what I've got wrong there.

Revision history for this message
zac (zac-wheeler) wrote :

I think the underlying issue here is that k9copy doesn't provide the user with appropriate action-stopping errors and instead just posts some debug output and keeps on trucking.

From tweaking it a little more it seems that the default behavior when something is broken is just to keep trucking for 15 minutes and then fail silently, not creating the file. This is pretty unfortunate considering that k9copy knew 15 minutes earlier that nothing good would come of the encoding.

A better solution would be some dependency-checking on encoding options and sane error messages. Couple that with avoiding hard-coding command line options to other executables and this problem would be much more solvable.

Revision history for this message
Kzin (wmkzin) wrote :

I think this duplicate status may be wrong; #180710 seems to be about the incomplete nature of the output file.

As the initial bug report is a little vague, I am judging by zac's comments as to what this bug report is about. Can we change the scope somewhat to what zac is writing? It is true that the -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames is no longer necessary, and in fact stops encoding altogether. Its not that you will get an incomplete file, you will get no file at all - none is created. By starting k9copy manually you can see the errors as they happen and this becomes evident.
The actual GUI trundles through the process, even being so bold to report 100% completion on occasion, but the file is never created.
I am using k9copy version 2.0.2, as it comes down for Ubuntu's Intrepid Ibex.
I actually can get a complete file if I start it manually then copy the debug output and remove the -lavfopts line.
IE:
k9play --play --endsector 1897294 --inject /tmp/kde-kzin/k9copy/k9ve14451.tmp --input '/home/kzin/TestDVD.ISO' --dvdtitle 1 --chapterlist 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48 --initstatus --audiofilter 1,2,3,4 --usecache | mencoder /dev/stdin -passlogfile /tmp/kde-kzin/k9copy/k9vk14451.tmp -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=2500 -vf scale=480:-2 -ffourcc DIVX -af volume=7 -oac faac -faacopts br=160 -o '/home/kzin/Videos/TestDVD.mp4' -of lavf

Gives me a complete mp4 output.

zac, can you try setting the options to blank instead of commenting it out completely? (Hack/Workaround)
libk9copy/k9mp4enc.cpp:286: *m_process << " " << " ";

Revision history for this message
zac (zac-wheeler) wrote : Re: [Bug 228001] Re: k9copy doesn't encode mpeg4

On Thu, Oct 9, 2008 at 10:17 PM, Kzin <email address hidden> wrote:
> *** This bug is a duplicate of bug 180710 ***
> https://bugs.launchpad.net/bugs/180710
>
> I think this duplicate status may be wrong; #180710 seems to be about
> the incomplete nature of the output file.
>
> As the initial bug report is a little vague, I am judging by zac's comments as to what this bug report is about. Can we change the scope somewhat to what zac is writing? It is true that the -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames is no longer necessary, and in fact stops encoding altogether. Its not that you will get an incomplete file, you will get no file at all - none is created. By starting k9copy manually you can see the errors as they happen and this becomes evident.
> The actual GUI trundles through the process, even being so bold to report 100% completion on occasion, but the file is never created.
> I am using k9copy version 2.0.2, as it comes down for Ubuntu's Intrepid Ibex.
> I actually can get a complete file if I start it manually then copy the debug output and remove the -lavfopts line.
> IE:
> k9play --play --endsector 1897294 --inject /tmp/kde-kzin/k9copy/k9ve14451.tmp --input '/home/kzin/TestDVD.ISO' --dvdtitle 1 --chapterlist 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48 --initstatus --audiofilter 1,2,3,4 --usecache | mencoder /dev/stdin -passlogfile /tmp/kde-kzin/k9copy/k9vk14451.tmp -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=2500 -vf scale=480:-2 -ffourcc DIVX -af volume=7 -oac faac -faacopts br=160 -o '/home/kzin/Videos/TestDVD.mp4' -of lavf
>
> Gives me a complete mp4 output.
>
> zac, can you try setting the options to blank instead of commenting it out completely? (Hack/Workaround)
> libk9copy/k9mp4enc.cpp:286: *m_process << " " << " ";
>

Thanks for the follow-on investigation Kzin. You are correct - I am
looking at the temp files when I speak about 160MB files, not the
final output file, which is never created.

I will give the code modification a shot when I get some time at home.
It will probably be a week or so.

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.