Log in

View Full Version : Anyone had any luck converting BBC HD to Xvid?


apk
29th November 2006, 23:02
Hello,

I have manged to capture BBC HD1 in .TS using progdvb. The video is H.264 and audio AC3. Have anyone had any luck converting the TS to XviD? or MPG2?

Thanks,

apk

mitsubishi
30th November 2006, 00:14
Yeah, I've mostly been converting to a lower res x264, but I did an Xvid test as well.

It depends on what kind of TS's it is saving.

If it is remuxing just the HD stream then you should be able to just use DirectShowSource from within an avisynth script.

If it is saving the whole ts, then you will likely need to demux first.

Open the ts in a directshow mediaplayer, if using MPC disable internal splitter for ts, if it plays the HD stream then you can use it as is in avisynth.

Try TSConverter for demuxing, I'm still using projectX to demux out the audio as I assume it is better.

I havn't come up with a fully automated way yet, as I use staxrip for normal stuff, but it fails cutting the audio this way unless you do the whole file without cutting. So currently I'm using VDUB to find trim points and cutting the audio with besplit and encoding video using either command line or meGUI

Pookie
30th November 2006, 01:57
http://forum.doom9.org/showthread.php?p=903131#post903131

apk
30th November 2006, 02:02
tried that - had no luck, just errors- thanks anyway :)

mitsubishi
30th November 2006, 02:09
tried that - had no luck, just errors- thanks anyway :)

Which one apk?

Remembered you were getting it off DVBT, so there are no other video streams in the ts, so DS should work, does it not?

You can also use mencoder to demux. Forgot some people were having problems with the grey frame problem, I havn't been.

apk could you send me a small, say 10s clip of the ts, I'm working on a set of tools and would like to be able to demux anything.

ps I had uploaded a couple of samples I encoded in this thread: http://forum.doom9.org/showthread.php?t=118506 when I was playing around with logo removal

chilledoutuk
30th November 2006, 02:18
mitsubishi i am having problems demuxing the audio stream and keeping the audio sync do you know of a way of finding the offset like dgindex does so that i know what delay to set on the audio track.
I can get the mplayer demux technique working however.

mitsubishi
30th November 2006, 03:00
chilled, not yet, I'm hoping to write my own demuxer and try to handle it. I wrote a very simple demuxer before I started with HD, so when I find where I put all my code I'll have a start on it. But right now, I'm doing it manually, cutting out the piece with besplit where I think it might be, then muxing, then playing in MPC fiddling the audio delay till I get it right, then re-cutting and muxing.

Edit, it does always seem to be half a second though. Maybe this is the intentional broadcast delay?
Quick sample using half a second: http://www.mytempdir.com/1091055 (5mb) (ignore the embossed logo, reused an ill fitting avs script)

apk
30th November 2006, 03:08
where would you like me to put the sample?

mitsubishi
30th November 2006, 03:16
where would you like me to put the sample?

Anywhere you like apk, mytempdir.com is good

Thanks.

chilledoutuk
30th November 2006, 03:31
http://www.sendspace.com/file/ubpv7t

heres a sample of the video i was trying to demux its interesting to hear that the delay might be 500ms constantly but tbh looking at the audio packets and the video packets numbers i think there not the same size which would mean perhaps that when you cut the video the delay would be changed depending on where the audio packet you have use starts in relation to the latest GOP.

apk
30th November 2006, 03:34
http://www.mytempdir.com/1091057

mitsubishi
30th November 2006, 05:13
apk, thanks for that, It seems the same as format as my full TS's

Success though on finally getting it to demux,

TSConverter, Xport, mp4box, Mencoder, every combination of filters in graphedit, .... etc all fail, but mplayer does the trick. I didn't bother trying mplayer before because I assumed if mencoder didn't work, neither would it, should have known better than to assume anything. Then it just needs muxing with mp4box to use directshowsource on it. Seem to recall mp4box had a problem with large files, but......
A lot of glitches in that file, is that your reception?

chilled, yeah I think it must be something in how DVBDream remuxes the files, unless it's just been a coincidence.
I tried your file and the delay was about 1.5 seconds. What application and source is that from?

McCrash
30th November 2006, 10:16
I have been doing some tests recently around the ts h264 to xvid endeavour.

What ever the demuxer, it seems i have to guess the audio delay ?

Is there a tool out there that could help me a bit with the guessing ?

thx

apk
30th November 2006, 14:16
I think there are still some problems with me recieving the signal, dont understand it - have a good aerial, 29 miles from Crystal Palace and nothing but fields and a few houses around me.

After demuxing with mplayer/mencoder i get the h264 file. I then try and load that into Yamb to prepare it for mkvmerge but i just get:

Error parsing NAL unit
Error importing E:\hdtv\mplayer\test.264: BitStream Not Compliant
(BitStream Not Compliant)
(BitStream Not Compliant)

Would you mind posting a simple guide - so i can see what i am doing wrong, or do you have msn?

mitsubishi
30th November 2006, 16:48
Apk, I think the problem is either old mp4box version or garbled video from mplayer. Try this mp4box (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/MP4Box_0.4.3_(2006-08-28).7z) and set the video id for mplayer (didn't need to on that sample you put up, but do on mine)

mplayer -dumpvideo -vid 0x5de -dumpfile outfile.264 sample.ts
mplayer -dumpaudio -aid 0x5e1 -dumpfile outfile.ac3 sample.ts
MP4Box -add outfile.264 -new outfile.mp4
It may also be that mp4box can't handle large files, people seem to be using avc2avi instead, but then the splitting seems to introduce the grey frame problem.

Edit: yeah, tried on a full file, mp4box can't take it, avc2avi works on it though.
avc2avi -i outfile.264 -o outfile.avi -s 2000

mitsubishi
30th November 2006, 18:07
BTW regarding the signal. If you can view it OK it might be a problem with your Hard Drive's bandwith, but probably not.

I don't know the power the HD signal is being broadcast at, it's probably lower than the other DTT signals as it is supposed to only be available to the trial group, the BBC were bitching a while back about the people hooking into it who weren't supposed to be. The effective distance is said to only be 30 miles for DTT, with the transmission aimed to the south-east. So if the HD stream is lower than the 20kW of the others then it's not surprising it's weak.

chilledoutuk
30th November 2006, 18:53
bbc has little right to complain if they broadcast there signals at me I can do what i want with them.

Both me and apk have been using progdvb to record the video stream from bbc hd1.

TBH i dont even need something that can resync the audio the way dgindex works is perfect for me and i can just set the delay to what ever the demuxer recommends.

apk
30th November 2006, 18:53
Actually, thinking about it - im using a USB2 DVB-T card and a USB2 HDD for recording so im change the setting to a SATA drive instead and see if that makes any difference :)

apk
30th November 2006, 21:12
from what i can seethis program has no problems editing the h264 streams: http://mmm.kddilabs.jp/en/mpeg/mpro/20/advantages.htm but does cost over £2500.....

mitsubishi
30th November 2006, 21:51
Lol apk, well you get what you pay for I suppose....

Chilled that is odd that you are using the same programme when apk's ts's are harder to demux.

I'm going to ask over at DVBdreams forum as before the last version broke 'Stream Recorder' it was making perfectly usable remuxed ts's. The internal recorder still does remux usable streams, but it canes the cpu in doing so.

I wanted to get some serious sorting out and tooling around tonight, but one of my hard drives has just died :scared: the one that I havn't had problem with before as well. What a %$#@! I'm going to strip down my machine and fit my hiper PSU which has been sat waiting for a week and change the IDE cables and see if it starts working again. Think I'm to see if I've got enough cash to buy another tommorrow, then I can mirror my other drive onto it and RMA my SATA which has been flaky.

apk
1st December 2006, 00:29
ive got more stable picture now, just still working on encoding to xvid :(. I have tried every method posted here, when i try using the directshow method and vdubmod, the output is just a video with a grey screen. I read about a fix to that but wasnt sure how to do it :(.

drmpeg
1st December 2006, 00:36
Chilled that is odd that you are using the same programme when apk's ts's are harder to demux.


There's no PAT and PMT in apk's file. chilledoutuk's file has the same PID's, but does contain a valid PAT and PMT. There must be a setting that tells the app to add PAT and PMT. xport has no problem with chilledoutuk's file, and will cut the audio to the first video frame (that is, the audio delay = 0).

I'm going to release a new version of xport today that has all the recent changes in it (AVC and HDMV support).

Ron

mitsubishi
1st December 2006, 00:55
drmpeg, that's good to know. Apk, I was going to suggest you ask chilledoutuk what he is doing different since he was using the same application. Ideally you want the TS working rather than demuxing it. Working with the TS in directshowsource it encodes fine, when you have to demux it's nothing but problems, it works when the file is small enough to use mp4box on it, but when you have to use avc2avi it causes problems. I havn't tried splitting the TS into smaller pieces, then demuxing and putting into mp4, I keep meaning to try that. I got my IDE HD working again so I can play around now.

apk
1st December 2006, 00:57
here is a new sample - it should be alot better than the old one, if someone could take a look i would appreciate it :)
http://www.mytempdir.com/1092566

apk
3rd December 2006, 19:49
bump...