Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Fixing BBC HD AC3 for PS3 playback

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


mythtv-list at dinkum

Mar 27, 2009, 5:43 AM

Post #1 of 7 (2094 views)
Permalink
Fixing BBC HD AC3 for PS3 playback

I've found a more MythTV friendly way to fix BBC HD recordings so they
play properly on the PS3 but I'm not too hot on the scripting so it
could use some input....

I have added a user job to search and replace on the recorded file and
replace the wrong AC3 headers with the AC3 private data header that
the PS3 is happy with. I'm using bbe which is packaged with Ubuntu and
can handle binary replace on >2GB files, took a while to find
something fast that could do this.

The job:
mv "%DIR%/%FILE%" "%DIR%/%FILE%.ts" ; bbe -e "s/\xFF
\x00\x00\x01\xC0/\xFF\x00\x00\x01\xBD/" "%DIR%/%FILE%.ts" > "%DIR%/
%FILE%" ;

Before anyone tells me this a very crude way to fix the transport
stream I know that already ;-) this works correctly on all the BBC HD
recordings I have (~2TB worth) and produces the exact same file as the
windows BBCHDFixer.exe I had been using. I'm working on a way to
mislabel the audio description channel so the PS3 ignores it as I
currently have to manually select the second audio stream on playback.

I'm leaving the unconverted version of the file around until I'm happy
that the job runs reliably, which currently it doesn't! 90% of the
time it's fine but 10% the job appears in the queue as completed but
there's no .ts version of the file and no errors showing in the
mythbackend.log I'm thinking that the job needs some better failure/
completion signalling (some at all) but don't really know where to
start in adding that.

I've wasted days trying to get ffmpeg or mencoder (latest svn of both)
to remux the recordings but mencoder doesn't seem to like demuxing the
BBC HD stream correctly and ffmpeg seems to generate a broken
transport stream.
This is my best so far ffmpeg in case there is an ffmpeg guru around:

ffmpeg -i file.mpg -f mpegts -copyts -map 0.0:0.0 -map 0.3:0.1 -vcodec
copy -acodec copy -fflags genpts outfile.mpg

This works in that it produces a transport stream with h264 video and
one ac3 audio in sync which the PS3 plays but the video is jerking
back and forth madly like some frames are in the wrong order, this
seems to be a problem that many have experienced with ffmpeg transport
streams and it's the same in mplayer, even vlc doesn't play it!

So any help with either method is much appreciated.

Andre
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


belcampo at zonnet

Mar 27, 2009, 5:57 AM

Post #2 of 7 (1975 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

Andre Newman wrote:
> I've found a more MythTV friendly way to fix BBC HD recordings so they
> play properly on the PS3 but I'm not too hot on the scripting so it
> could use some input....
>
> I have added a user job to search and replace on the recorded file and
> replace the wrong AC3 headers with the AC3 private data header that the
> PS3 is happy with. I'm using bbe which is packaged with Ubuntu and can
> handle binary replace on >2GB files, took a while to find something fast
> that could do this.
>
> The job:
> mv "%DIR%/%FILE%" "%DIR%/%FILE%.ts" ; bbe -e
> "s/\xFF\x00\x00\x01\xC0/\xFF\x00\x00\x01\xBD/" "%DIR%/%FILE%.ts" >
> "%DIR%/%FILE%" ;
>
> Before anyone tells me this a very crude way to fix the transport stream
> I know that already ;-) this works correctly on all the BBC HD
> recordings I have (~2TB worth) and produces the exact same file as the
> windows BBCHDFixer.exe I had been using. I'm working on a way to
> mislabel the audio description channel so the PS3 ignores it as I
> currently have to manually select the second audio stream on playback.
>
> I'm leaving the unconverted version of the file around until I'm happy
> that the job runs reliably, which currently it doesn't! 90% of the time
> it's fine but 10% the job appears in the queue as completed but there's
> no .ts version of the file and no errors showing in the mythbackend.log
> I'm thinking that the job needs some better failure/ completion
> signalling (some at all) but don't really know where to start in adding
> that.
>
> I've wasted days trying to get ffmpeg or mencoder (latest svn of both)
> to remux the recordings but mencoder doesn't seem to like demuxing the
> BBC HD stream correctly and ffmpeg seems to generate a broken transport
> stream.
> This is my best so far ffmpeg in case there is an ffmpeg guru around:
>
> ffmpeg -i file.mpg -f mpegts -copyts -map 0.0:0.0 -map 0.3:0.1 -vcodec
> copy -acodec copy -fflags genpts outfile.mpg
I also played with BBCHD, the only way, at least for me, is to use
tsmuxer to let it play on my PopCornHour.
The linux version is tsmuxer is an older one which isn't up to the task,
I use the windows version with wine which works perfectly. With this
tools you also can stripout the unwanted NAR an other audio channels,
leaving only Video and AC3
>
> This works in that it produces a transport stream with h264 video and
> one ac3 audio in sync which the PS3 plays but the video is jerking back
> and forth madly like some frames are in the wrong order, this seems to
> be a problem that many have experienced with ffmpeg transport streams
> and it's the same in mplayer, even vlc doesn't play it!
>
> So any help with either method is much appreciated.
>
> Andre
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


philippe at vandergucht

Mar 27, 2009, 5:59 AM

Post #3 of 7 (1962 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

On Fri, Mar 27, 2009 at 1:43 PM, Andre Newman <mythtv-list [at] dinkum> wrote:

> I've wasted days trying to get ffmpeg or mencoder (latest svn of both) to
> remux the recordings but mencoder doesn't seem to like demuxing the BBC HD
> stream correctly and ffmpeg seems to generate a broken transport stream.
> This is my best so far ffmpeg in case there is an ffmpeg guru around:

Disclaimer: I am not a guru but I've been busy with ffmpeg and BBC HD
recordings too. (mencoder indeed did not work)

> ffmpeg -i file.mpg -f mpegts -copyts -map 0.0:0.0 -map 0.3:0.1 -vcodec copy
> -acodec copy -fflags genpts outfile.mpg

There is reputedly a problem with ffmpeg and the mpegts container.
I now use 'avi'.

> This works in that it produces a transport stream with h264 video and one
> ac3 audio in sync which the PS3 plays but the video is jerking back and
> forth madly like some frames are in the wrong order, this seems to be a
> problem that many have experienced with ffmpeg transport streams and it's
> the same in mplayer, even vlc doesn't play it!

After using avi as a container playback was resolved.

--

Yogi Berra - "A nickel ain't worth a dime anymore."
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv-list at dinkum

Mar 27, 2009, 6:12 AM

Post #4 of 7 (1972 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

On 27 Mar 2009, at 12:59, Philippe Van Der Gucht wrote:

> There is reputedly a problem with ffmpeg and the mpegts container.
> I now use 'avi'.

I tried mp4 and ps with no success, I didn't attempt avi as all the
avi's I have with ac3 audio didn't play on my PS3.

Trying that right now, I don't have any affinity with any container
(ts seems right though) as I only use the PS3 for playback, I find the
picture quality so very much better than anything else.

Thanks

Andre
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv-list at dinkum

Mar 27, 2009, 9:18 AM

Post #5 of 7 (1955 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

On 27 Mar 2009, at 12:59, Philippe Van Der Gucht wrote:
>
> There is reputedly a problem with ffmpeg and the mpegts container.
> I now use 'avi'.

Tried it just now, I get an avi that plays fine in mplayer and vlc but
PS3 says corrupted file, tried it through MediaTomb and Ushare too in
case there's some mimetype issue.
Could you share your ffmpeg invocation please?

I've been using:
ffmpeg -i infile.mpg -f avi -copyts -map 0.0:0.0 -map 0.3:0.1 -acodec
copy -vcodec copy outfile.avi

Andre
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


philippe at vandergucht

Mar 27, 2009, 2:43 PM

Post #6 of 7 (1942 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

Andre Newman wrote:
>
> On 27 Mar 2009, at 12:59, Philippe Van Der Gucht wrote:
>>
>> There is reputedly a problem with ffmpeg and the mpegts container.
>> I now use 'avi'.
>
> Tried it just now, I get an avi that plays fine in mplayer and vlc but
> PS3 says corrupted file, tried it through MediaTomb and Ushare too in
> case there's some mimetype issue.
> Could you share your ffmpeg invocation please?

Here's my report:
http://www.spiff.be/node/304

> I've been using:
> ffmpeg -i infile.mpg -f avi -copyts -map 0.0:0.0 -map 0.3:0.1 -acodec
> copy -vcodec copy outfile.avi

Not much I can add to that I'm afraid.

The only suggestion I can give you is to try out other formats.


--
What do you mean I always answer a question with another question?
* TagZilla 0.066 * http://tagzilla.mozdev.org
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv-list at dinkum

Mar 27, 2009, 4:08 PM

Post #7 of 7 (1940 views)
Permalink
Re: Fixing BBC HD AC3 for PS3 playback [In reply to]

On 27 Mar 2009, at 21:43, Philippe Van Der Gucht wrote:

> Andre Newman wrote:
>> On 27 Mar 2009, at 12:59, Philippe Van Der Gucht wrote:
>>>
>>> There is reputedly a problem with ffmpeg and the mpegts container.
>>> I now use 'avi'.
>> Tried it just now, I get an avi that plays fine in mplayer and vlc
>> but PS3 says corrupted file, tried it through MediaTomb and Ushare
>> too in case there's some mimetype issue.
>> Could you share your ffmpeg invocation please?
>
> Here's my report:
> http://www.spiff.be/node/304
>
>> I've been using:
>> ffmpeg -i infile.mpg -f avi -copyts -map 0.0:0.0 -map 0.3:0.1 -
>> acodec copy -vcodec copy outfile.avi
>
> Not much I can add to that I'm afraid.
>
> The only suggestion I can give you is to try out other formats.

I think I've tried all the formats that the PS3 will play.

Having some success with the latest version of tsMuxeR thanks to
Belcampo, PS3 pauses for about 30s before it plays the file but once
it starts it's 100%.
Haven't got it to work as a user job yet, tsmuxer has a wacky way to
pass parameters in a .meta file including the input filename!! I'll
post the script when it's all working nicely, it seems happy to fix
ITV HD as well which is a big bonus, otherwise I can only reliably
watch ITV HD after it's been burnt to a BD-RE which slows things down
a bit!

Andre
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.