[2009-01-06]

Creating video DVDs from DVB-S streams with Debian

After I went from analog cable TV reception to a shiny satellite dish on our roof I was facing new challenges. Like how the hell do I watch TV on my workstation now and how do I record programmes to DVD now? Luckily the watching part was a cakewalk thanks to kaffeine. The great KDE media player was surprisingly capable in helping me find my hundreds of (mostly useless) TV and radio channels pouring from the sky. And it has a timer function, a simple EPG (that really needs some love) and a recording feature for DVB-S transport streams. So much for that.

Cutting out the ads

First order of business after having a transport stream file on disk was getting rid of the ads. While many people suggest to use tools like avidemux or ProjectX (read: slow as snakes while at the same time being uncomfortable as Windows®) I found a simple great tool: dvbcut. It’s not part of the standard Debian distribution but can be easily installed by adding the debian-multimedia repository to your list of APT sources. Meanwhile it’s included in Debian and Ubuntu. dvbcut has three features that make it great:

  • keyhole surgery approach (it doesn’t recompress the whole stream but leaves it untouched where possible thus saving CPU time and quality)
  • creates a DVD conforming MPEG2 file in virtually no time
  • has both a linear and a logarithmic slider to help you find the beginning and end frame of the ads quickly
  • works down to a single frame and re-encodes a few frames between the selected frame and the previous/next I-frame (most other tools out there can only cut on I-frames thus cutting too little or too much)

Just load the transport stream with dvbcut and after scanning the file once you will see:

There are two sliders at the bottom. The first is a linear slider. It lets you go through your video material proportionally to how fast you drag your mouse. The lower slider is a logarithmic slider. That means it’s less sensitive in the center than in the border area. Dragging your mouse a centimeter in the center will just move you a few frames backward and forward. But the further you get away from the center the fast the movement. So you basically choose the approximate beginning of the movie with the upper slider and then find the exact start frame with the lower slider. It’s fast and easy.

Once you have found the start of the actual movie press the green triangle icon:

The cut list on the left marks the beginning. Now navigate to the end of the movie (or the last frame right before an advertisement) and press the red square icon:

The end frame is also shown in the cut list on the left. Repeat these steps for all the video parts that you want to keep in the end. Once you are done choose File / Export Video and you will get a window where you can set the output format you like:

I got the best results when choosing “MPEG program stream/DVD” instead of the standard setting. Choose a path where to save the file and click on “OK“. You will see that exporting the video is very fast as only few frames will get re-encoded. Now you should have a valid MPEG2 file suitable for burning on a DVD.

Mastering and burning a DVD

I have tried several programs to create a DVD from the MPEG2 files generated like described above. The application I finally used was dvdstyler (also available as a Debian package from debian-multimedia.org). I won’t describe it here in detail (unless anyone gets completely lost and begs me to document it) though. You basically import your MPEG2 files there, create a few menu buttons linking to the respective movies and master the DVD. You will be shown the DVD in your DVD player application (gxine here) to verify it works. And then you can instantly burn it to a DVD recordable. It’s as easy as that.

Beware that you should take warnings about menu button placement seriously. I sometimes placed menu buttons too far off the center and then couldn’t access that respective movie later on the DVD standalone player any more. Otherwise it’s really a simple way to quickly get DVB-S material to a DVD while avoiding time consuming re-coding of the DVB streams.

2 thoughts on “Creating video DVDs from DVB-S streams with Debian

  • 2018-08-20 at 22:30
    Permalink

    Does this method allow to record full HD videos ?? This trick is very useful to make a DVD with the help of Debian tools. Looking forward to more articles like this. Keep up the good work !!! For more visit (bullshit link removed)

    Reply
    • 2018-08-21 at 08:33
      Permalink

      I’m curious… why the link?

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *