After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 113480 - Write DVDs without using temporary ISO image
Write DVDs without using temporary ISO image
Status: RESOLVED FIXED
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
2.14.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
: 121202 131739 159983 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-05-21 22:28 UTC by Diego González
Modified: 2006-05-09 21:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added file (15.73 KB, patch)
2006-02-28 19:27 UTC, Fabio Bonelli
none Details | Review
Header file (2.22 KB, patch)
2006-02-28 19:27 UTC, Fabio Bonelli
none Details | Review
Patch (25.89 KB, patch)
2006-02-28 19:28 UTC, Fabio Bonelli
none Details | Review
Patch without on-the-fly configurability (27.35 KB, patch)
2006-03-01 15:16 UTC, Fabio Bonelli
none Details | Review
ncb-no-iso-dvd-burning.patch (47.40 KB, patch)
2006-03-02 20:22 UTC, Bastien Nocera
none Details | Review
ncb-no-iso-dvd-burning-2.patch (48.16 KB, patch)
2006-03-02 22:27 UTC, Bastien Nocera
none Details | Review
New patch (28.06 KB, patch)
2006-03-03 15:49 UTC, Fabio Bonelli
none Details | Review
Patch with new files included (46.83 KB, patch)
2006-03-03 17:48 UTC, Fabio Bonelli
rejected Details | Review

Description Diego González 2003-05-21 22:28:17 UTC
nautilus cd burner always creates an iso image on disk, even when it is
going to write to a CD, xcdroast doesn't create such an image, with this
command line it's not needed to create the iso image on disk:

mkisofs -JRlL -V etiqueta_cd /dir/dir /dir2/archivo.ext | cdrecord -v
-dev=/dev/hdc driveropts=burnfree fs=16m -overburn -

maybe the vfs method should use something like this instead of write the
iso image.
Comment 1 Alexander Larsson 2003-05-22 06:56:52 UTC
n-c-b doesn't do this because there is a risk of queue underflow which
would ruin the burn. This is especially risky for n-c-b since cdrecord
isn't run as root, so it can't use real-time priority.
Comment 2 Diego González 2003-05-27 11:53:43 UTC
what about some hidden key en gconfd to enable such support for users
that know how to do the setuid root magic?
Comment 3 Žygimantas Augilius 2003-07-18 16:05:59 UTC
this feature would be useful in case someone is burning movie, which
is single file of CD size. Making ISO in this case takes much time,
and HDD space :-(
Comment 4 Egle K. 2003-08-15 23:52:32 UTC
I think this bug should be reopened.
With most modern computers there are no need to create .iso image,
because now even desktop systems have 128 RAM and more, fast disk
drives and CPU and also there is driveropts=burnproof option
implemented in cdrecord to support Buffer  Underrun Proof  writing
with drives that use the Sanyo BURN-Proof technology. I think at least
Gconf key "create_iso", enabled by default on all CD-RW drives, which
don't supports BURN-Proof technology should be added to
nautilus-cd-burner.

Reporter, can you reopen this bug ?
Comment 5 Mantas Kriaučiūnas 2003-12-27 18:31:03 UTC
I again meet with problems when tried to write DVD+RW with n-c-b.
Creating 4.5 GB iso image wastes a lot of time and computer resources
and because of this sometimes people can't burn DVD with n-c-b at all
(not in every system there are 9 free space - 4.5 for files and 4.5
for DVD image). Lots of people are burning CD's without temporary image.

I don't say - make burning without temporary image default, I say -
please, make a posibility to burn (at least DVD+/-RW discs, because
with rewritable media you can always repeat burning) without making
temporary iso image. As I said in previous comments- I'm always
recording DVD+/-RW (and CD-RW too) as a user, not as a root, and have
no problems at all (files on DVD+RW disc and files in my hdd are
always identifical after writing).

What do you think of a question "Do you want to burn
CD without temporary CD image ?" (maybe with warning - "this can
result improperly recorded CD") instead an error message "Not enough
space to store CD image (xxx Megabytes needed)" ?

Do you think this solution is bad ? Maybe I should report another bug
about this?
Comment 6 Bastien Nocera 2004-01-16 23:39:17 UTC
*** Bug 131739 has been marked as a duplicate of this bug. ***
Comment 7 Bastien Nocera 2004-01-16 23:40:00 UTC
*** Bug 121202 has been marked as a duplicate of this bug. ***
Comment 8 dmoisset 2004-03-18 14:15:55 UTC
I propose the following solution:

1) n-c-b tries to work as it does now, writing a CD image before burning
2) In case of failure the "Not enough space" dialog is open
3) The dialog has now the new text "You can't try to record directly
to the CD without premaking an image. However, if your data is in a
slow drive or your sstem is too loaded, it may result in an improperly
recorded CD" added to it.
4) A button "Burn CD without image" is added to the dialog. This also
is according to the HIG recommendations: «Error messages should use
simple language, clearly state the problem, and provide solutions or
tell the user how to get out of the current situation if possible.»
and «You may also provide buttons to perform alternate actions that
provide another possible solution, fix potential problems, or launch
related dialogs or programs.»

This should work no worse than the current situation: it uses a
premade image if possible to minimize the risk of data loss, and if
not possible, allows the user to do something else instead of just
saying "I can't do it, no luck".
Comment 9 Alexander Larsson 2004-03-19 08:23:19 UTC
That sounds like a reasonable approach. Maybe we should not just check
that it fits, but that the iso file fits, and there is a reasonable
amount of free space left after that. (Since having a full disk can
cause problems.)
Comment 10 Mantas Kriaučiūnas 2004-04-10 15:50:17 UTC
Yes, I think there should be left at least 50-100 MB of free space, because
temporary files (created during web browsing or something) pretty quickly fill
in 50 or more megabytes.
Btw, I suggest always to write DVD+RW and DVD-RW disks without creating .iso
image, because:
1. with DVD+/-RW writing technology "buffer underrun protection gets engaged, so
that you don't have to worry about how much extra load your system can sustain
during the burning process" (look at http://fy.chalmers.se/~appro/linux/DVD+RW/-RW/)
2. Creating of 4.5 GB iso image takes about ~10-20 minutes and higly loads the
operating system. Writing this image to DVD+/-RW takes almost the same time, so
writing with iso creation doubles action time and couses a lot of system load :(
Comment 11 Gabor Farkas 2004-05-31 18:43:25 UTC
i think there still should be a way to burn the cd/dvd without creating an iso
file... at least a gconf key...

with the hardware of today, there is no need to create a temp. iso file. most of
the currently used cd/dvd burners employ buffer-underrun-protections, so it's as
safe to burn with an iso as without.

imho not much 'advanced' users will use n-c-b if they cannot skip the iso
creation. yes, i know this program is for simple tasks, but the most of times i
also only want to burn some avis or oggs or jpegs to a cd/dvd. so n-c-b would be
perfectly fine. except, that it takes a loooooooooong time to create a 4.3MB
image file on the disk

so, can we have that gconf key? :)
Comment 12 Gabor Farkas 2004-07-24 15:02:45 UTC
hmmm...my conversation with the program creator basically ended with
send-a-patch-or-shut-up :), so i checked the source code (i thought that maybe i
could create a patch for this).

and it seems that my C/gtk/gnome knowledge is not enough to create an optional
gconf switch...the problem is that you have to implement this separately for
cdrecord and for growisofs. 
with the current architecture it's pretty simple. there's a function that
creates an iso file from everything in burn:///,
and later you use the iso filename as a param for cdrecord/growisofs.

but in the case of doing it without a temp-file, one would have to implement the
 piping/streaming/whatever, and i have no idea how to do that in the
gnome/gtk/glib world ;) (not to mention that you need to keep-alive the gui ;)
Comment 13 Bastien Nocera 2004-07-29 20:03:53 UTC
Short term, having writing without the preliminary creation of an ISO image is
planned for the DVD/growisofs part. As growisofs is essentially a clever "dd",
and a front-end to mkisofs, it would be possible to make it write DVDs directly,
as it is not prone to the same problems writing a CD on the fly would be.

No changes for CDs (although people might want to copy themselves on bug 135985,
where we should be able to warn users long before writing the ISO, whether or
not the data will fit on the CD).
Comment 14 Bastien Nocera 2004-11-30 16:21:30 UTC
*** Bug 159983 has been marked as a duplicate of this bug. ***
Comment 15 Fabio Bonelli 2006-02-28 19:27:12 UTC
Created attachment 60345 [details] [review]
Added file

This bug precludes me from using n-c-b when it comes to DVD writing.
Attaching the patch.
Comment 16 Fabio Bonelli 2006-02-28 19:27:54 UTC
Created attachment 60346 [details] [review]
Header file
Comment 17 Fabio Bonelli 2006-02-28 19:28:57 UTC
Created attachment 60347 [details] [review]
Patch
Comment 18 Bastien Nocera 2006-02-28 19:55:12 UTC
Good work Fabio.
On-the-fly DVD writing should be enabled all the time, see comment #13.
What's happening with the old mkisofs wrapping code as well?
Comment 19 Fabio Bonelli 2006-03-01 15:16:20 UTC
Created attachment 60407 [details] [review]
Patch without on-the-fly configurability

Thank you, Bastien.

This patch removes the gconf key and (as a side effect) restores the ability, lost in the previous one, to write CDs. ;-)

I moved the code that creates the graft file for growisofs/mkisofs and related utilities to mkisofs-glue.*
That code is now linked in libnautilus-burn as well.
Comment 20 William Jon McCann 2006-03-01 15:37:19 UTC
Thanks for taking this on Fabio.  I haven't had a chance to try this yet unfortunately.  It should be noted that it seems like this adds a gnome-vfs dependency to libnautilus-burn which is not necessarily bad but it should be considered.  I also wonder if this is a good time to turn the make-iso stuff into a gobject.  That has been on the TODO list for a while.

Obviously this stuff is post branch material.  I should have some more detailed feedback in a few days when I get some more time.  Thanks again.
Comment 21 Bastien Nocera 2006-03-02 20:22:06 UTC
Created attachment 60516 [details] [review]
ncb-no-iso-dvd-burning.patch

Updated for the current CVS, and with the new files included. Should make it easier to comment on the patch.
Comment 22 Bastien Nocera 2006-03-02 20:37:15 UTC
Writing works like a charm (nice, saved some time and space not having to write the ISO), but crashes when I press the "Close" button when done:

Backtrace was generated from '/usr/bin/nautilus-cd-burner'

Using host libthread_db library "/lib/libthread_db.so.1".
`shared object read from target memory' has disappeared; keeping its symbols.
[Thread debugging using libthread_db enabled]
[New Thread -1208977216 (LWP 2706)]
0x00ed6402 in __kernel_vsyscall ()

Thread 1 (Thread -1208977216 (LWP 2706))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/libpthread.so.0
  • #2 gnome_init_with_popt_table
    from /usr//lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 free
    from /lib/libc.so.6
  • #5 g_free
    from /usr//lib/libglib-2.0.so.0
  • #6 nautilus_burn_recorder_track_free
    at nautilus-burn-recorder.c line 228
  • #7 g_list_foreach
    from /usr//lib/libglib-2.0.so.0
  • #8 main
    at nautilus-cd-burner.c line 163

Comment 23 Bastien Nocera 2006-03-02 21:14:11 UTC
You'll need to add a new NautilusBurnRecorderTrackType to know whether to free the graftfile data, or the iso filename.
Comment 24 Bastien Nocera 2006-03-02 22:27:40 UTC
Created attachment 60520 [details] [review]
ncb-no-iso-dvd-burning-2.patch

Should fix the bug above.
Comment 25 Fabio Bonelli 2006-03-03 11:45:06 UTC
For consistency I think we should replace
NAUTILUS_BURN_RECORDER_TRACK_TYPE_DATA with NAUTILUS_BURN_RECORDER_TRACK_TYPE_ISO
and NAUTILUS_BURN_RECORDER_TRACK_TYPE_GRAFTFILE with NAUTILUS_BURN_RECORDER_TRACK_TYPE_DATA.
Comment 26 Bastien Nocera 2006-03-03 11:48:09 UTC
That would break source compatibility, and silently break all the applications using NAUTILUS_BURN_RECORDER_TRACK_TYPE_DATA already.
Comment 27 Fabio Bonelli 2006-03-03 15:49:06 UTC
Created attachment 60575 [details] [review]
New patch

This patch fixes the track->contents.data.graftfile double free.

The "Make anothere copy" functionality didn't work, because the state has to be kept around for a little more time. Fixed this as well.
Comment 28 Fabio Bonelli 2006-03-03 17:48:08 UTC
Created attachment 60583 [details] [review]
Patch with new files included
Comment 29 Tiago Cogumbreiro 2006-03-03 20:23:12 UTC
Would be intersting to have support for Audio-CDs too, serpentine would really benefit from it.
Comment 30 William Jon McCann 2006-03-03 20:26:17 UTC
Given how difficult it is to write an audio CD sucessfully even when prebuilding an ISO I don't really see how we could possibly make it work on the fly.
Comment 31 Tiago Cogumbreiro 2006-03-03 20:38:24 UTC
In bug 315265 I have a small example on how to do it. It is possible but not related to ISO9660 (because that format is to data images only).

Should I move bug 315265 to nautilus-cd-burner component?
Comment 32 William Jon McCann 2006-03-03 20:47:05 UTC
I forgot to ask before.  How does this patch handle the case where a file is found to be unreadable or is removed after the disc write begins?
Comment 33 Fabio Bonelli 2006-03-04 08:42:48 UTC
Good question, William!

If you remove a file during the write, n-c-b fails, and creates a disc that seems ok, but it isn't. The files after the unreadable/moved one aren't actually written, even if you can see them on the disc.

Also, the dialog says that all went well.

Instead, if the file is removed before the write begins, you get a generic error.

I think that, *at least*, it should display sensible error dialogs for both the situations. And maybe we could re-check the graftfile before writing, but I can't see something we can do in order to handle an hazardous user action like a file move during the write (without significant changes to the code). I can file a bug about a feature that watches files to be written and follows theirs changes, btw.
Comment 34 Claudio Polegato Junior 2006-03-07 14:53:53 UTC
Hi, I'm new here.

  I intend introduce multi-session and a pass to do it with growisofs to DVDs is using growisofs -M option and them the mkisofs options like this patchs do. About CDs the process is a little more complicate, but is not very dificult.
  I think that just placing a button on "Erase information on this disc?" or "Insert a rewritable or blank disc" dialogs (when a disc content data and multi-session suport) with the label "Merge" and then run growisofs with -M option or mkisofs with multisession options.
  This can be a extension of this bug or it's better I start another?
Comment 35 Bastien Nocera 2006-03-07 15:25:32 UTC
Claudio, see bug 120384, and whether you can find a solution to all the problems listed with multi-session. Feel free to reopen the bug if you can find a decent way to present the old files in the burner, etc.
Comment 36 Fabio Bonelli 2006-03-27 12:08:26 UTC
I think that the issues pointed by Jon in comment 32 should be fixed to the root, adding a watch, lock or something to the files to be written, but this is beyond the scope of this patch.

The situation, there are two cases:
- a file is removed from the disk before starting the write
   The results are the same with and without on-the-fly write: a [maybe not so clear] error dialog

- a file is removed from the disk during the write
   The burn fail silently, and this occurs only when writing on the fly. I didn't test what happens when you delete the iso being burned, but I guess that, in the unix way, the file is kept on the disk until close()
Comment 37 Fabio Bonelli 2006-05-04 11:29:39 UTC
Can this be committed, please?
Comment 38 William Jon McCann 2006-05-04 16:59:59 UTC
I have a few changes that I'm going to be landing in CVS in a few days.  I'll look at this immediately after.  Thanks.
Comment 39 William Jon McCann 2006-05-09 21:56:31 UTC
2006-05-09  William Jon McCann  <mccann@jhu.edu>

	* src/make-iso.[ch]: (nautilus_burn_iso_graft_free),
	(nautilus_burn_iso_graft_get_info), (nautilus_burn_iso_make):
	Add option to defer cleanup of graft files.  Expose get_info.
	
	* src/nautilus-burn-drive.h:  Add NAUTILUS_BURN_DRIVE_MEDIA_TYPE_IS_DVD
	
	* src/nautilus-burn-recorder.[ch]:
	(nautilus_burn_recorder_track_free), (cd_write_needs_growisofs),
	(growisofs_stderr_line), (create_temp_file),
	(create_temp_graft_file), (ncb_mkisofs_supports_utf8),
	(nautilus_burn_recorder_write_growisofs):
	Add new GRAFT_LIST track type.

	* src/ncb-operation.c: (maybe_request_media), (create_iso_track),
	(create_track_from_device), (create_graft_track),
	(create_track_from_burn_folder), (create_cue_track),
	(prepare_tracks), (burn_cd):
	Refactor to support using IsoGraft directly and new GRAFT_LIST track type.

	Fixes #113480