SiChan

UK Freeview HD recordings won't play after export

Recommended Posts

Hi,

 

I have an EyeTV T2 tuner capable of receiving DVB-T2 (Freeview HD) channels in the UK. It is currently connected to a late 2013 iMac. Watching HD channels with EyeTV 3 works fine. Also, if I record a program from one of these channels, the recording plays fine in the EyeTV software, on both the 2013 iMac with NVIDIA GeForce GT 750M graphics card, and on my relatively low powered 2009 MacBook. However, when I export one of these recordings, without re-encoding it, to an .mp4 file, the resulting file does not play very well on either Mac using Quicktime or VLC. The video frame rate is very choppy and the sound stutters. Also, skipping through the exported video is impossible and the video just turns to a grey screen. I have tried to play the exported mp4 files on multiple devices aside from the two Macs including a Samsung Smart TV, a PS3 and a Blu-Ray player and they all have the same problem. I was wondering why the recordings play fine in EyeTV but not when exported? The actual contents of the file, the video codec etc. should not change.

 

Inspecting the exported .mp4 files show that they are 1080p H.264 encoded files with a Mbps of around 4 and with AAC encoded audio. I am sure these files are not too high a bit rate for my equipment to handle. Strangely, if I go to the .eyetv file of the recording and right-click>Show Package Contents, there is a .mpg file inside containing the recording that opens and plays fine in VLC. I was wondering what happens during the export process to inhibit the resulting .mp4 files from playing well? Do these recordings have some kind of digital rights management on them? Another thing I thought it could be is that the exported .mp4 files are somehow lacking a "header"? I remember this used to be a problem with the old .avi container format in that even relatively low bitrate files that should play fine would stutter and play badly if the header was absent. I'd be grateful if anyone could advise me on what I need to do with these files to allow them to play properly, ideally without re-encoding the video as I do not want to lose quality.

 

Many thanks for your help

Share this post


Link to post
Share on other sites

Hi,

I can confirm that these Freeview HD recordings are tricky. I don't believe the problem is with DRM, but rather with some quirky makeup of these streams (which may very well have to do with headers). From my experience, using the Export function in EyeTV doesn't work for these streams. I experienced the same choppy video and/or stuttering audio.

I found different ways to deal with these streams:

  1. Separate the audio and video streams and process them using different apps, then re-mux them. The audio stream can be extracted with EyeTV (using the "export mpeg elementary streams" option). The video stream can be extracted from the mpg file (in the .eyetv package) using Avidemux (video codec "copy", saved in an mp4 container). Both streams can the be muxed in an app like Subler. This process does not require re-encoding.
  2. Use ffmpeg on the mpg file (in the .eyetv package) to convert the audio, like so: 
    /usr/local/bin/ffmpeg -i "$FileName" -vcodec copy -af "aresample=matrix_encoding=dplii" -bsf:a aac_adtstoasc -metadata:s:a:1 lang=eng -acodec aac -y /tmp/muxed.mp4

    You may want to adjust the audio processing settings (-af "aresample=matrix_encoding=dplii" -bsf:a aac_adtstoasc -metadata:s:a:1 lang=eng -acodec aac) to your liking. Also, you must of course edit the location/name of the source (-i) and target (-y) files. You can easily install ffmpeg using Homebrew.

  3. One could probably also use VLC to re-package the .mpg file (using either the "convert/stream" or the "stream/export assistant" menu items) without re-encoding the streams. (I remember having tried that but I don't recall the reason for not having used this option.)

I wrote a little Automator script for option 2 to automate the process (save this as a "service" which receives movie files in Finder; one can then use this directly on .eyetv packages). Please note that this script also takes care of extracting and converting the subtitles (which are usually off by 2 to 4 seconds; they need to be synced afterwards). This functionality requires additional apps. These lines of code can just be deleted if not desired.

for f in "$@"
do
	###### general stuff
	ShowName=`/usr/bin/basename "$f" .eyetv`
	cd "$f"
	FileName="$(ls *.mpg)"

	###### convert stream
	/usr/local/bin/ffmpeg -i "$FileName" -vcodec copy -af "aresample=matrix_encoding=dplii" -bsf:a aac_adtstoasc -metadata:s:a:1 lang=eng -acodec aac -y /tmp/muxed.mp4

	###### extract and convert subtitles
	java -jar /Applications/ProjectX/ProjectX.app/Contents/Resources/Java/ProjectX.jar "$f"/*mpg -ini /Applications/ProjectX/X.ini -name tempfile -out /tmp
	/usr/local/bin/VobSub2SRT --tesseract-data /usr/local/share/tessdata /tmp/tempfile.sup
	/Applications/SubCleaner.app/Contents/MacOS/SubCleaner /tmp/tempfile.sup.srt &
	sleep 3
	killall SubCleaner
	mv /tmp/tempfile.sup.srt ~/Movies/"$ShowName".en.srt

	###### clean up
	mv /tmp/muxed.mp4 ~/Movies/"$ShowName".m4v
	rm /tmp/tempfile*
	rm -r /tmp/Original\ Subtitles

done

I hope this is helpful to you (or anyone). It'd be great if you could let me/us know how this works for you (or which other solutions you find).

Share this post


Link to post
Share on other sites

Many thanks for your help with this Alfons. After trying out all your options I have found that converting the audio of the .mpg file found in the .eyetv package with ffmpeg is the only thing that works. I used the iFFmpeg GUI though as I find using the command line a bit scary.

I first tried your option 1: Exporting the video and audio as separate files in EyeTV and then discarding the video .mp4 as it was now a "bad" file that would not play properly. Accessing the .mpg file inside the .eyetv package by right-click>Show Package Contents, I imported this into Avidemux. However, Avidemux gave an incorrect length for the video (too long). Exporting the .mpg file in Avidemux to an .mp4 (passthrough, no re-encode) results in a file that bizarrely has about half the audio (all the dialogue is in whispers but the music track is still there). Adding this .mp4 file to Subler meant that I could de-select the weird audio track. However, Subler also reported the video to be much longer than it actually was. Adding the .aac audio file exported from EyeTV to Subler in the hopes of mixing it with the video track did not work as the exported audio track, despite playing fine in Quicktime, reports a length of 00:00:00 in Subler. Using VLC to repackage this .aac audio into an .mp4 file without re-encoding resulted in a file that Subler would recognise as having the correct length of the recording. However, since Subler was reporting that the video track was much longer than the audio track it would not allow me to mux them into one file.

Option 2: Importing the .mpg file from inside the .eyetv package into iFFmpeg and doing a passthrough of the video while re-encoding the audio to an AAC file with the same bitrate etc. as the original created an .mp4 file that plays fine and is the correct length. Again, before re-packaging into the .mp4 file, iFFmpeg was reporting the .mpg file to be much longer than it actually was. After re-encoding the audio and repackaging into an .mp4 everything is fine.

Option 3: This would be the easiest option if it worked but unfortunately, using VLC to repackage the .mpg file from inside the .eyetv package into an .mp4 without re-encoding anything results in a file with a time much shorter than the original file and that only plays in VLC. Opening the resulting file in Quicktime, the video is a black screen and it said it was over 4 hours long!

It's great that I now have a way of dealing with these recordings that works so thanks again. I wonder if there is anything I might be able to do with the recordings I've already exported to .mp4 in EyeTV and then deleted the original .eyetv package? 

Share this post


Link to post
Share on other sites

Thanks to both of you for these posts. I had a try with this again (I have what I think is the same issue with exporting H.264 files for other devices, see thread about 'jerky video': Video jerky when exporting HD to ATV which I believe is basically the same issue). I've tried doing the demuxing/remuxing route before with other software... and once again I've had mixed results.

I can indeed get a file that plays somewhat normally in VLC on the mac, once I've done your (alfons) 'option 2', and I used iFFmpeg too (nice shout SiChan!). In fact I was almost ready to pay money for iFFmpeg if that had totally worked... but sadly, no. I recognise all the steps and problems you had SiChan. It's kind of infuriating when there sometimes seems to be no logic to what is (not) working.

For what it's worth, I am basically trying to get files that will play properly on my H.264/mp4 capable televisions, without using extra playback hardware (they play files I re-encode through HandBrake flawlessly). I actually got one short clip to kind of play, with an audio drop out at the beginning as if it was syncing itself... but that was the best I managed.

So for now I remain of the opinion this is really something Geniatech need to fix in EyeTV itself. Exporting without having to recompress H.264 files would be really lovely, and the data all seems to be there, it's evidently just dealing with it properly that is the issue. Also HandBrake seems able to fix enough of whatever the issue is when it's re-encoding, so this must be a solvable thing, by someone, surely.

Share this post


Link to post
Share on other sites

Thanks to you both for sharing your experiences with these recordings.

@SiChanRegarding your remark on the audio track length of 00:00:00 in Subler: I had the same issue and I suspect that this is due to missing meta-information in the audio stream. If one ignores those zeros and saves the file in Subler, it shows the correct duration. (At least it does so for me.)

@BillyBob: I also experienced the issue of the first few seconds of audio missing and worked around this by keeping a few more seconds at the beginning of the recording. Not ideal, but it works.

Share this post


Link to post
Share on other sites

BillyBob, you were right, unfortunately I spoke too soon about being able to fix the recording. The recording I passed through iFFmpeg while re-encoding the audio only plays well in VLC. Using Quicktime, the video  plays for about 30 seconds and then gets stuck. The file plays ok for a while on my PS3 but gradually the sound goes out of sync. This is something that Geniatech just need to fix in the EyeTV software like you said. I already had an EyeTV DTT that worked fine for standard definition recordings but bought the EyeTV-T2 so I could record Freeview HD. Now it looks like it's a pretty useless bit of kit as only standard definition recordings work.

Share this post


Link to post
Share on other sites

Using EyeTV version 3.6.9 (7517) now which is supposed to fix a bunch of problems with the EyeTV-T2 tuner. They have re-added support for the tuner which was not included in the last couple of betas. However, the problem with non-reencoded .mp4 exports of HD channel recordings still remains. They still stutter and will not play on any equipment. :(

Edited by SiChan

Share this post


Link to post
Share on other sites

@alfons your Automator script appears to use ProjectX amongst other things. I remember using ProjectX a long time ago to convert EyeTV recordings to VIDEO_TS i.e. DVD format without re-encoding, and preserving subtitles by converting them from DVB format to DVD format. (Both are bitmap subtitle formats.)

Sadly ProjectX appears to not have been updated for many years. What version of OS X are you running it under? It would be interesting to know whether it still works under recent versions of OS X.

To everyone in general, has anyone tried using MPEG StreamClip to open directly the EyeTV video file inside the EyeTV recording package and then using MPEG StreamClip to re-save it? MPEG StreamClip is very good at handling both program streams and transport streams.

To everyone in general. I find VLC's conversion wizard totally useless for MPEG4 files. It never lets you select a mp4 container format only AVI at best and even then the results are also useless, especially if you try using pass-thru. I find AviDemux best for this sort of thing.

To everyone in general. I have found some Internet sourced MPEG4 videos on occasion have had audio tracks which have been MP3 which QuickTime does not like - QuickTime will only accept AAC, but I have also seen a few supposedly AAC ones also cause problems. Like suggested by @SiChan I have used AviDemux to 'fix' these by re-encoding the audio track.

To everyone in general. Neither DVB-T standard definition MPEG2 aka FreeView or DVB-T2 high definition H.264 aka FreeView HD as used in the UK have DRM. (At least if you exclude the mainly adult channels that require a subscription.)

Share this post


Link to post
Share on other sites

@jelockwood

As far as I remember, MPEG StreamClip uses resources from Quicktime in order to open video files. This being the case, if you were to use MPEG StreamClip to open the .mpg file inside the EyeTV recording package, it would be video only, it would not be able to play the audio track. Therefore, re-saving the file using MPEG StreamClip would remove the audio. In addition, I'm pretty sure MPEG StreamClip would not be able to play the video file.

I might give it a try some time in the future but for now I've re-connected my old standard definition-only EyeTV DTT to my iMac while my EyeTV T2 tuner is languishing in a drawer. At least the EyeTV DTT doesn't heat up to around 80oC while it's pugged in. 

 

Share this post


Link to post
Share on other sites
On 5/13/2017 at 8:23 AM, SiChan said:

@jelockwood

As far as I remember, MPEG StreamClip uses resources from Quicktime in order to open video files. This being the case, if you were to use MPEG StreamClip to open the .mpg file inside the EyeTV recording package, it would be video only, it would not be able to play the audio track. Therefore, re-saving the file using MPEG StreamClip would remove the audio. In addition, I'm pretty sure MPEG StreamClip would not be able to play the video file.

I might give it a try some time in the future but for now I've re-connected my old standard definition-only EyeTV DTT to my iMac while my EyeTV T2 tuner is languishing in a drawer. At least the EyeTV DTT doesn't heat up to around 80oC while it's pugged in. 

 

I have not tried MPEG StreamClip under Sierra but have tried it under Yosemite.

Firstly with regards to MPEG2 recordings, yes MPEG StreamClip requires the Apple QuickTime MPEG2 Component but if you had this MPEG StreamClip unlike QuickTime Player did correctly load the AC3 audio, could play it and could edit it and could save it. In any case at least here in the UK AC3 is not used for DVB-T or DVB-T2 broadcasts.

Secondly with regards to MPEG4 aka H.264 recordings, this time the QuickTime MPEG2 Component is not needed and MPEG StreamClip can edit MPEG4 recordings and again preserves the audio. As mentioned at least here in the UK even HD broadcasts over DVB-T2 are not using AC3, here in the UK HD over DVB-T2 broadcasts using AAC audio.

I would not expect MPEG StreamClip to be able to open or edit H.265 broadcasts as used in I believe Germany.

Share this post


Link to post
Share on other sites

@jelockwood:

On 2.5.2017 at 3:38 PM, jelockwood said:

@alfonsSadly ProjectX appears to not have been updated for many years. What version of OS X are you running it under? It would be interesting to know whether it still works under recent versions of OS X.

To everyone in general, has anyone tried using MPEG StreamClip to open directly the EyeTV video file inside the EyeTV recording package and then using MPEG StreamClip to re-save it? MPEG StreamClip is very good at handling both program streams and transport streams.

To everyone in general. I find VLC's conversion wizard totally useless for MPEG4 files. It never lets you select a mp4 container format only AVI at best and even then the results are also useless, especially if you try using pass-thru. I find AviDemux best for this sort of thing.

To everyone in general. I have found some Internet sourced MPEG4 videos on occasion have had audio tracks which have been MP3 which QuickTime does not like - QuickTime will only accept AAC, but I have also seen a few supposedly AAC ones also cause problems. Like suggested by @SiChan I have used AviDemux to 'fix' these by re-encoding the audio track.

To everyone in general. Neither DVB-T standard definition MPEG2 aka FreeView or DVB-T2 high definition H.264 aka FreeView HD as used in the UK have DRM. (At least if you exclude the mainly adult channels that require a subscription.)

On my Mac, ProjectX currently runs under Mac OS X El Capitan (10.11). I still use it once in a while and it still works very well.

However, my usual workflow has changed because I now use TS-Doctor. It is actually a Windows program but runs well on Macs using a Wine-based Windows emulator. There is an installation script for PlayOnMac which worked very well (you'll find a link at https://cypheros.de/forum_ger2/index.php?topic=3746.0 -- the description on this site is in German but the screenshots may help). Although TS-Doctor is paid software (and it spontaneously crashes once in while), I find it very well worth the money because it greatly simplifies my workflow regarding subtitles and saves a lot of time when dealing with recordings from channels with advertisements. The program produces .ts files which don't play 100% correct. I further process these files by just opening and saving them in Avidemux (for BBC and Channel 4 recordings, using pass-thru settings) or by converting their audio stream using ffmpeg (for ITV and Channel 5 recordings, which for whatever reason use a somewhat different audio).

As to your questions regarding MPEG streamclip or VLC conversion: I also found both not working directly with EyeTV's .mpg files. For channels from different satellites I sometimes ffmpeg with pass-thru (or remux, which is a GUI for ffmpeg).

Share this post


Link to post
Share on other sites

Brief update on this:

I still haven't solved this issue properly to my complete liking... but for what it's worth I have found that UK Freeview HD EyeTV recordings will play back relatively flawlessly on my Amazon Fire TV devices (1 original FireTV, 1 of the current '4k' capable models - I haven't tried on the 'Stick' version yet) using the VLC app, which is somewhat of a solution for my particular uses, for the time being. For a little while one of my devices struggled with the files again (after working) but after a delete/reinstall it was back to working ok.

As the FireTV devices are basically android media players and VLC is free I recommend you give it a go if you have any kind of android box attached to your TV, I'd be interested to see if VLC will play these files on other devices too.

Share this post


Link to post
Share on other sites

I have recently found another workaround for this. Apparently, UK Freeview HD streams do have DRM attached to them that is supposed to stop you playing the recordings on any device other than that which you recorded it on. This is what messes up the .mp4 exports of HD recordings. Here is what I found if you want to keep HD recordings from an EyeTV-T2 and play them on a TV, iPad or whatever without re-encoding. You need a Plex account, but it is free.

1.  Crop and compact the recording in EyeTV 

2. Find the .eyetv file of the recording, saved wherever your preferences in EyeTV has been set

3. If you want you can drag the .eyetv file to an external HDD

4. Right click on the .eyetv file > Show Package Contents

5. Find the .mpg file inside the package and drag it to another Finder window on the same volume, outside the package

6. Make an alias to the .mpg file, re-name it with the name of the film/TV show

7. Replace the .mpg file back in the .eyetv container

8. In Plex, create a Films or TV shows library and point it at the folder containing the aliases of your EyeTV recordings, Scan library files in Plex to update your recordings list

9. These recordings play fine on any Plex enabled device, pretty much every SmartTV, Apple TV, Amazon Fire, games console, tablet or phone. Plex does not seem to be re-encoding these streams on the fly, which it would do if it was a file encoded with a more obscure codec. They play smoothly just like any other .H264 encoded file.

 

Share this post


Link to post
Share on other sites

In Australia we have shifted to mp4 for our free to air HD TV.  EyeTV for some reason does not export these recordings using any of the "no re encoding" forms on some of our (5) HD TV stations.  Some do it reliably and the others (ABC and SBS) producing a stuttering video as described here.  What I have found is that exporting it in an "encoded" form (I use Apple TV HD 1080p) fixes the problem completely (at the expense of a larger file and much slower export) however.

There is something in the way EyeTV records its mp4 files that make it difficult for other video apps to read them.  I can usually play the native eyeTV files using Infuse but it often claims a 90m recording is 20 hours or so.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.