Here are two transactions I've made as a reference (TestNet):
P2SH: 7c1819fe9b52a199c9a422b1df3edef43005c3d4eea367d7830bbc060a6aac44
P2WSH: 3e7aaf12e77e5d68b2bc26fb5cfe3ee3108356860056da923a2e735ba4759d58
The first one obviously has a scriptSig and the second one has an empty scriptSig + witness. The following two parts are the corresponding data respectively.
CompactInt refers to
this so 1000 would be fde803
OP_PushData refers to values that are interpreted as an OP code and indicate raw data to be pushed on top of the stack. so 1000 would be 4de803
DerInt refers to length in DER TLV encoding and 1000 would be 8203e8
fd4606
CompactInt showing length = 1606
00
OP_0
48
??
30
DER sequence tag(0x30)
45
DerInt length = 69
02 21 00{..32 byte r..} 02 20 {..32 byte s..} 01
rest of the DER encoding...
{..14 similar signatures removed..}
4d0102
OP_PushData = PushData2 | 513 byte
5f
OP_15
21
PushData = 33 byte
02 083f75b6cf2aea023d86a6f757345508a2f7a1de23c1d015b6bc228e995cf2b7
Pubkey
{..14 similar pubkeys removed..}
5f
OP_15
ae
OP_CheckMultiSig
11 (count = 17)
CompactInt showing count= 17
00
OP_0
48
??
30 45 02 21 ....
Same signatures and variable types as above
fd0102
CompactInt showing length = 513
5f 21 02 4c231e0db.... 5f ae
Same script and variable types as above
I think I have gotten everything right, but I can not figure out what the two 0x48 values are. Although it doesn't make a difference because of the size of the value, for the sake of "correctness" I would love to know whether they are both CompactInt or if the one in witness is CompactInt and the one in ScriptSig is an OP_PushData (with value = 72)