Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 17:21
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
VCDimager - making VCDs and SVCDs
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Thu 25 Sep 2008, 05:50    Post subject:  VCDimager - making VCDs and SVCDs
Subject description: Also has related utilities
 

N.B. vcdimager and vcdxgen ONLY work with the versions of libiso9660 and libcdio that they were compiled against, and if you have a different version it is probably easier just to add the right version rather than recompiling vcdimager.
------------------------------------

So you run Puppy and have video that you want to put on a Video CD? Here are your options:

1. You could try installing Wine and one of the (probably large) Windows frontends to VCDimager - e.g. "VCD wizard". I don't know if they run in Wine, but I'm guessing some should.

2. (the easiest way) Use Pburn (here). Since version 1.8.0 Pburn has had basic (S)VCD support. Just make sure your Pburn TV standard settings are right (PAL/NTSC), add your videos to the burn list, and Pburn will used ffmpeg to convert the video to the right format and vcdimager to write the disc image. There will be no menu or fancy PBC features, and each video will be one chapter. VCDimager (I presume just the vcdimager binary) will be in Puppy 4.1, otherwise you can get it here

N.B. The transition between VCD chapters is not seamless - there is a glitch, so if you want a seamless transition you need to instead have one long video with entrypoints (see below). This is not a vcdimager bug, it is a feature of the VCD standard Smile

3. (I'm not sure there is any advantage in this option) Manually convert the videos to the right VCD format with ffmpeg e.g. for a PAL VCD
Code:
ffmpeg -i /path/input_file.flv -target pal-vcd /path/output.mpg
, and manually use vcdimager to create the disc image. IIRC you can't make a menu this way.
VCDimager also includes a set of utilities (here) for doing other things like (IIRC) extracting video from a VCD and checking files for VCD compatibility. Personally I've never found them useful.

4. (the way with the most control) The vcdimager binary and other utilities mentioned in 3. are the original command-line based programs, but VCDimager also includes newer XML based programs to do the same things but with more options. If you can find a use for the utilities, they are here, otherwise you probably just want vcdxbuild (here) the "xml" equivalent to the vcdimager binary.
vcdxbuild requires a special xml file as input, with instructions for the files to put on the CD, menus, entrypoints, playback control etc. It builds a .bin VCD image and a .cue file, and you can burn it with something like
Code:
cdrecord dev=/dev/cdrom -dao -v cuefile=input_file.cue -driveropts=burnfree

Use vcdxbuild like this
Code:
vcdxbuild -c output.cue -b output.bin -p input.xml

To get a proper xml file, you can either work off a template (I have a script below to generate one I like), or use vcdxgen from the XML utilities pet above. I never figured out how to use vcdxgen to do anything other than generate a basic file, but maybe it can. If you find out that it does, please let me know Smile
You can do all sorts of complicated things with the xml file if you use a little Google to educate yourself Smile

------------------------------------
Someone out there might find the script below useful, although you may want to tweak it to your own needs:

Background:
I got a video capture card with hardware MPEG encoding to make it easy to transfer concert videos to VCD. Because I don't want a glitch between songs in the concerts, I use VCD entrypoints instead of chapters. The downside of this is that back and forward navigation on the VCD don't work properly, as if you start at one entrypoint, they will take you to the same places even if the video has played past the next entrypoint.

What it does:
I wrote this script to generate a simple .xml file for a VCD with a single video and multiple entrypoints. (It would be fairly straightforward to modify to have multiple videos as separate chapters, each with multiple entrypoints).
You need to put the entrypoint times in seconds (normally starting with 0; you can have decimals as well, but the entrypoint may not end up exactly where you specify anyway, as it has to be put at the location of a special marker) in a text file, each on a new line, WITH NO EXTRA INFORMATION, and use it as the argument for the script. You will then need to fill in the fields at the top for the title, publisher and source file locations. The script produces a playback control so that if you press the "track number" of an entrypoint, it will go there, "back" and "forward" work subject to the limitation described above, and return (menu on most DVD players) gives you a menu screen. I was using the original (Windows 3.1) Philips Video CD 2.0 Toolkit http://www.icdia.org/sw_pc/vcd2tk.zip to make mpeg stills for the menu and the still I put at the end of the video for 60 seconds. I'll try to post the easiest linux way to make mpeg stills Smile
I think you could replace them with videos, or you can remove the relevant bits (remember to make all your entrypoints timeout to end then).
You also get the files for the CD-i application with the Video CD Toolkit - you'll either need to do that and fix the paths, or delete that whole "folder" part near the top of the xml file. It is unlikely that you will ever come across a CD-i player anyway. Also, you'll need to delete that and change the "vcd version" if you do an svcd.

Code:
#!/bin/bash
# vcdgenxml
# Script to mostly automate the creation of an xml file for a single .mpg for vcdxbuild.
# Requires a list of entrypoint times (in seconds) as input.

# Location of output xml file
XMLFILE="/tmp/VCD.xml"
# Temporary menu file
MENUFILE="/tmp/vcdmenu"



# Find number of "tracks"
tracks=`wc -w "$1"`
tracks=`echo $tracks | cut -d " " -f 1`

# Make menu list in temporary file
while (( track < $tracks ))
do
   track=$(($track + 1))
   echo "      <select ref=\"select-seq$track\"/>" >> "$MENUFILE"
done
echo "      <select ref=\"select-back\"/>" >> "$MENUFILE"



# Write start of file
echo "<?xml version=\"1.0\"?>
<!DOCTYPE videocd PUBLIC \"-//GNU//DTD VideoCD//EN\" \"http://www.gnu.org/software/vcdimager/videocd.dtd\">
<videocd xmlns=\"http://www.gnu.org/software/vcdimager/1.0/\" class=\"vcd\" version=\"2.0\">
  <info>
    <album-id></album-id>
    <volume-count>1</volume-count>
    <volume-number>1</volume-number>
    <restriction>0</restriction>
  </info>
  <pvd>
    <volume-id>TITLE</volume-id>
    <system-id>CD-RTOS CD-BRIDGE</system-id>
    <application-id>CDI/CDI_VCD.APP;1</application-id>
    <publisher-id>PUBLISHER</publisher-id>   
  </pvd>
  <filesystem>
    <folder>
      <name>CDI</name>
      <file src=\"/mnt/home/Program Files/Ahead/Nero/Cdi/cdi_imag.rtf\" format=\"mixed\">
        <name>CDI_IMAG.RTF</name>
      </file>
      <file src=\"/mnt/home/Program Files/Ahead/Nero/Cdi/cdi_text.fnt\">
        <name>CDI_TEXT.FNT</name>
      </file>
      <file src=\"/mnt/home/Program Files/Ahead/Nero/Cdi/cdi_vcd.app\">
        <name>CDI_VCD.APP</name>
      </file>
    </folder>
  </filesystem>
  <segment-items>
    <segment-item src=\"BLANK_BACKGROUND.mms\" id=\"back\"/>
    <segment-item src=\"MENU_BACKGROUND.mms\" id=\"menu\"/>
  </segment-items>
  <sequence-items>
    <sequence-item src=\"SOURCE FILE.MPG\" id=\"sequence-00\">" > "$XMLFILE"

# For each "track" make an entrypoint.
track=0
while (( track < $tracks )); do
   track=$(($track + 1))
   echo "      <entry id=\"seq$track\">`cat "$1" | cut -d "
" -f $track`</entry>" >> "$XMLFILE"
done

# Write middle of file
echo "    </sequence-item>
  </sequence-items>
  <pbc>" >> "$XMLFILE"

# Add each "track" to the playback control.
track=0
while (( track < $tracks )); do
   track=$(($track + 1))
echo "
    <selection id=\"select-seq$track\">
      <bsn>1</bsn>
      <prev ref=\"select-seq`echo $(($track - 1))`\"/>
      <next ref=\"select-seq`echo $(($track + 1))`\"/>
      <return ref=\"select-menu\"/>
      <timeout ref=\"select-back\"/>
      <wait>0</wait>
      <loop jump-timing=\"immediate\">1</loop>
      <play-item ref=\"seq$track\"/>" >> "$XMLFILE"
cat $MENUFILE >> "$XMLFILE"
echo "    </selection>" >> "$XMLFILE"
done

# Remove invalid pbc stuff
sed -i '/seq0/ d' "$XMLFILE"
# Can't figure out how else to get this to work :(
sed -i s/seq$((track + 1))/back/ "$XMLFILE"

# Write end of file
echo "
    <selection id=\"select-back\">
      <bsn>1</bsn>
      <prev ref=\"select-seq$track\"/>
      <return ref=\"select-menu\"/>
      <timeout ref=\"end\"/>
      <wait>60</wait>
      <loop jump-timing=\"immediate\">1</loop>
      <play-item ref=\"back\"/>" >> "$XMLFILE"
cat $MENUFILE >> "$XMLFILE"
echo "    </selection>

    <selection id=\"select-menu\">
      <bsn>1</bsn>
      <next ref=\"select-seq1\"/>
      <return ref=\"select-seq1\"/>
      <timeout ref=\"end\"/>
      <wait>60</wait>
      <loop jump-timing=\"immediate\">1</loop>
      <play-item ref=\"menu\"/>" >> "$XMLFILE"
cat $MENUFILE >> "$XMLFILE"
echo "    </selection>

    <endlist id=\"end\" rejected=\"true\"/>
  </pbc>
</videocd>" >> "$XMLFILE"



# Remove temporary file
rm "$MENUFILE"

# Show output xml file and message about what to fill in manually.
rox -s "$XMLFILE"
exec xmessage "Fill In:
TITLE
PUBLISHER
BLANK_BACKGROUND
MENU_BACKGROUND
SOURCE FILE"

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Sun 05 Oct 2008, 15:32    Post subject:  

The best place for extra information seems to be http://www.geocities.com/medinotes/vcd/.

To make proper VCD stills, e.g for menus, install Mjpegtools (thanks Plinej) and follow the instructions at http://www.mir.com/DMG/stills.html.
Note that with recent versions of ppmtoy4m you need to add this new parameter as well
Code:
-S 420mpeg2

So I use commands that look like this:
Code:
ppmtoy4m -S 420mpeg2 -Ip -F 25:1 menu.ppm | mpeg2enc -f 6 -T 120 -o menu.m1v
ppmtoy4m -S 420mpeg2 -Ip -F 25:1 menusmall.ppm | mpeg2enc -f 6 -T 42 -o menusmall.m1v
mplex -f 6 -o menu.mms menusmall.m1v menu.m1v

But check the table at that link, because it is slightly different for SVCD or NTSC.
I don't think the file extensions matter.
You don't need y4mscaler if you make your stills at the right resolution to start with - I typically combine four screenshots of the movie running in mplayer with X11 video output and the nozoom option (this way it retains the correct aspect ratio - otherwise be prepared for your images to look too wide when you play the VCD.
Beware of getting things cut off at the edges of your TV screen as well Smile

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!

Last edited by disciple on Sun 06 Sep 2009, 06:26; edited 1 time in total
Back to top
View user's profile Send private message 
bill

Joined: 28 May 2008
Posts: 495

PostPosted: Sun 23 Nov 2008, 13:29    Post subject: vcdimager -increasing sector size ?  

Hello disciple,on trying to use vcdimager,I get these errors,is there some command line options suitable to get past these ?
vcdimager.png
 Description   
 Filesize   179.44 KB
 Viewed   1260 Time(s)

vcdimager.png

Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Mon 24 Nov 2008, 04:27    Post subject:  

You are trying to use a file that is not SVCD compatible. The audio is the wrong frequency and I think that message about the picture size might mean the video is not compatible either. You need to use ffmpeg or something to convert it into an SVCD compatible video.
My first post included what I think is the correct ffmpeg command to convert the video - but I can't remember if I've ever burned a VCD from files converted by ffmpeg. Just make sure you convert it to the right TV standard (PAL or NTSC)

BTW (not relevant to bill's question) one thing I just discovered recently is that linux software does not seem to be able to navigate using VCD entrypoints, so if you want to navigate a disk in a linux computer you need to use chapters and tolerate the glitches Sad OR I remember seeing something about a freeware Windows player that even supported menus, and I think may have worked in Wine... but I can't find it now Sad

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
bill

Joined: 28 May 2008
Posts: 495

PostPosted: Mon 24 Nov 2008, 12:05    Post subject: ffmpeg output of original stossel.avi file  

Hi disciple,thanks for your help.Here is a stosselavi2mpg.png that seems
the first step and I don't notice any complaints so far.Oh and by the way this is Puppy 4.1 K2.6.25.16. Where do I go from here ?
stosselavi2mpg.png
 Description   
 Filesize   29.39 KB
 Viewed   1021 Time(s)

stosselavi2mpg.png

Back to top
View user's profile Send private message 
bill

Joined: 28 May 2008
Posts: 495

PostPosted: Tue 25 Nov 2008, 09:19    Post subject: VCDimager - making VCDs and SVCDs (Solved with Pburn)  

As you were disciple Laughing I spent the wee hours of the morning romancing Pburn and I finally got myself lined up to burn a 39 minute,NTSC VCD which turned out a treat thanks to Sigmund Bergland..I am now running Puppy 4.1.1 Probably Pburn was working in 4.0 ,4.1 but due to my inexperience or the box I am running I hadn't had much luck in my endeavors.Now that I am sorted,I can't see at this point to use anything other than Pburn.It just worked ! Yippee ! Very Happy cheers
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Sat 24 Jul 2010, 02:47    Post subject:  

disciple wrote:
The best place for extra information seems to be http://www.geocities.com/medinotes/vcd/.

Ah - looks like the main location may be http://download.videohelp.com/vitualis/index.htm
There's also a backup at http://web.archive.org/web/20080317044226/http://www.geocities.com/medinotes/vcd/

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6455
Location: Auckland, New Zealand

PostPosted: Fri 25 Jan 2013, 18:56    Post subject:  

Most of the download links in the first post were dead, so I have reuploaded the packages to my dropbox:
http://db.tt/2L0V0DT8

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0975s ][ Queries: 13 (0.0045s) ][ GZIP on ]