Bug 383011 - k3b cannot create DVD video image
Summary: k3b cannot create DVD video image
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: Video DVD (show other bugs)
Version: 17.04.3
Platform: OpenSUSE Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: k3b developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-01 17:08 UTC by Erwin Lam
Modified: 2017-08-21 16:26 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Lam 2017-08-01 17:08:19 UTC
The following is a copy from "https://bugzilla.opensuse.org/show_bug.cgi?id=1051338".


When trying to create a video DVD image, k3b issues the following error messages:

    The project does not contain all necessary video DVD files.
    The resulting DVD will most likely not be playable on a Hifi DVD player.
    Could not determine size of resulting image file.

Note that this happens with the original k3b version coming with Leap 42.3, the packman version, as well as the version from KDE Applications.

Reproducible: Always

Steps to Reproduce:
1. Select a directory that contains all necessary files for a DVD video.
2. Start k3b and tell it to only create an image from these files.

It doesn'matter which video directories you choose, it happens with all of them.

Actual Results:  
The following is the debugging information produced by k3b:

Devices
-----------------------
Optiarc DVD RW AD-7173S 1-02 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RAM, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW] [SAO, TAO, RAW, SAO/R96R, RAW/R96R, Restricted Overwrite, Layer Jump] [%7]

K3b::IsoImager
-----------------------
mkisofs print size result: 0 (0 bytes)

System
-----------------------
K3b Version: 17.4.3
KDE Version: 5.32.0
Qt Version:  5.9.1
Kernel:      4.4.76-1-default

Used versions
-----------------------
mkisofs: 1.1.11

mkisofs
-----------------------
Warning: -follow-links does not always work correctly; be careful.
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage 1.1.11 (Linux)
Scanning k3bVideoDvdyTjqwI
Scanning k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI
Scanning k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS
Scanning /home/erwin/.local/share/k3b/temp/10d5726f64000150131730200000029590021_0/dummydir_0/
/usr/bin/genisoimage: Could not find correct 'VIDEO_TS' directory.
Possible reasons:
  - VIDEO_TS subdirectory was not found on specified location
  - VIDEO_TS has invalid contents

mkisofs calculate size command:
-----------------------
/usr/bin/genisoimage -gui -graft-points -print-size -quiet -volid K3b data project -volset  -appid K3B THE CD KREATOR (C) 1998-2010 SEBASTIAN TRUEG AND MICHAL MALEK -publisher  -preparer  -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/k3b.FV4364 -no-cache-inodes -udf -iso-level 1 -path-list /tmp/k3b.sc4364 -verbose -verbose -dvd-video -f k3bVideoDvdyTjqwI


I tried to use strace to see what happened. This is what I found:

mkdir("k3bVideoDvdyTjqwI", 0700)        = 0
mkdir("k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI", 0777) = 0
stat("k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
mkdir("k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS", 0777) = 0
symlink("/home/erwin/ZZZZZZ/VIDEO_TS.BUP", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VIDEO_TS.BUP") = 0
symlink("/home/erwin/ZZZZZZ/VIDEO_TS.IFO", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VIDEO_TS.IFO") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_0.BUP", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_0.BUP") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_0.IFO", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_0.IFO") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_1.VOB", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_1.VOB") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_2.VOB", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_2.VOB") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_3.VOB", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_3.VOB") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_4.VOB", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_4.VOB") = 0
symlink("/home/erwin/ZZZZZZ/VTS_01_5.VOB", "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/VTS_01_5.VOB") = 0

Apparently, k3b creates directory "k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS" and in this directory symlinks are created to the real video files.

I created these directories and the symlinks manually to see what happened with the genisoimage command (mkisofs is just a symlink to genisoimage):

erwin@frodo:~> ls -l k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/
total 0
lrwxrwxrwx 1 erwin users 31 29 jul 10:38 VIDEO_TS.BUP -> /home/erwin/ZZZZZZ/VIDEO_TS.BUP
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VIDEO_TS.IFO -> /home/erwin/ZZZZZZ/VIDEO_TS.IFO
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_0.BUP -> /home/erwin/ZZZZZZ/VTS_01_0.BUP
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_0.IFO -> /home/erwin/ZZZZZZ/VTS_01_0.IFO
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_1.VOB -> /home/erwin/ZZZZZZ/VTS_01_1.VOB
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_2.VOB -> /home/erwin/ZZZZZZ/VTS_01_2.VOB
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_3.VOB -> /home/erwin/ZZZZZZ/VTS_01_3.VOB
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_4.VOB -> /home/erwin/ZZZZZZ/VTS_01_4.VOB
lrwxrwxrwx 1 erwin users 31 29 jul 10:39 VTS_01_5.VOB -> /home/erwin/ZZZZZZ/VTS_01_5.VOB

If I run the genisoimage command as follows (some unnecessary parameters have been removed for clarity)

/usr/bin/genisoimage -udf -iso-level 1 -verbose -dvd-video -o /tmp/k3b.iso -f k3bVideoDvdyTjqwI

it results in the following error

Warning: -follow-links does not always work correctly; be careful.
I: -input-charset not specified, using utf-8 (detected in locale settings)
genisoimage 1.1.11 (Linux)
Scanning k3bVideoDvdyTjqwI
Scanning k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI
Scanning k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS
/usr/bin/genisoimage: Could not find correct 'VIDEO_TS' directory.
/usr/bin/genisoimage: Unable to make a DVD-Video image.
Possible reasons:
  - VIDEO_TS subdirectory was not found on specified location
  - VIDEO_TS has invalid contents

Thus, with this command, genisoimage cannot find the VIDEO_TS directory.

However, with the following genisoimage command (note the difference in the input directory)

/usr/bin/genisoimage -udf -iso-level 1 -verbose -dvd-video -o /tmp/k3b.iso -f k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI

an image is created as expected.

It seems that either k3b creates an incorrect directory structure,
"k3bVideoDvdyTjqwI/k3bVideoDvdyTjqwI/VIDEO_TS/" in stead of "k3bVideoDvdyTjqwI/VIDEO_TS/", or it is giving incorrect directory information to genisoimage.
Comment 1 Leslie Zhai 2017-08-02 04:53:01 UTC
Hi Erwin,

Please review my patch https://git.reviewboard.kde.org/r/130212/

Regards,
Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/
Comment 2 Leslie Zhai 2017-08-02 08:23:46 UTC
(In reply to Leslie Zhai from comment #1)
> Hi Erwin,
> 
> Please review my patch https://git.reviewboard.kde.org/r/130212/
> 
> Regards,
> Leslie Zhai - a LLVM developer https://reviews.llvm.org/p/xiangzhai/

please review https://phabricator.kde.org/D7063
Comment 3 Erwin Lam 2017-08-02 15:49:37 UTC
Hello Leslie,

Please, do not ask me to review a patch as I don't have the skills to review C++ source code.

Regards,
Erwin Lam
Comment 4 Don Campbell 2017-08-02 21:13:50 UTC
The same failure to make a Video DVD is exhibited in k3b Version 17.4.1 from the Fedora 26 rpm repositories. As Erwin found, I also could use the command line with either  mkisofs or genisoimage and create the iso. This of course lends support to the idea that k3b is failing to use the proper path to make the image.

The initial error messages in Fedora are basically as stated by Erwin. The problem exists when running k3b in Fedora 26 under gnome or under KDE.
Comment 5 Leslie Zhai 2017-08-03 01:24:36 UTC
Hi Don,

Could you test the patch https://phabricator.kde.org/D7063 thanks!

Regards,
Leslie Zhai
Comment 6 Erwin Lam 2017-08-03 18:29:55 UTC
Hello Leslie,

Wolfgang Bauer was so kind to create a new k3b package for openSUSE leap 42.3 with your patch applied. k3b works fine again with your patch.
Comment 7 Leslie Zhai 2017-08-04 01:11:44 UTC
(In reply to Erwin Lam from comment #6)
> Hello Leslie,
> 
> Wolfgang Bauer was so kind to create a new k3b package for openSUSE leap
> 42.3 with your patch applied. k3b works fine again with your patch.

my sincere thanks goes to Wolfgang, and also thanks for your test, just waiting for the reviewer https://phabricator.kde.org/D7063
Comment 8 Don Campbell 2017-08-04 22:08:32 UTC
(In reply to Leslie Zhai from comment #5)
> Hi Don,
> 
> Could you test the patch https://phabricator.kde.org/D7063 thanks!
> 
> Regards,
> Leslie Zhai

Hi Leslie,

I am not a Linux developer. Your link doesn't give me enough to go on to create a patched version of k3b for me to test under Fedora 26. I would be glad to test a patched version if someone wants to provide it. 

Don
Comment 9 Leslie Zhai 2017-08-07 01:51:10 UTC
(In reply to Don Campbell from comment #8)
> (In reply to Leslie Zhai from comment #5)
> > Hi Don,
> > 
> > Could you test the patch https://phabricator.kde.org/D7063 thanks!
> > 
> > Regards,
> > Leslie Zhai
> 
> Hi Leslie,
> 
> I am not a Linux developer. Your link doesn't give me enough to go on to
> create a patched version of k3b for me to test under Fedora 26. I would be
> glad to test a patched version if someone wants to provide it. 
> 
> Don

the patch https://phabricator.kde.org/file/data/k542q6wih4c2z6q7oejy/PHID-FILE-qmrjkwrvzj424jz2gwrn/D7063.diff is for k3b git master.
Comment 10 Patrick Silva 2017-08-11 00:29:52 UTC
What is the status of this bug?
17.08 release is near and this fix is important.
Comment 11 Leslie Zhai 2017-08-11 01:19:31 UTC
Git commit d2679715487c2254ed5a55b20aa21ea0b36421f0 by Leslie Zhai.
Committed on 11/08/2017 at 01:17.
Pushed by lesliezhai into branch 'master'.

Fix cannot create DVD video image issue.

Reviewers: aacid, anthonyfieroni, sitter

Reviewed By: sitter

Subscribers: KDE Applications

Differential Revision: https://phabricator.kde.org/D7063

M  +21   -14   libk3b/projects/videodvd/k3bvideodvdimager.cpp

https://commits.kde.org/k3b/d2679715487c2254ed5a55b20aa21ea0b36421f0
Comment 12 Patrick Silva 2017-08-19 13:59:05 UTC
this problem is still happening on k3b 17.08.
Comment 13 Wolfgang Bauer 2017-08-21 15:52:24 UTC
(In reply to Dr. Chapatin from comment #12)
> this problem is still happening on k3b 17.08.

Yes, because the fix has only been submitted to the master branch so far (after 17.08 was branched), so it is not included in 17.08.0 and will only be in 17.12.0.
Comment 14 Patrick Silva 2017-08-21 16:26:22 UTC
(In reply to Wolfgang Bauer from comment #13)
> (In reply to Dr. Chapatin from comment #12)
> > this problem is still happening on k3b 17.08.
> so it is not included in 17.08.0 and will only
> be in 17.12.0.

Wait 4 mounths for this fix is horrible.
Thank you anyway.