<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C on Wimpy's World</title><link>https://blog.wimpys.world/tags/c/</link><description>Recent content in C on Wimpy's World</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>martin@wimpress.com (Martin Wimpress)</managingEditor><webMaster>martin@wimpress.com (Martin Wimpress)</webMaster><lastBuildDate>Fri, 04 Dec 2009 07:53:58 +0000</lastBuildDate><atom:link href="https://blog.wimpys.world/tags/c/rss.xml" rel="self" type="application/rss+xml"/><item><title>DVD to MPEG2-TS Ripper for Linux</title><link>https://blog.wimpys.world/posts/dvd-to-mpeg2-ts-ripper-for-linux/</link><pubDate>Fri, 04 Dec 2009 07:53:58 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/dvd-to-mpeg2-ts-ripper-for-linux/</guid><description>&lt;p&gt;A while back I released a script that rips a DVD to MPEG-2 PS allowing the
user to select one audio stream and one subtitle stream. Optionally the video
can be requantised, using M2VRequantiser and an ISO image created. If creating
an ISO image the chapters are also preserved from the original DVD. You can
see the original post below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="2009-04-dvd-mpeg2ps-ripper-linux.html"&gt;DVD to MPEG-2 PS Ripper for Linux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;ve just released an update to that original script which fixes subtitles in
the original MPEG-2 PS mode but now adds the capability to rip MPEG-2 TS. The
video stream can still be shrunk and in MPEG-2 PS mode the video is still
requantised but in MPEG-2 TS mode the video is re-encoded as H.264.&lt;/p&gt;
&lt;p&gt;Requantising is faster but can introduce artifacting. H.264 encoding is
slower, but produces very good quality. I am currently re-importing my entire
DVD collection, using this script, to my DLNA server using MPEG-2 TS and
re-encoding the video to H.264. This gives me high quality rips at relatively
small size (~3Gb) whilst preserving Dolby Digital 5.1 audio. Perfect for
playback via DLNA on the PS3. Some things to be aware of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Subtitles are only supported in MPEG-2 PS mode.&lt;/li&gt;
&lt;li&gt;MPEG-2 PS files created by this script are DVD compliant.&lt;/li&gt;
&lt;li&gt;ISO files created by this script will preserve the chapters from the original DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can only play DTS audio in MPEG-2 PS streams when they have been authored to DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can only play subtitles in MPEG-2 PS streams when they have been authored to DVD.&lt;/li&gt;
&lt;li&gt;The PS3 can&amp;rsquo;t play DTS audio in MPEG-2 TS streams therefore this script will transcode DTS to AC3 when in MPEG-2 TS mode.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To download the script and find out how to make full use of it visit the
release page below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/flexiondotorg/DVD-to-MPG"&gt;DVD-to-MPG&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Ripping DVDs to MPEG-2 Transport Streams for DLNA streaming</summary></item><item><title>M2VRequantiser for 32-bit and 64-bit Linux</title><link>https://blog.wimpys.world/posts/m2vrequantiser-for-32-bit-and-64-bit-linux/</link><pubDate>Thu, 23 Apr 2009 16:47:20 +0000</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/m2vrequantiser-for-32-bit-and-64-bit-linux/</guid><description>&lt;p&gt;I recently discovered that &lt;code&gt;tcrequant&lt;/code&gt; (part of the
&lt;a href="http://http://www.transcoding.org/"&gt;transcode&lt;/a&gt; suite of tools) has been
deprecated. Worst still I found that when I ran &lt;code&gt;tcrequant&lt;/code&gt; on my 64-bit Linux
workstation is was corrupting the video. See the links below for details.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://tcforge.berlios.de/archives/2009/01/18/transcode_1_1_0_final_release/index.html"&gt;transcode 1.1.0 Final Release&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mail-archive.com/transcode-users@exit1.org/msg01773.html"&gt;[transcode-users] tcrequant status&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore I decided to get the &lt;a href="http://www.metakine.com/products/dvdremaster/developers.html"&gt;M2VRequantiser&lt;/a&gt;
code from &lt;a href="http://www.metakine.com/"&gt;Metakine&lt;/a&gt; working on both 32-bit and 64-bit
Linux as a replacement for &lt;code&gt;tcrequant&lt;/code&gt;. M2VRequantiser accepts the raw MPEG2 video
data (not VOB) from the standard input and writes the recompressed frames to
the standard output. M2VRequantiser takes two arguments. The first one is a
floating point value specifying the ratio of compression. The second is the
size of the M2V, since the data is streamed to M2VRequantiser it cannot know
the M2V size. The following command would recompress &amp;lsquo;original.m2v&amp;rsquo;, whose
size is 1024000 bytes, by a factor of 1.25.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;M2VRequantiser 1.25 &lt;span class="m"&gt;1024000&lt;/span&gt; &amp;lt; original.m2v &amp;gt; requantised.m2v
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve only tested on 32-bit and 64-bit Linux, specifically Ubuntu 8.10. It works
for me but I&amp;rsquo;d be interested to get your feedback.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.launchpad.net/~flexiondotorg/m2vrequantiser/trunk"&gt;M2VRequantiser&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><summary>Finding a MPEG-2 video requantising solution for Linux</summary></item></channel></rss>