Author Topic: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread  (Read 964510 times)

Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1680 on: 06/20/2014 11:17 AM »
So I just converted frame 221.

I did as Saliva_Sweet explained:
- open 2 tabs with iframe editor (spacex.slapbet.org)
- load the iframe you want to edit in each tab (copy the mmb from the spreadsheets)
- in one of the editors, replace the -1 by -2 where you want to replace the blank MB by MB from previous frame
- correct dc values so they are the same as in the "reference" frame (check the values in both frames and add the difference)
- save your solution in a text file

Now the bit positions must be adapted, since I don't have a formula to convert them from one type to the other I did it that way:
- since I had additionnal MB positions, I had to run first the whole sequence (before corrections) to get the bit positions (in the log file) of the converted i-frame

- open in a notepad the file "P21_mmb.txt" that Saliva_Sweet put in the folders (how did you generate these???)
- replace the "," by a return / line feed
- save and close
- do the same for the text file with your solution
- open both files in Excel, use ":" as delimiter -> you get each number in a separate cell
- align the MB positions of both text files in your Excel sheet (add / remove MB positions from "P21_mmb.txt")
- copy the new dc values to "P21_mmb.txt"
- save as a text file
- open the new text file and replace tabs by ":", return / line feed by ","
- save and that's it!

I hope it is understandable ;)

attached files:

frame_221_i_original.png "reference" i-frame 221
frame_221_i_minus_2.png i-frame 221 with -1 sequences replaced by -2, and corrected dc values
frame_221_i2p.png final result with i-frame converted to p-frame, -2 replaced by -3, and adapted bit positions
command_line_before.txt before changing the -1 to -3
command_line_before.txt after changing the -1 to -3



How do you find the result? Should we tune further the dc values so the transition is smoother? Is there a formula to convert the bit positions from i-frame to converted i-frame?

I hope some will be able to help, even if you only do the first part (from -1 to -2) and post your solution! (it is really not complicated at all, just takes some time)
« Last Edit: 06/20/2014 11:26 AM by SwissCheese »

Offline mhenderson

  • Member
  • Posts: 69
  • USA
  • Liked: 101
  • Likes Given: 18
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1681 on: 06/20/2014 11:26 AM »
Hours poll - second request.

Please PM me with a guesstimate of the total number of hours you have dedicated to this effort since the effort began in April.

(Even rough range estimates like <50, 50-100, 100-200, 200-500, 500-1000, 1000-1500, ... would be fine)

I have received four responses so far.  Individual estimates will be kept anonymous (ahem ... yes I did some at my desk at the office, too ... I won't snitch). My intent is to paint a picture in broad strokes of the overall team effort.

Offline saliva_sweet

  • Full Member
  • ****
  • Posts: 573
  • Liked: 446
  • Likes Given: 1430
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1682 on: 06/20/2014 12:46 PM »

How do you find the result? Should we tune further the dc values so the transition is smoother? Is there a formula to convert the bit positions from i-frame to converted i-frame?

There is no formula, I generate the P21_mmb.txt during the conversion process. Each macroblock is longer by a couple of bits (~2-4) compared to the iframe version. I store the start position for each macroblock while converting (but these can also be extracted from the log as you did) and then pass over the original mmb and replace all positions. I will try to make a script to port mmbs over ASAP, not sure if I can make it today though. Anyone else care to make it?

Should we tune further the dc values so the transition is smoother? Is there a formula to convert the bit positions from i-frame to converted i-frame?

This I've been pondering myself. I think the proof of the pudding is utlimately in how the p frames respond and what it will look like overall. I'm hesitant to change the hue and brightness of iframes based on previous frame data (it could work though). At least for frames with good 0:0 MB like 221. For the frames that have no 0:0 mb I think this should be done absolutely.

Also looking at the pngs I think I see another conversion issue. p frame version looks a bit more washed out and blurry than the original. I think another vop_quant issue. I don't properly convert them, will have to try to tweak it manually. This has no effect on mmbs fortunately.

Please PM me with a guesstimate of the total number of hours you have dedicated to this effort since the effort began in April.

I'm sorry, wish I could help, but I don't have the vaguest idea.
« Last Edit: 06/20/2014 12:49 PM by saliva_sweet »

Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1683 on: 06/20/2014 03:47 PM »
Did the same for frame 181 (not really necessary since it is already really good).

Also looking at the pngs I think I see another conversion issue. p frame version looks a bit more washed out and blurry than the original. I think another vop_quant issue. I don't properly convert them, will have to try to tweak it manually. This has no effect on mmbs fortunately.

I did not remark anything special...

Offline Lar

  • Fan boy at large
  • Global Moderator
  • Senior Member
  • *****
  • Posts: 10815
  • Saw Gemini live on TV
  • A large LEGO storage facility ... in Michigan
  • Liked: 7732
  • Likes Given: 5626
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1684 on: 06/20/2014 03:57 PM »

Please PM me with a guesstimate of the total number of hours you have dedicated to this effort since the effort began in April.

I'm sorry, wish I could help, but I don't have the vaguest idea.

If you don't have the vaguest idea, it was probably a LOT... say several 10s of hours a week. Use that for your guess. :)
"I think it would be great to be born on Earth and to die on Mars. Just hopefully not at the point of impact." -Elon Musk
"We're a little bit like the dog who caught the bus" - Musk after CRS-8 S1 successfully landed on ASDS OCISLY

Offline MTom

  • Full Member
  • ***
  • Posts: 378
  • EU / Hungary
  • Liked: 107
  • Likes Given: 435
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1685 on: 06/20/2014 06:35 PM »

Please PM me with a guesstimate of the total number of hours you have dedicated to this effort since the effort began in April.

I'm sorry, wish I could help, but I don't have the vaguest idea.

If you don't have the vaguest idea, it was probably a LOT... say several 10s of hours a week. Use that for your guess. :)

Yes, the guesses about hours a week is a good starting point.
Some help how could you better guesstimate:
- when did you start with the work? The first post in the thread is from 30. of April. ( 7 weeks ago)
- after that you should divide your work into weeks and remember if all the weeks were about the same or were there big differences between them. In case of big differences you should count how many "heavy, middle and light" weeks you had. For help you can look at some posts for every weeks and you will better remember what kind of week you had at this time.
- after that you can guesstimate, how many hours you worked in your typical weeks (multiply of how many days you worked and an average of daily working hours.)

This type of guesstimating is not so bad. And if more people guess, it will be better because the answers are typically a mix of underestimated and overestimated guesses.
« Last Edit: 06/20/2014 06:49 PM by MTom »

Online Chris Bergin

Over 350,000 visits to this thread now.

Obviously, there may be a launch later (weather pending) and they may get a clear video back of propulsive return/splashdown, but nothing will take away from the work done on this thread by so many people.

And of course, this video is the historic first, so it will always have major value.

So this thread continues and we have an article in work to bookend the effort.

Offline Jakusb

  • Full Member
  • ****
  • Posts: 927
  • NL
  • Liked: 678
  • Likes Given: 381
SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1687 on: 06/20/2014 09:38 PM »
Whoop whoop!!!
Our video just was shown in live webcast!
Unfortunately no mentioning our efforts, but still. :)
« Last Edit: 06/20/2014 09:39 PM by Jakusb »

Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1688 on: 06/20/2014 09:39 PM »
Oo did I see our video on the webcast?  8)

Offline Req

  • Full Member
  • ****
  • Posts: 402
  • Liked: 413
  • Likes Given: 2580
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1689 on: 06/20/2014 09:39 PM »
They just showed part of the repaired video on the Orbcomm webcast. :)

Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1690 on: 06/20/2014 09:57 PM »
So they just decided to give us 1 more hour to finish repairing the video :P

Online QuantumG

  • Senior Member
  • *****
  • Posts: 8718
  • Australia
  • Liked: 3656
  • Likes Given: 859
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1691 on: 06/20/2014 10:04 PM »
So they just decided to give us 1 more hour to finish repairing the video :P

More than that.. it means the splashdown video of this flight will be in the dark - if they launch tonight.

Edit: apparently not! 19:01 launch. 20:24 sunset.
« Last Edit: 06/20/2014 10:07 PM by QuantumG »
Human spaceflight is basically just LARPing now.

Offline saliva_sweet

  • Full Member
  • ****
  • Posts: 573
  • Liked: 446
  • Likes Given: 1430
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1692 on: 06/20/2014 10:18 PM »
While the launch is on hold... Here's iframe to pframe mmb conversion tool. Extract to a folder, put you mmb file there and run it as (python is needed):

python port_mmb.py <frame number> <input filename> > <output filename>

eg. python port_mmb.py 121 my_121_iframe_mmb.txt > my_121_pframe_mmb.txt

disclaimer: I was drunk while making this (it's launch day) so report any bugs.

Offline MTom

  • Full Member
  • ***
  • Posts: 378
  • EU / Hungary
  • Liked: 107
  • Likes Given: 435
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1693 on: 06/20/2014 10:21 PM »
So they just decided to give us 1 more hour to finish repairing the video :P

Maybe more...  Jumping to the end of the launch window sounds not good.  :(
But still hoping...

Offline Quialiss

  • Member
  • Posts: 75
  • Liked: 82
  • Likes Given: 29
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1694 on: 06/20/2014 10:28 PM »
Should we tune further the dc values so the transition is smoother? Is there a formula to convert the bit positions from i-frame to converted i-frame?

This I've been pondering myself. I think the proof of the pudding is utlimately in how the p frames respond and what it will look like overall. I'm hesitant to change the hue and brightness of iframes based on previous frame data (it could work though). At least for frames with good 0:0 MB like 221. For the frames that have no 0:0 mb I think this should be done absolutely.

Definitely fine tune the DC values more if you can!  On my last pass on the i frames I attempted to match up DC values as much as possible, working back and forwards from frame 181 as it's the best in the set. My process for fixing up the DC values was to match against p frames where there were good mb's to match against, and then match against the best i frame+pframes before/after the one I was working on. 

For the last 3 i frames, there are nearly no mb's in the p frames to match against, and the 0:0 block is frequently missing or there's a large gap, so the only source of DC info I had for these was to match against the previous frame.  They're all just a bit off.. complicated by the chroma errors in frame.

I won't have too much time to spend on this until later in the weekend, but.. is this about what's needed for tracking progress on converting the i frame mmbs?

https://docs.google.com/spreadsheets/d/1YG_-wD7nyqsRopiihGqfTiLCE92kuCm_DOua8_UYW6g/edit#gid=0



Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1695 on: 06/20/2014 11:47 PM »
Should we tune further the dc values so the transition is smoother? Is there a formula to convert the bit positions from i-frame to converted i-frame?

This I've been pondering myself. I think the proof of the pudding is utlimately in how the p frames respond and what it will look like overall. I'm hesitant to change the hue and brightness of iframes based on previous frame data (it could work though). At least for frames with good 0:0 MB like 221. For the frames that have no 0:0 mb I think this should be done absolutely.

Definitely fine tune the DC values more if you can!  On my last pass on the i frames I attempted to match up DC values as much as possible, working back and forwards from frame 181 as it's the best in the set. My process for fixing up the DC values was to match against p frames where there were good mb's to match against, and then match against the best i frame+pframes before/after the one I was working on. 

For the last 3 i frames, there are nearly no mb's in the p frames to match against, and the 0:0 block is frequently missing or there's a large gap, so the only source of DC info I had for these was to match against the previous frame.  They're all just a bit off.. complicated by the chroma errors in frame.

I won't have too much time to spend on this until later in the weekend, but.. is this about what's needed for tracking progress on converting the i frame mmbs?

https://docs.google.com/spreadsheets/d/1YG_-wD7nyqsRopiihGqfTiLCE92kuCm_DOua8_UYW6g/edit#gid=0

That's OK with this spreadsheet, thank you!

Also did frame 161 (changed a bit the bottom dc values)


Offline Quialiss

  • Member
  • Posts: 75
  • Liked: 82
  • Likes Given: 29
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1696 on: 06/21/2014 07:23 AM »
While the launch is on hold... Here's iframe to pframe mmb conversion tool. Extract to a folder, put you mmb file there and run it as (python is needed):

python port_mmb.py <frame number> <input filename> > <output filename>

eg. python port_mmb.py 121 my_121_iframe_mmb.txt > my_121_pframe_mmb.txt

disclaimer: I was drunk while making this (it's launch day) so report any bugs.

It's ignoring the bit flip operations.. intentionally it seems?  I have not gotten around to getting your i2p frames working in my local ffmpeg so I can't take a look at what happens, but it seems like this would be an issue. 

101 is now done, looks like there were a couple wave fronts in the gaps that will now show up properly.  The sketchy quality of most of part 4's p frames do make it a little choppy looking though. 

Offline wronkiew

  • Full Member
  • *
  • Posts: 186
  • 34.502327, -116.971697
  • Liked: 105
  • Likes Given: 125
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1697 on: 06/21/2014 08:35 AM »
I am testing an update to the autogenerator to handle the i2p frames. The resulting video looks a bit softer to me than the regular build, so i would appreciate some extra eyes on it before I make it the default.

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p.mp4

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p_slow.mp4

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p_jpg.zip

The i2p frames are using the P21 mmbs included in i2p.zip file by default, and then overridden by the new spreadsheet as applicable.

Offline SwissCheese

  • Full Member
  • *
  • Posts: 165
  • Liked: 250
  • Likes Given: 97
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1698 on: 06/21/2014 09:35 AM »
I am testing an update to the autogenerator to handle the i2p frames. The resulting video looks a bit softer to me than the regular build, so i would appreciate some extra eyes on it before I make it the default.

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p.mp4

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p_slow.mp4

http://adama.nocdirect.com/~wronkiew/spx_crs3/landing_base_set_i2p_jpg.zip

The i2p frames are using the P21 mmbs included in i2p.zip file by default, and then overridden by the new spreadsheet as applicable.

The jpgs look good but the video is blurred and the file is very small. Mine is ~3 times larger. I use this command line to generate the video:
ffmpeg -framerate 44999/3003 -i frame_%03d.png -c:v mpeg4 -q:v 3 spacex_landing_i2p.mp4

I think -q:v 3 defines the quality, maybe it comes from this.

Edit: I found this in ffmpeg documentation:
The parameter q which is displayed while encoding is the current quantizer. The value 1 indicates that a very good quality could be achieved. The value 31 indicates the worst quality. If q=31 appears too often, it means that the encoder cannot compress enough to meet your bitrate. You must either increase the bitrate, decrease the frame rate or decrease the frame size.

Since our input quality is rather low  :P we should probably avoid degrading it further and use the best possible encoding quality, thus use option "-q:v 1" (although I found here that for some codecs q=1 was problematic... maybe put 2 or 3 then)

Without setting this value I get q=17.4 and my video is also small and blurred
« Last Edit: 06/21/2014 11:03 AM by SwissCheese »

Offline saliva_sweet

  • Full Member
  • ****
  • Posts: 573
  • Liked: 446
  • Likes Given: 1430
Re: SpaceX Falcon 9 v1.1 CRS-3 Splashdown Video Repair Task Thread
« Reply #1699 on: 06/21/2014 09:41 AM »
While the launch is on hold... Here's iframe to pframe mmb conversion tool. Extract to a folder, put you mmb file there and run it as (python is needed):

python port_mmb.py <frame number> <input filename> > <output filename>

eg. python port_mmb.py 121 my_121_iframe_mmb.txt > my_121_pframe_mmb.txt

disclaimer: I was drunk while making this (it's launch day) so report any bugs.

It's ignoring the bit flip operations.. intentionally it seems?  I have not gotten around to getting your i2p frames working in my local ffmpeg so I can't take a look at what happens, but it seems like this would be an issue. 
Xors get baked into the bitstream during conversion so they're left out of mmbs.

101 is now done, looks like there were a couple wave fronts in the gaps that will now show up properly.  The sketchy quality of most of part 4's p frames do make it a little choppy looking though.

Amazing progress. We're getting this done :)

Tags: