GNOME Bugzilla – Bug 113480
Write DVDs without using temporary ISO image
Last modified: 2006-05-09 21:56:31 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.
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.
what about some hidden key en gconfd to enable such support for users that know how to do the setuid root magic?
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 :-(
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 ?
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?
*** Bug 131739 has been marked as a duplicate of this bug. ***
*** Bug 121202 has been marked as a duplicate of this bug. ***
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".
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.)
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 :(
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? :)
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 ;)
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).
*** Bug 159983 has been marked as a duplicate of this bug. ***
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.
Created attachment 60346 [details] [review] Header file
Created attachment 60347 [details] [review] Patch
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?
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.
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.
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.
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 ()
+ Trace 66635
Thread 1 (Thread -1208977216 (LWP 2706))
You'll need to add a new NautilusBurnRecorderTrackType to know whether to free the graftfile data, or the iso filename.
Created attachment 60520 [details] [review] ncb-no-iso-dvd-burning-2.patch Should fix the bug above.
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.
That would break source compatibility, and silently break all the applications using NAUTILUS_BURN_RECORDER_TRACK_TYPE_DATA already.
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.
Created attachment 60583 [details] [review] Patch with new files included
Would be intersting to have support for Audio-CDs too, serpentine would really benefit from it.
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.
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?
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?
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.
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?
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.
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()
Can this be committed, please?
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.
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