[mythtvnz] recorded programmes file format

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Sep 7 10:15:48 BST 2016


On Wed, 07 Sep 2016 06:28:48 +1200, you wrote:

>On Tue, 06 Sep 2016 17:11:39 +1200, skooobie doo <skooobie at gmail.com>  
>wrote:
>
>> I saw this change troo. Open the file directly in VLC and played okay.  
>> Reading on this it is a native raw format that Myth uses, so >I guess  
>> they no longer transcode to mpg. In the release notes of v28.
>>
>> You must be on v0.28 like me: "Use correct mimetypes and extensions for  
>> MPEG2 PS/TS (could affect scripts/tools that expect >filenames ending in  
>> .mpg) [7bf6bb1]"...
>>
>> The official version release notes:
>>
>> Release Notes - 0.28
>>
>> Key New Features
>> WebFrontend. The web interface that uses the webserver built-in the  
>> backend (no configuration required.) As of 2016-02-12, MythWeb >is still  
>> available as WebFrontend is not feature complete to replace MythWeb.
>> Major Changes
>> Major UPnP overhaul The UPnP code has seen major changes, improved  
>> browsing modes, more metadata, artwork for all media, strict UPnP  
>> >(2014) and DLNA compliance and support for additional UPnP features.  
>> (Note: Client support for additional metadata varies. Client >behaviour  
>> depends on UPnP compliance.)
>> The cardinput table is no longer used, data has moved to capturecard  
>> [3e8bd6b]
>> MythMusic now uses storage groups you just have to tell the master or a  
>> slave backend where your music is located and all frontends >will have  
>> access to it (no need to mount it using NFS or Cifs).
>> MythMusic Lyrics View MythMusic can now search for the lyrics for the  
>> currently playing track.
>> Updated MythMusic Radio Stream List MythMusic now downloads from our  
>> server an updated list of over 31000 radio streams from all >around the  
>> world.
>> MythZoneMinder popup notifications on alarms Shows a live view of the  
>> alarmed camera in a popup window.
>> Replacement Gallery using MythUI & storage groups Backend manages images  
>> in Storage Group and supports multiple frontends/service >clients
>> Add VBox TV Gateway support [a3eb10d0] See VBox.
>> Add H.265 (HEVC) and VP9 support.
>> Using FFmpeg 3.0
>> Prerequisite Changes
>> Added support libraries/prerequisites
>> Qt version 5.2 (or later.) [f5724c6] Announcement. See: #12558!
>> Exiv2 image tag reader package/library
>> taglib version to 1.7 (version 1.8 or higher is recommended, but MythTV  
>> will compile with 1.7)
>> libcec version is raised from 1.5 to 1.7
>> libsystemd-daemon-dev for sd_notify(), see [229bca1] (only needed if  
>> sd_notify is to be used.)
>> Removed support libraries/prerequisites
>> Special Notices & Instructions
>> Data Migration: 0.28 will only support direct upgrades from 0.22 or  
>> higher. If you are running an older version, you will need to >upgrade  
>> to 0.22, 0.23 or 0.24 then upgrade to 0.28.
>> As always, backup your database before upgrading, see this.
>> Those that have IPTV recorders and updated to master before the fixes  
>> applied in #12605 may need to delete and recreate their IPTV >recorders.
>> Services API developers/users should review: API Parameters 0.28.  
>> Significant changes have been made to the API since 0.27.
>> Users running backend(s) on a system using a http proxy, and using a  
>> Ceton tuner, may need to modify their proxy configuration to >bypass the  
>> proxy for the Ceton tuner (i.e. no_proxy="192.168.200.0/24") #12067
>> Use correct mimetypes and extensions for MPEG2 PS/TS (could affect  
>> scripts/tools that expect filenames ending in .mpg) [7bf6bb1]
>> In order by sanely backup .mythtv directories, cache and temporary  
>> entries have been moved per the following table. Details: >[85b2d6d]
>> Cache and temporary directory name changes
>> Old0.28
>> thumbcachecache/gallery-thumbcache
>> MythMusic/RipTemptmp/RipTemp
>> MythNetvision/thumbcachecache/netvision-thumbcache
>> Cache-applicationName-hostNamecache/applicationName-hostName
>> thumbcachecache/metadata-thumbcache
>> remotecachecache/remotecache
>> themecachecache/themecache
>> icontmptmp/icon
>> pytmdb3.cachecache/pytmdb3.cache
>> Add new Storage Groups named Music and MusicArt with proper directories.
>> mythAnyProgram's --nologserver option has been renamed  
>> --disable-mythlogserver. In almost all cases, it isn't required. See  
>> >Mythlogserver.
>>
>> On 6 September 2016 at 15:05, Paulgir <paulgir at gmail.com> wrote:
>>> I have just noticed that all the recorded programme files have .ts  
>>> extensions,when previously,in mythbuntu 12.04,they were .mpg
>>> Is this normal?
>>> Everything is working ok.
>>>
>>> -Paul
>>>
>>>
>Ok ,that explains it.
>Strangely,though,it did record a few items with .mpg extensions,when I  
>first started using it.

MythTV recordings from DVB or ATSC devices or the like are MPEG
Transport Stream format, copied directly from the digital data
received from the tuner, hence the .ts file extension.  Recordings
from an old analogue tuner are MPEG Program Stream format, which is
supposed to have the .mpg file extension.  Up until 0.28, the
transport stream recordings where being given the wrong .mpg file
extension, and this has now been corrected.  But it does not matter
much, as all MPEG files, whatever format, have headers at the start
that allows the correct format to be determined.  So most software
that plays video files, including MythTV, ignores the file extension
and determines the file format from those headers.  If you want to
know the format of a video file, use the mediainfo command on it.  In
the top section of the output (General), the Format line tells you the
real format of a file.  Here is an example from a .mpg file I recorded
earlier this year from TV One using 0.27:

General
ID                                       : 27 (0x1B)
Complete name                            : 1001_20160102032900.mpg
Format                                   : MPEG-TS
File size                                : 2.04 GiB
Duration                                 : 34mn 57s
Overall bit rate mode                    : Variable
Overall bit rate                         : 8 366 Kbps

You can see it is actually a Transport Stream file (MPEG-TS as opposed
to MPEG-PS).

The difference between Transport Stream and Program Stream format is
not huge.  Transport stream files have a bit of extra redundant data
for error checking and error correction, so that errors that creep in
between the transmitter and receiver can be handled.  They also tend
to use smaller block sizes for the data in each stream, and organise
the relative positioning of the blocks of data in each stream so that
the buffering requirements in the receiver are minimised.

MythTV has never transcoded digital recordings on the fly when
recording - that is done after the recording ends or in parallel, with
the recording and transcoded recording being in separate files.  And
it is only done if the user sets it up to happen.  With analogue
recordings, if the analogue tuner is not capable of doing the
transcoding necessary for a sane file size in hardware, MythTV
supports doing on the fly transcoding as part of the recording
process.  Without such transcoding, an ordinary PAL TV recording
stored in uncompressed AVI format would need around 1.1 Gibytes per
minute!  But you have to have a fast processor to support transcoding
- it needs to be fast enough to encode faster than the frame rate
being received.  Back when analogue recordings were normal, the
processors were not really fast enough so everyone used tuners with
hardware encoding, or used a very expensive CPU and recorded only one
channel at once.  Current processors are often capable of encoding one
channel per CPU core at the standard TV frame rates, and that is what
now makes mythcommflag able to be run in parallel with a recording and
get its data from the RAM buffers for the recording, instead of having
to read the data back from the disk.  The processing needed to do
commercial flagging is pretty similar to that needed for transcoding,
but probably a little less CPU intensive.



More information about the mythtvnz mailing list